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 BuildRequires: libtool
21 %{?with_perl:BuildRequires: perl-devel}
22 %{?with_php:BuildRequires: php-devel >= 3:5.0.0}
23 %{?with_pgsql:BuildRequires: postgresql-devel}
24 BuildRequires: rpmbuild(macros) >= 1.519
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
38 %description -l pl.UTF-8
39 OSSP uuid to interfejs programistyczny (API) ISO-C:1999 i
40 odpowiadający mu interfejs linii poleceń (CLI) do generowania
41 całkowicie unikalnych identyfikatorów UUID (Universally Unique
42 Identifier) zgodnych z DCE 1.1, ISO/IEC 11578:1996 i RFC 4122.
43 Obsługuje wariant DCE 1.1 UUID-ów w wersji 1 (oparty na czasie i
44 węzłach), w wersji 3 (oparty na nazwie i MD5), w wersji 4 (oparty na
45 liczbach losowych) oraz w wersji 5 (oparty na nazwach i SHA-1).
46 Załączone są dodatkowe wiązania API do języków ISO-C++:1998, Perl:5
47 oraz PHP:4/5. Istnieje też opcjonalna warstwa kompatybilności dla API
48 ISO-C DCE-1.1 i perlowego Data::UUID.
51 Summary: Development files for Universally Unique Identifier library
52 Summary(pl.UTF-8): Pliki programistyczne biblioteki OSSP uuid
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
57 Development headers and libraries for OSSP uuid.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki OSSP uuid.
63 Summary: C++ support for Universally Unique Identifier library
64 Summary(pl.UTF-8): Wiązania C++ dla biblioteki OSSP uuid
66 Requires: %{name} = %{version}-%{release}
69 C++ binding for OSSP uuid library.
71 %description c++ -l pl.UTF-8
72 Wiązania C++ dla biblioteki OSSP uuid.
75 Summary: C++ development support for Universally Unique Identifier library
76 Summary(pl.UTF-8): Pliki programistyczne wiązania C++ biblioteki OSSP uuid
77 Group: Development/Libraries
78 Requires: %{name}-c++ = %{version}-%{release}
79 Requires: %{name}-devel = %{version}-%{release}
81 %description c++-devel
82 C++ development headers and libraries for OSSP uuid.
84 %description c++-devel -l pl.UTF-8
85 Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
88 Summary: DCE support for Universally Unique Identifier library
89 Summary(pl.UTF-8): Obsługa DCE dla biblioteki OSSP uuid
90 Group: Development/Libraries
91 Requires: %{name} = %{version}-%{release}
94 DCE OSSP uuid library.
96 %description dce -l pl.UTF-8
97 Biblioteka DCE OSSP uuid.
100 Summary: DCE development support for Universally Unique Identifier library
101 Summary(pl.UTF-8): Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid
102 Group: Development/Libraries
103 Requires: %{name}-dce = %{version}-%{release}
104 Requires: %{name}-devel = %{version}-%{release}
106 %description dce-devel
107 DCE development headers and libraries for OSSP uuid.
109 %description dce-devel -l pl.UTF-8
110 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
112 %package -n perl-uuid
113 Summary: OSSP uuid Perl Binding
114 Summary(pl.UTF-8): Perlowe wiązania biblioteki OSSP uuid
115 Group: Development/Libraries
116 Requires: %{name} = %{version}-%{release}
118 %description -n perl-uuid
119 Perl OSSP uuid modules, which includes a Data::UUID replacement.
121 %description -n perl-uuid -l pl.UTF-8
122 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
125 Summary: PHP support for Universally Unique Identifier library
126 Summary(pl.UTF-8): Wiązania PHP dla biblioteki OSSP UUID
127 Group: Development/Libraries
128 Requires: %{name} = %{version}-%{release}
129 %{?requires_php_extension}
130 Requires: php-common >= 4:5.0.4
132 %description -n php-uuid
133 UUID is a PHP extension for the creation of Universally Unique
136 %description -n php-uuid -l pl.UTF-8
137 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
138 identyfikatorów UUID.
140 %package -n postgresql-uuid
141 Summary: OSSP uuid bindings for PostgreSQL
142 Summary(pl.UTF-8): Wiązania OSSP uuid dla PostgreSQL-a
143 Group: Development/Libraries
144 Requires: %{name} = %{version}-%{release}
146 %description -n postgresql-uuid
147 PostgreSQL OSSP uuid module.
149 %description -n postgresql-uuid -l pl.UTF-8
150 Moduł OSSP uuid dla PostgreSQL-a.
153 %setup -q -n uuid-%{version}
159 --includedir=%{_includedir}/ossp-uuid \
163 --with%{!?with_perl:out}-perl \
164 --with%{!?with_php:out}-php \
165 --with%{!?with_pgsql:out}-pgsql
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT/%{_lib}
175 DESTDIR=$RPM_BUILD_ROOT
177 mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib}
178 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so
181 %{__make} pure_install \
184 DESTDIR=$RPM_BUILD_ROOT
186 rm $RPM_BUILD_ROOT%{perl_vendorarch}/OSSP/uuid.pod
187 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/.packlist
188 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/uuid.bs
192 install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d}
196 EXTDIR=%{php_extensiondir} \
197 DESTDIR=$RPM_BUILD_ROOT
199 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{php_data_dir}}/uuid.php
200 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini
201 ; Enable %{name} extension module
207 rm -rf $RPM_BUILD_ROOT
209 %post -p /sbin/ldconfig
210 %postun -p /sbin/ldconfig
212 %post c++ -p /sbin/ldconfig
213 %postun c++ -p /sbin/ldconfig
215 %post dce -p /sbin/ldconfig
216 %postun dce -p /sbin/ldconfig
219 %defattr(644,root,root,755)
220 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
221 %attr(755,root,root) %{_bindir}/uuid
222 %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
223 %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
224 %{_mandir}/man1/uuid.1*
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_bindir}/uuid-config
229 %attr(755,root,root) %{_libdir}/libossp-uuid.so
230 %{_libdir}/libossp-uuid.la
231 %dir %{_includedir}/ossp-uuid
232 %{_includedir}/ossp-uuid/uuid.h
233 %{_pkgconfigdir}/ossp-uuid.pc
234 %{_mandir}/man1/uuid-config.1*
235 %{_mandir}/man3/ossp-uuid.3*
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
240 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libossp-uuid++.so
245 %{_libdir}/libossp-uuid++.la
246 %{_includedir}/ossp-uuid/uuid++.hh
247 %{_mandir}/man3/uuid++.3*
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
252 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so
257 %{_libdir}/libossp-uuid_dce.la
258 %{_includedir}/ossp-uuid/uuid_dce.h
262 %defattr(644,root,root,755)
263 %dir %{perl_vendorarch}/OSSP
264 %{perl_vendorarch}/OSSP/uuid.pm
265 %dir %{perl_vendorarch}/auto/OSSP
266 %dir %{perl_vendorarch}/auto/OSSP/uuid
267 %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/uuid/uuid.so
268 %{_mandir}/man3/OSSP::uuid.3*
273 %defattr(644,root,root,755)
274 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
275 %attr(755,root,root) %{php_extensiondir}/%{name}.so
276 %{php_data_dir}/uuid.php
280 %files -n postgresql-uuid
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so
283 %{_datadir}/postgresql/uuid.sql