]>
Commit | Line | Data |
---|---|---|
ce1a1410 ER |
1 | # |
2 | # Conditional build: | |
1b0e6304 | 3 | %bcond_with php # don't build PHP binding |
fe61f643 JP |
4 | %bcond_without perl # don't build Perl binding |
5 | %bcond_with pgsql # build postgresql binding | |
64edb34a | 6 | %bcond_without static_libs # don't build static libraries |
674f5a50 | 7 | |
8becfe02 | 8 | Summary: Universally Unique Identifier library |
b85a0049 | 9 | Summary(pl.UTF-8): Biblioteka unikalnych identyfikatorów UUID |
660f1672 | 10 | Name: ossp-uuid |
e531fcde | 11 | Version: 1.6.2 |
4b9bd043 | 12 | Release: 34 |
8becfe02 ER |
13 | License: MIT |
14 | Group: Libraries | |
660f1672 | 15 | Source0: ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz |
e531fcde | 16 | # Source0-md5: 5db0d43a9022a6ebbbc25337ae28942f |
660f1672 | 17 | Patch0: uuid-ossp-prefix.patch |
ddcb10f4 | 18 | Patch1: php3.patch |
b85a0049 | 19 | URL: http://www.ossp.org/pkg/lib/uuid/ |
635dae4a | 20 | BuildRequires: automake |
08dc5f1d | 21 | %{?with_php:BuildRequires: %{php_name}-devel} |
ec78aef3 | 22 | %{?with_php:BuildRequires: %{php_name}-program} |
b19ded27 | 23 | BuildRequires: libstdc++-devel |
8becfe02 | 24 | BuildRequires: libtool |
674f5a50 | 25 | %{?with_perl:BuildRequires: perl-devel} |
b19ded27 | 26 | %{?with_pgsql:BuildRequires: postgresql-backend-devel} |
ce1a1410 | 27 | %{?with_pgsql:BuildRequires: postgresql-devel} |
674f5a50 | 28 | BuildRequires: rpmbuild(macros) >= 1.519 |
8becfe02 ER |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | OSSP uuid is a ISO-C:1999 application programming interface (API) and | |
33 | corresponding command line interface (CLI) for the generation of DCE | |
34 | 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique | |
35 | Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 | |
36 | (time and node based), version 3 (name based, MD5), version 4 (random | |
37 | number based) and version 5 (name based, SHA-1). Additional API | |
38 | bindings are provided for the languages ISO-C++:1998, Perl:5 and | |
39 | PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 | |
40 | and Perl Data::UUID APIs. | |
41 | ||
b85a0049 JB |
42 | %description -l pl.UTF-8 |
43 | OSSP uuid to interfejs programistyczny (API) ISO-C:1999 i | |
44 | odpowiadający mu interfejs linii poleceń (CLI) do generowania | |
45 | całkowicie unikalnych identyfikatorów UUID (Universally Unique | |
46 | Identifier) zgodnych z DCE 1.1, ISO/IEC 11578:1996 i RFC 4122. | |
47 | Obsługuje wariant DCE 1.1 UUID-ów w wersji 1 (oparty na czasie i | |
48 | węzłach), w wersji 3 (oparty na nazwie i MD5), w wersji 4 (oparty na | |
49 | liczbach losowych) oraz w wersji 5 (oparty na nazwach i SHA-1). | |
50 | Załączone są dodatkowe wiązania API do języków ISO-C++:1998, Perl:5 | |
674f5a50 ER |
51 | oraz PHP:4/5. Istnieje też opcjonalna warstwa kompatybilności dla API |
52 | ISO-C DCE-1.1 i perlowego Data::UUID. | |
b85a0049 | 53 | |
8becfe02 | 54 | %package devel |
b85a0049 JB |
55 | Summary: Development files for Universally Unique Identifier library |
56 | Summary(pl.UTF-8): Pliki programistyczne biblioteki OSSP uuid | |
8becfe02 ER |
57 | Group: Development/Libraries |
58 | Requires: %{name} = %{version}-%{release} | |
59 | ||
60 | %description devel | |
61 | Development headers and libraries for OSSP uuid. | |
62 | ||
b85a0049 JB |
63 | %description devel -l pl.UTF-8 |
64 | Pliki nagłówkowe biblioteki OSSP uuid. | |
65 | ||
64edb34a | 66 | %package static |
67 | Summary: Universally Unique Identifier library - static library | |
68 | Summary(pl.UTF-8): Biblioteka statyczna OSSP uuid | |
69 | Group: Development/Libraries | |
70 | Requires: %{name}-devel = %{version}-%{release} | |
71 | ||
72 | %description static | |
73 | Universally Unique Identifier library - static library | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Biblioteka statyczna OSSP uuid | |
77 | ||
8becfe02 ER |
78 | %package c++ |
79 | Summary: C++ support for Universally Unique Identifier library | |
b85a0049 | 80 | Summary(pl.UTF-8): Wiązania C++ dla biblioteki OSSP uuid |
8becfe02 ER |
81 | Group: Libraries |
82 | Requires: %{name} = %{version}-%{release} | |
83 | ||
84 | %description c++ | |
b85a0049 JB |
85 | C++ binding for OSSP uuid library. |
86 | ||
87 | %description c++ -l pl.UTF-8 | |
88 | Wiązania C++ dla biblioteki OSSP uuid. | |
8becfe02 ER |
89 | |
90 | %package c++-devel | |
91 | Summary: C++ development support for Universally Unique Identifier library | |
b85a0049 | 92 | Summary(pl.UTF-8): Pliki programistyczne wiązania C++ biblioteki OSSP uuid |
8becfe02 ER |
93 | Group: Development/Libraries |
94 | Requires: %{name}-c++ = %{version}-%{release} | |
95 | Requires: %{name}-devel = %{version}-%{release} | |
e7ab4cf6 | 96 | Requires: libstdc++-devel |
8becfe02 ER |
97 | |
98 | %description c++-devel | |
99 | C++ development headers and libraries for OSSP uuid. | |
100 | ||
b85a0049 JB |
101 | %description c++-devel -l pl.UTF-8 |
102 | Pliki programistyczne wiązania C++ biblioteki OSSP uuid. | |
103 | ||
64edb34a | 104 | %package c++-static |
105 | Summary: C++ support for Universally Unique Identifier library - static library | |
106 | Summary(pl.UTF-8): Wiązania C++ dla biblioteki OSSP uuid - biblioteka statyczna | |
107 | Group: Development/Libraries | |
108 | Requires: %{name}-c++-devel = %{version}-%{release} | |
109 | ||
110 | %description c++-static | |
111 | C++ support for Universally Unique Identifier library - static library | |
112 | ||
113 | %description c++-static -l pl.UTF-8 | |
114 | Wiązania C++ dla biblioteki OSSP uuid - biblioteka statyczna | |
115 | ||
8becfe02 ER |
116 | %package dce |
117 | Summary: DCE support for Universally Unique Identifier library | |
b85a0049 | 118 | Summary(pl.UTF-8): Obsługa DCE dla biblioteki OSSP uuid |
8becfe02 ER |
119 | Group: Development/Libraries |
120 | Requires: %{name} = %{version}-%{release} | |
121 | ||
122 | %description dce | |
123 | DCE OSSP uuid library. | |
124 | ||
b85a0049 JB |
125 | %description dce -l pl.UTF-8 |
126 | Biblioteka DCE OSSP uuid. | |
127 | ||
8becfe02 ER |
128 | %package dce-devel |
129 | Summary: DCE development support for Universally Unique Identifier library | |
b85a0049 | 130 | Summary(pl.UTF-8): Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid |
8becfe02 ER |
131 | Group: Development/Libraries |
132 | Requires: %{name}-dce = %{version}-%{release} | |
133 | Requires: %{name}-devel = %{version}-%{release} | |
134 | ||
135 | %description dce-devel | |
136 | DCE development headers and libraries for OSSP uuid. | |
137 | ||
b85a0049 JB |
138 | %description dce-devel -l pl.UTF-8 |
139 | Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid. | |
140 | ||
64edb34a | 141 | %package dce-static |
142 | Summary: DCE development support for Universally Unique Identifier library - static library | |
143 | Summary(pl.UTF-8): Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid - biblioteka statyczna | |
144 | Group: Development/Libraries | |
145 | Requires: %{name}-dce-devel = %{version}-%{release} | |
146 | ||
147 | %description dce-static | |
148 | DCE development support for Universally Unique Identifier library - | |
149 | static library | |
150 | ||
151 | %description dce-static -l pl.UTF-8 | |
152 | Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid - | |
153 | biblioteka statyczna | |
154 | ||
660f1672 | 155 | %package -n perl-uuid |
f832c0e2 | 156 | Summary: OSSP uuid Perl Binding |
b85a0049 | 157 | Summary(pl.UTF-8): Perlowe wiązania biblioteki OSSP uuid |
8becfe02 ER |
158 | Group: Development/Libraries |
159 | Requires: %{name} = %{version}-%{release} | |
160 | ||
660f1672 | 161 | %description -n perl-uuid |
8becfe02 ER |
162 | Perl OSSP uuid modules, which includes a Data::UUID replacement. |
163 | ||
b85a0049 JB |
164 | %description -n perl-uuid -l pl.UTF-8 |
165 | Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID. | |
166 | ||
08dc5f1d | 167 | %package -n %{php_name}-uuid |
8becfe02 | 168 | Summary: PHP support for Universally Unique Identifier library |
b85a0049 | 169 | Summary(pl.UTF-8): Wiązania PHP dla biblioteki OSSP UUID |
8becfe02 ER |
170 | Group: Development/Libraries |
171 | Requires: %{name} = %{version}-%{release} | |
f832c0e2 | 172 | %{?requires_php_extension} |
8becfe02 | 173 | |
08dc5f1d | 174 | %description -n %{php_name}-uuid |
f832c0e2 ER |
175 | UUID is a PHP extension for the creation of Universally Unique |
176 | Identifiers (UUID). | |
8becfe02 | 177 | |
08dc5f1d | 178 | %description -n %{php_name}-uuid -l pl.UTF-8 |
b85a0049 JB |
179 | UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych |
180 | identyfikatorów UUID. | |
181 | ||
660f1672 | 182 | %package -n postgresql-uuid |
f832c0e2 | 183 | Summary: OSSP uuid bindings for PostgreSQL |
b85a0049 | 184 | Summary(pl.UTF-8): Wiązania OSSP uuid dla PostgreSQL-a |
8becfe02 ER |
185 | Group: Development/Libraries |
186 | Requires: %{name} = %{version}-%{release} | |
187 | ||
660f1672 | 188 | %description -n postgresql-uuid |
8becfe02 ER |
189 | PostgreSQL OSSP uuid module. |
190 | ||
b85a0049 JB |
191 | %description -n postgresql-uuid -l pl.UTF-8 |
192 | Moduł OSSP uuid dla PostgreSQL-a. | |
193 | ||
8becfe02 | 194 | %prep |
660f1672 | 195 | %setup -q -n uuid-%{version} |
e73d7b29 | 196 | %patch0 -p1 |
ddcb10f4 | 197 | %patch1 -p1 |
8becfe02 ER |
198 | |
199 | %build | |
ca708ec6 | 200 | cp -f /usr/share/automake/config.sub . |
46e8a633 JR |
201 | %if %{with php} |
202 | cd php | |
203 | %{__libtoolize} | |
204 | cd .. | |
205 | %endif | |
8becfe02 ER |
206 | # Build the library. |
207 | %configure \ | |
a316374e | 208 | --includedir=%{_includedir}/ossp-uuid \ |
64edb34a | 209 | %{!?with_static_libs:--disable-static} \ |
8becfe02 ER |
210 | --with-dce \ |
211 | --with-cxx \ | |
ce1a1410 | 212 | --with%{!?with_perl:out}-perl \ |
08dc5f1d | 213 | --with%{!?with_php:out}-php PHP=php \ |
ce1a1410 | 214 | --with%{!?with_pgsql:out}-pgsql |
8becfe02 ER |
215 | |
216 | %{__make} | |
217 | ||
8becfe02 ER |
218 | %install |
219 | rm -rf $RPM_BUILD_ROOT | |
fda6c944 | 220 | install -d $RPM_BUILD_ROOT/%{_lib} |
8becfe02 | 221 | %{__make} install \ |
674f5a50 ER |
222 | WITH_PHP=no \ |
223 | WITH_PERL=no \ | |
8becfe02 ER |
224 | DESTDIR=$RPM_BUILD_ROOT |
225 | ||
fda6c944 ER |
226 | mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib} |
227 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so | |
228 | ||
674f5a50 ER |
229 | %if %{with perl} |
230 | %{__make} pure_install \ | |
231 | -C perl \ | |
232 | INSTALLDIRS=vendor \ | |
233 | DESTDIR=$RPM_BUILD_ROOT | |
234 | ||
235 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/OSSP/uuid.pod | |
236 | rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/.packlist | |
674f5a50 ER |
237 | %endif |
238 | ||
239 | %if %{with php} | |
240 | install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d} | |
241 | %{__make} install \ | |
242 | -C php \ | |
243 | -f Makefile.local \ | |
244 | EXTDIR=%{php_extensiondir} \ | |
245 | DESTDIR=$RPM_BUILD_ROOT | |
246 | ||
247 | mv $RPM_BUILD_ROOT{%{php_extensiondir},%{php_data_dir}}/uuid.php | |
248 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini | |
249 | ; Enable %{name} extension module | |
250 | extension=%{name}.so | |
251 | EOF | |
252 | %endif | |
253 | ||
8becfe02 ER |
254 | %clean |
255 | rm -rf $RPM_BUILD_ROOT | |
256 | ||
b85a0049 JB |
257 | %post -p /sbin/ldconfig |
258 | %postun -p /sbin/ldconfig | |
8becfe02 | 259 | |
b85a0049 JB |
260 | %post c++ -p /sbin/ldconfig |
261 | %postun c++ -p /sbin/ldconfig | |
8becfe02 | 262 | |
b85a0049 JB |
263 | %post dce -p /sbin/ldconfig |
264 | %postun dce -p /sbin/ldconfig | |
8becfe02 ER |
265 | |
266 | %files | |
267 | %defattr(644,root,root,755) | |
268 | %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS | |
269 | %attr(755,root,root) %{_bindir}/uuid | |
fda6c944 ER |
270 | %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.* |
271 | %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16 | |
237e5788 | 272 | %{_mandir}/man1/uuid.1* |
8becfe02 ER |
273 | |
274 | %files devel | |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) %{_bindir}/uuid-config | |
b85a0049 JB |
277 | %attr(755,root,root) %{_libdir}/libossp-uuid.so |
278 | %{_libdir}/libossp-uuid.la | |
a316374e | 279 | %dir %{_includedir}/ossp-uuid |
280 | %{_includedir}/ossp-uuid/uuid.h | |
e73d7b29 | 281 | %{_pkgconfigdir}/ossp-uuid.pc |
237e5788 | 282 | %{_mandir}/man1/uuid-config.1* |
b85a0049 | 283 | %{_mandir}/man3/ossp-uuid.3* |
8becfe02 | 284 | |
64edb34a | 285 | %if %{with static_libs} |
286 | %files static | |
287 | %defattr(644,root,root,755) | |
288 | %{_libdir}/libossp-uuid.a | |
289 | %endif | |
290 | ||
8becfe02 ER |
291 | %files c++ |
292 | %defattr(644,root,root,755) | |
e73d7b29 ER |
293 | %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.* |
294 | %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16 | |
8becfe02 ER |
295 | |
296 | %files c++-devel | |
297 | %defattr(644,root,root,755) | |
b85a0049 | 298 | %attr(755,root,root) %{_libdir}/libossp-uuid++.so |
e73d7b29 | 299 | %{_libdir}/libossp-uuid++.la |
b85a0049 | 300 | %{_includedir}/ossp-uuid/uuid++.hh |
8becfe02 ER |
301 | %{_mandir}/man3/uuid++.3* |
302 | ||
64edb34a | 303 | %if %{with static_libs} |
304 | %files c++-static | |
305 | %defattr(644,root,root,755) | |
306 | %{_libdir}/libossp-uuid++.a | |
307 | %endif | |
308 | ||
8becfe02 ER |
309 | %files dce |
310 | %defattr(644,root,root,755) | |
e73d7b29 ER |
311 | %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.* |
312 | %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16 | |
8becfe02 ER |
313 | |
314 | %files dce-devel | |
315 | %defattr(644,root,root,755) | |
b85a0049 | 316 | %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so |
e73d7b29 | 317 | %{_libdir}/libossp-uuid_dce.la |
b85a0049 | 318 | %{_includedir}/ossp-uuid/uuid_dce.h |
8becfe02 | 319 | |
64edb34a | 320 | %if %{with static_libs} |
321 | %files dce-static | |
322 | %defattr(644,root,root,755) | |
323 | %{_libdir}/libossp-uuid_dce.a | |
324 | %endif | |
325 | ||
ce1a1410 | 326 | %if %{with perl} |
660f1672 | 327 | %files -n perl-uuid |
8becfe02 | 328 | %defattr(644,root,root,755) |
674f5a50 ER |
329 | %dir %{perl_vendorarch}/OSSP |
330 | %{perl_vendorarch}/OSSP/uuid.pm | |
331 | %dir %{perl_vendorarch}/auto/OSSP | |
332 | %dir %{perl_vendorarch}/auto/OSSP/uuid | |
333 | %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/uuid/uuid.so | |
8becfe02 | 334 | %{_mandir}/man3/OSSP::uuid.3* |
ce1a1410 | 335 | %endif |
8becfe02 | 336 | |
ce1a1410 | 337 | %if %{with php} |
08dc5f1d | 338 | %files -n %{php_name}-uuid |
8becfe02 | 339 | %defattr(644,root,root,755) |
674f5a50 ER |
340 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini |
341 | %attr(755,root,root) %{php_extensiondir}/%{name}.so | |
342 | %{php_data_dir}/uuid.php | |
ce1a1410 | 343 | %endif |
8becfe02 | 344 | |
ce1a1410 | 345 | %if %{with pgsql} |
660f1672 | 346 | %files -n postgresql-uuid |
8becfe02 | 347 | %defattr(644,root,root,755) |
b85a0049 | 348 | %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so |
8becfe02 | 349 | %{_datadir}/postgresql/uuid.sql |
ce1a1410 | 350 | %endif |