]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - fix bindings compilation (when library is not installed) | |
3 | # | |
4 | # Conditional build: | |
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 | |
8 | ||
9 | Summary: Universally Unique Identifier library | |
10 | Summary(pl.UTF-8): Biblioteka unikalnych identyfikatorów UUID | |
11 | Name: ossp-uuid | |
12 | Version: 1.6.2 | |
13 | Release: 9 | |
14 | License: MIT | |
15 | Group: Libraries | |
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) | |
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 | ||
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. | |
52 | ||
53 | %package devel | |
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} | |
58 | ||
59 | %description devel | |
60 | Development headers and libraries for OSSP uuid. | |
61 | ||
62 | %description devel -l pl.UTF-8 | |
63 | Pliki nagłówkowe biblioteki OSSP uuid. | |
64 | ||
65 | %package c++ | |
66 | Summary: C++ support for Universally Unique Identifier library | |
67 | Summary(pl.UTF-8): Wiązania C++ dla biblioteki OSSP uuid | |
68 | Group: Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
70 | ||
71 | %description c++ | |
72 | C++ binding for OSSP uuid library. | |
73 | ||
74 | %description c++ -l pl.UTF-8 | |
75 | Wiązania C++ dla biblioteki OSSP uuid. | |
76 | ||
77 | %package c++-devel | |
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} | |
83 | Requires: libstdc++-devel | |
84 | ||
85 | %description c++-devel | |
86 | C++ development headers and libraries for OSSP uuid. | |
87 | ||
88 | %description c++-devel -l pl.UTF-8 | |
89 | Pliki programistyczne wiązania C++ biblioteki OSSP uuid. | |
90 | ||
91 | %package dce | |
92 | Summary: DCE support for Universally Unique Identifier library | |
93 | Summary(pl.UTF-8): Obsługa DCE dla biblioteki OSSP uuid | |
94 | Group: Development/Libraries | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description dce | |
98 | DCE OSSP uuid library. | |
99 | ||
100 | %description dce -l pl.UTF-8 | |
101 | Biblioteka DCE OSSP uuid. | |
102 | ||
103 | %package dce-devel | |
104 | Summary: DCE development support for Universally Unique Identifier library | |
105 | Summary(pl.UTF-8): Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid | |
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 | ||
113 | %description dce-devel -l pl.UTF-8 | |
114 | Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid. | |
115 | ||
116 | %package -n perl-uuid | |
117 | Summary: OSSP uuid Perl Binding | |
118 | Summary(pl.UTF-8): Perlowe wiązania biblioteki OSSP uuid | |
119 | Group: Development/Libraries | |
120 | Requires: %{name} = %{version}-%{release} | |
121 | ||
122 | %description -n perl-uuid | |
123 | Perl OSSP uuid modules, which includes a Data::UUID replacement. | |
124 | ||
125 | %description -n perl-uuid -l pl.UTF-8 | |
126 | Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID. | |
127 | ||
128 | %package -n php-uuid | |
129 | Summary: PHP support for Universally Unique Identifier library | |
130 | Summary(pl.UTF-8): Wiązania PHP dla biblioteki OSSP UUID | |
131 | Group: Development/Libraries | |
132 | Requires: %{name} = %{version}-%{release} | |
133 | %{?requires_php_extension} | |
134 | Requires: php-common >= 4:5.0.4 | |
135 | ||
136 | %description -n php-uuid | |
137 | UUID is a PHP extension for the creation of Universally Unique | |
138 | Identifiers (UUID). | |
139 | ||
140 | %description -n php-uuid -l pl.UTF-8 | |
141 | UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych | |
142 | identyfikatorów UUID. | |
143 | ||
144 | %package -n postgresql-uuid | |
145 | Summary: OSSP uuid bindings for PostgreSQL | |
146 | Summary(pl.UTF-8): Wiązania OSSP uuid dla PostgreSQL-a | |
147 | Group: Development/Libraries | |
148 | Requires: %{name} = %{version}-%{release} | |
149 | ||
150 | %description -n postgresql-uuid | |
151 | PostgreSQL OSSP uuid module. | |
152 | ||
153 | %description -n postgresql-uuid -l pl.UTF-8 | |
154 | Moduł OSSP uuid dla PostgreSQL-a. | |
155 | ||
156 | %prep | |
157 | %setup -q -n uuid-%{version} | |
158 | %patch0 -p1 | |
159 | ||
160 | %build | |
161 | # Build the library. | |
162 | %configure \ | |
163 | --includedir=%{_includedir}/ossp-uuid \ | |
164 | --disable-static \ | |
165 | --with-dce \ | |
166 | --with-cxx \ | |
167 | --with%{!?with_perl:out}-perl \ | |
168 | --with%{!?with_php:out}-php \ | |
169 | --with%{!?with_pgsql:out}-pgsql | |
170 | ||
171 | %{__make} | |
172 | ||
173 | %install | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | install -d $RPM_BUILD_ROOT/%{_lib} | |
176 | %{__make} install \ | |
177 | WITH_PHP=no \ | |
178 | WITH_PERL=no \ | |
179 | DESTDIR=$RPM_BUILD_ROOT | |
180 | ||
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 | ||
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 | ||
210 | %clean | |
211 | rm -rf $RPM_BUILD_ROOT | |
212 | ||
213 | %post -p /sbin/ldconfig | |
214 | %postun -p /sbin/ldconfig | |
215 | ||
216 | %post c++ -p /sbin/ldconfig | |
217 | %postun c++ -p /sbin/ldconfig | |
218 | ||
219 | %post dce -p /sbin/ldconfig | |
220 | %postun dce -p /sbin/ldconfig | |
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 | |
226 | %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.* | |
227 | %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16 | |
228 | %{_mandir}/man1/uuid.1* | |
229 | ||
230 | %files devel | |
231 | %defattr(644,root,root,755) | |
232 | %attr(755,root,root) %{_bindir}/uuid-config | |
233 | %attr(755,root,root) %{_libdir}/libossp-uuid.so | |
234 | %{_libdir}/libossp-uuid.la | |
235 | %dir %{_includedir}/ossp-uuid | |
236 | %{_includedir}/ossp-uuid/uuid.h | |
237 | %{_pkgconfigdir}/ossp-uuid.pc | |
238 | %{_mandir}/man1/uuid-config.1* | |
239 | %{_mandir}/man3/ossp-uuid.3* | |
240 | ||
241 | %files c++ | |
242 | %defattr(644,root,root,755) | |
243 | %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.* | |
244 | %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16 | |
245 | ||
246 | %files c++-devel | |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_libdir}/libossp-uuid++.so | |
249 | %{_libdir}/libossp-uuid++.la | |
250 | %{_includedir}/ossp-uuid/uuid++.hh | |
251 | %{_mandir}/man3/uuid++.3* | |
252 | ||
253 | %files dce | |
254 | %defattr(644,root,root,755) | |
255 | %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.* | |
256 | %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16 | |
257 | ||
258 | %files dce-devel | |
259 | %defattr(644,root,root,755) | |
260 | %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so | |
261 | %{_libdir}/libossp-uuid_dce.la | |
262 | %{_includedir}/ossp-uuid/uuid_dce.h | |
263 | ||
264 | %if %{with perl} | |
265 | %files -n perl-uuid | |
266 | %defattr(644,root,root,755) | |
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 | |
272 | %{_mandir}/man3/OSSP::uuid.3* | |
273 | %endif | |
274 | ||
275 | %if %{with php} | |
276 | %files -n php-uuid | |
277 | %defattr(644,root,root,755) | |
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 | |
281 | %endif | |
282 | ||
283 | %if %{with pgsql} | |
284 | %files -n postgresql-uuid | |
285 | %defattr(644,root,root,755) | |
286 | %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so | |
287 | %{_datadir}/postgresql/uuid.sql | |
288 | %endif |