]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- release 1
[packages/ossp-uuid.git] / ossp-uuid.spec
1 # TODO
2 # - rename include ossp/uuid.h?
3 # - rename package to ossp-uuid?
4 # - fix bindings compilation (when library is not installed)
5 #
6 # Conditional build:
7 %bcond_without  php             # build PHP binding
8 %bcond_with     perl            # build Perl binding
9 %bcond_without  pgsql           # build postgresql binding
10 #
11 Summary:        Universally Unique Identifier library
12 Name:           uuid
13 Version:        1.6.1
14 Release:        1
15 License:        MIT
16 Group:          Libraries
17 URL:            http://www.ossp.org/pkg/lib/uuid/
18 Source0:        ftp://ftp.ossp.org/pkg/lib/uuid/%{name}-%{version}.tar.gz
19 # Source0-md5:  18c8875411da07fe4503fdfc2136bf46
20 Patch0:         %{name}-ossp-prefix.patch
21 BuildRequires:  libtool
22 %{?with_php:BuildRequires:      php-devel >= 3:5.0.0}
23 %{?with_pgsql:BuildRequires:    postgresql-devel}
24 BuildRequires:  rpmbuild(macros) >= 1.344
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 OSSP uuid is a ISO-C:1999 application programming interface (API) and
29 corresponding command line interface (CLI) for the generation of DCE
30 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique
31 Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1
32 (time and node based), version 3 (name based, MD5), version 4 (random
33 number based) and version 5 (name based, SHA-1). Additional API
34 bindings are provided for the languages ISO-C++:1998, Perl:5 and
35 PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1
36 and Perl Data::UUID APIs.
37
38 %package devel
39 Summary:        Development support for Universally Unique Identifier library
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42
43 %description devel
44 Development headers and libraries for OSSP uuid.
45
46 %package c++
47 Summary:        C++ support for Universally Unique Identifier library
48 Group:          Libraries
49 Requires:       %{name} = %{version}-%{release}
50
51 %description c++
52 C++ libraries for OSSP uuid.
53
54 %package c++-devel
55 Summary:        C++ development support for Universally Unique Identifier library
56 Group:          Development/Libraries
57 Requires:       %{name}-c++ = %{version}-%{release}
58 Requires:       %{name}-devel = %{version}-%{release}
59
60 %description c++-devel
61 C++ development headers and libraries for OSSP uuid.
62
63 %package dce
64 Summary:        DCE support for Universally Unique Identifier library
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68 %description dce
69 DCE OSSP uuid library.
70
71 %package dce-devel
72 Summary:        DCE development support for Universally Unique Identifier library
73 Group:          Development/Libraries
74 Requires:       %{name}-dce = %{version}-%{release}
75 Requires:       %{name}-devel = %{version}-%{release}
76
77 %description dce-devel
78 DCE development headers and libraries for OSSP uuid.
79
80 %package -n perl-%{name}
81 Summary:        OSSP uuid Perl Binding
82 Group:          Development/Libraries
83 Requires:       %{name} = %{version}-%{release}
84
85 %description -n perl-%{name}
86 Perl OSSP uuid modules, which includes a Data::UUID replacement.
87
88 %package -n php-%{name}
89 Summary:        PHP support for Universally Unique Identifier library
90 Group:          Development/Libraries
91 Requires:       %{name} = %{version}-%{release}
92 %{?requires_php_extension}
93 Requires:       php-common >= 4:5.0.4
94
95 %description -n php-%{name}
96 UUID is a PHP extension for the creation of Universally Unique
97 Identifiers (UUID).
98
99 %package -n postgresql-%{name}
100 Summary:        OSSP uuid bindings for PostgreSQL
101 Group:          Development/Libraries
102 Requires:       %{name} = %{version}-%{release}
103
104 %description -n postgresql-%{name}
105 PostgreSQL OSSP uuid module.
106
107 %prep
108 %setup -q
109 %patch0 -p1
110
111 %build
112 # Build the library.
113 %configure \
114         --disable-static \
115         --with-dce \
116         --with-cxx \
117         --with%{!?with_perl:out}-perl \
118         --with%{!?with_php:out}-php \
119         --with%{!?with_pgsql:out}-pgsql
120
121 %{__make}
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125 %{__make} install \
126         DESTDIR=$RPM_BUILD_ROOT
127
128 %if %{with php}
129 install -d $RPM_BUILD_ROOT%{_datadir}/php
130 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/%{name}.php
131 %endif
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %post -p /sbin/ldconfig
137 %postun -p /sbin/ldconfig
138
139 %post c++ -p /sbin/ldconfig
140 %postun c++ -p /sbin/ldconfig
141
142 %post dce -p /sbin/ldconfig
143 %postun dce -p /sbin/ldconfig
144
145 %files
146 %defattr(644,root,root,755)
147 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
148 %attr(755,root,root) %{_bindir}/uuid
149 %attr(755,root,root) %{_libdir}/libossp-uuid.so.*.*.*
150 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid.so.16
151 %{_mandir}/man1/uuid.1*
152
153 %files devel
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_bindir}/uuid-config
156 %{_includedir}/uuid.h
157 %{_libdir}/libossp-uuid.so
158 %{_pkgconfigdir}/ossp-uuid.pc
159 %{_mandir}/man3/ossp-uuid.3*
160 %{_mandir}/man1/uuid-config.1*
161 %{_libdir}/libossp-uuid.la
162
163 %files c++
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
166 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
167
168 %files c++-devel
169 %defattr(644,root,root,755)
170 %{_includedir}/uuid++.hh
171 %{_libdir}/libossp-uuid++.so
172 %{_libdir}/libossp-uuid++.la
173 %{_mandir}/man3/uuid++.3*
174
175 %files dce
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
179
180 %files dce-devel
181 %defattr(644,root,root,755)
182 %{_includedir}/uuid_dce.h
183 %{_libdir}/libossp-uuid_dce.so
184 %{_libdir}/libossp-uuid_dce.la
185
186 %if %{with perl}
187 %files -n perl-%{name}
188 %defattr(644,root,root,755)
189 %{perl_vendorarch}/auto/*
190 %{perl_vendorarch}/Data*
191 %{perl_vendorarch}/OSSP*
192 %{_mandir}/man3/Data::UUID.3*
193 %{_mandir}/man3/OSSP::uuid.3*
194 %endif
195
196 %if %{with php}
197 %files -n php-%{name}
198 %defattr(644,root,root,755)
199 %{_libdir}/php/ossp-uuid.so
200 %{_datadir}/php/uuid.php
201 %endif
202
203 %if %{with pgsql}
204 %files -n postgresql-%{name}
205 %defattr(644,root,root,755)
206 %{_libdir}/postgresql/ossp-uuid.so
207 %{_datadir}/postgresql/uuid.sql
208 %endif
This page took 0.058586 seconds and 4 git commands to generate.