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