2 # - fix bindings compilation (when library is not installed)
5 %bcond_without php # build PHP binding
6 %bcond_without perl # build Perl binding
7 %bcond_without pgsql # build postgresql binding
9 Summary: Universally Unique Identifier library
10 Summary(pl.UTF-8): Biblioteka unikalnych identyfikatorów UUID
16 Source0: ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
17 # Source0-md5: 5db0d43a9022a6ebbbc25337ae28942f
18 Patch0: uuid-ossp-prefix.patch
19 URL: http://www.ossp.org/pkg/lib/uuid/
20 %{?with_php:BuildRequires: /usr/bin/php}
21 BuildRequires: libstdc++-devel
22 BuildRequires: libtool
23 %{?with_perl:BuildRequires: perl-devel}
24 %{?with_php:BuildRequires: php-devel >= 3:5.0.0}
25 %{?with_pgsql:BuildRequires: postgresql-backend-devel}
26 %{?with_pgsql:BuildRequires: postgresql-devel}
27 BuildRequires: rpmbuild(macros) >= 1.519
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
50 oraz PHP:4/5. Istnieje też opcjonalna warstwa kompatybilności dla API
51 ISO-C DCE-1.1 i perlowego Data::UUID.
54 Summary: Development files for Universally Unique Identifier library
55 Summary(pl.UTF-8): Pliki programistyczne biblioteki OSSP uuid
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
60 Development headers and libraries for OSSP uuid.
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki OSSP uuid.
66 Summary: C++ support for Universally Unique Identifier library
67 Summary(pl.UTF-8): Wiązania C++ dla biblioteki OSSP uuid
69 Requires: %{name} = %{version}-%{release}
72 C++ binding for OSSP uuid library.
74 %description c++ -l pl.UTF-8
75 Wiązania C++ dla biblioteki OSSP uuid.
78 Summary: C++ development support for Universally Unique Identifier library
79 Summary(pl.UTF-8): Pliki programistyczne wiązania C++ biblioteki OSSP uuid
80 Group: Development/Libraries
81 Requires: %{name}-c++ = %{version}-%{release}
82 Requires: %{name}-devel = %{version}-%{release}
84 %description c++-devel
85 C++ development headers and libraries for OSSP uuid.
87 %description c++-devel -l pl.UTF-8
88 Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
91 Summary: DCE support for Universally Unique Identifier library
92 Summary(pl.UTF-8): Obsługa DCE dla biblioteki OSSP uuid
93 Group: Development/Libraries
94 Requires: %{name} = %{version}-%{release}
97 DCE OSSP uuid library.
99 %description dce -l pl.UTF-8
100 Biblioteka DCE OSSP uuid.
103 Summary: DCE development support for Universally Unique Identifier library
104 Summary(pl.UTF-8): Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid
105 Group: Development/Libraries
106 Requires: %{name}-dce = %{version}-%{release}
107 Requires: %{name}-devel = %{version}-%{release}
109 %description dce-devel
110 DCE development headers and libraries for OSSP uuid.
112 %description dce-devel -l pl.UTF-8
113 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
115 %package -n perl-uuid
116 Summary: OSSP uuid Perl Binding
117 Summary(pl.UTF-8): Perlowe wiązania biblioteki OSSP uuid
118 Group: Development/Libraries
119 Requires: %{name} = %{version}-%{release}
121 %description -n perl-uuid
122 Perl OSSP uuid modules, which includes a Data::UUID replacement.
124 %description -n perl-uuid -l pl.UTF-8
125 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
128 Summary: PHP support for Universally Unique Identifier library
129 Summary(pl.UTF-8): Wiązania PHP dla biblioteki OSSP UUID
130 Group: Development/Libraries
131 Requires: %{name} = %{version}-%{release}
132 %{?requires_php_extension}
133 Requires: php-common >= 4:5.0.4
135 %description -n php-uuid
136 UUID is a PHP extension for the creation of Universally Unique
139 %description -n php-uuid -l pl.UTF-8
140 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
141 identyfikatorów UUID.
143 %package -n postgresql-uuid
144 Summary: OSSP uuid bindings for PostgreSQL
145 Summary(pl.UTF-8): Wiązania OSSP uuid dla PostgreSQL-a
146 Group: Development/Libraries
147 Requires: %{name} = %{version}-%{release}
149 %description -n postgresql-uuid
150 PostgreSQL OSSP uuid module.
152 %description -n postgresql-uuid -l pl.UTF-8
153 Moduł OSSP uuid dla PostgreSQL-a.
156 %setup -q -n uuid-%{version}
162 --includedir=%{_includedir}/ossp-uuid \
166 --with%{!?with_perl:out}-perl \
167 --with%{!?with_php:out}-php \
168 --with%{!?with_pgsql:out}-pgsql
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT/%{_lib}
178 DESTDIR=$RPM_BUILD_ROOT
180 mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib}
181 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so
184 %{__make} pure_install \
187 DESTDIR=$RPM_BUILD_ROOT
189 rm $RPM_BUILD_ROOT%{perl_vendorarch}/OSSP/uuid.pod
190 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/.packlist
191 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/uuid.bs
195 install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d}
199 EXTDIR=%{php_extensiondir} \
200 DESTDIR=$RPM_BUILD_ROOT
202 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{php_data_dir}}/uuid.php
203 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini
204 ; Enable %{name} extension module
210 rm -rf $RPM_BUILD_ROOT
212 %post -p /sbin/ldconfig
213 %postun -p /sbin/ldconfig
215 %post c++ -p /sbin/ldconfig
216 %postun c++ -p /sbin/ldconfig
218 %post dce -p /sbin/ldconfig
219 %postun dce -p /sbin/ldconfig
222 %defattr(644,root,root,755)
223 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
224 %attr(755,root,root) %{_bindir}/uuid
225 %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
226 %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
227 %{_mandir}/man1/uuid.1*
230 %defattr(644,root,root,755)
231 %attr(755,root,root) %{_bindir}/uuid-config
232 %attr(755,root,root) %{_libdir}/libossp-uuid.so
233 %{_libdir}/libossp-uuid.la
234 %dir %{_includedir}/ossp-uuid
235 %{_includedir}/ossp-uuid/uuid.h
236 %{_pkgconfigdir}/ossp-uuid.pc
237 %{_mandir}/man1/uuid-config.1*
238 %{_mandir}/man3/ossp-uuid.3*
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/libossp-uuid++.so
248 %{_libdir}/libossp-uuid++.la
249 %{_includedir}/ossp-uuid/uuid++.hh
250 %{_mandir}/man3/uuid++.3*
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
255 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
258 %defattr(644,root,root,755)
259 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so
260 %{_libdir}/libossp-uuid_dce.la
261 %{_includedir}/ossp-uuid/uuid_dce.h
265 %defattr(644,root,root,755)
266 %dir %{perl_vendorarch}/OSSP
267 %{perl_vendorarch}/OSSP/uuid.pm
268 %dir %{perl_vendorarch}/auto/OSSP
269 %dir %{perl_vendorarch}/auto/OSSP/uuid
270 %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/uuid/uuid.so
271 %{_mandir}/man3/OSSP::uuid.3*
276 %defattr(644,root,root,755)
277 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
278 %attr(755,root,root) %{php_extensiondir}/%{name}.so
279 %{php_data_dir}/uuid.php
283 %files -n postgresql-uuid
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so
286 %{_datadir}/postgresql/uuid.sql