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