]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- rel 11
[packages/ossp-uuid.git] / ossp-uuid.spec
1 #
2 # Conditional build:
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
6 %bcond_without  static_libs     # don't build static libraries
7
8 Summary:        Universally Unique Identifier library
9 Summary(pl.UTF-8):      Biblioteka unikalnych identyfikatorów UUID
10 Name:           ossp-uuid
11 Version:        1.6.2
12 Release:        11
13 License:        MIT
14 Group:          Libraries
15 Source0:        ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
16 # Source0-md5:  5db0d43a9022a6ebbbc25337ae28942f
17 Patch0:         uuid-ossp-prefix.patch
18 URL:            http://www.ossp.org/pkg/lib/uuid/
19 %{?with_php:BuildRequires:      /usr/bin/php}
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  libtool
22 %{?with_perl:BuildRequires:     perl-devel}
23 %{?with_php:BuildRequires:      php-devel >= 3:5.0.0}
24 %{?with_pgsql:BuildRequires:    postgresql-backend-devel}
25 %{?with_pgsql:BuildRequires:    postgresql-devel}
26 BuildRequires:  rpmbuild(macros) >= 1.519
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
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
49 oraz PHP:4/5. Istnieje też opcjonalna warstwa kompatybilności dla API
50 ISO-C DCE-1.1 i perlowego Data::UUID.
51
52 %package devel
53 Summary:        Development files for Universally Unique Identifier library
54 Summary(pl.UTF-8):      Pliki programistyczne biblioteki OSSP uuid
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57
58 %description devel
59 Development headers and libraries for OSSP uuid.
60
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki OSSP uuid.
63
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
76 %package c++
77 Summary:        C++ support for Universally Unique Identifier library
78 Summary(pl.UTF-8):      Wiązania C++ dla biblioteki OSSP uuid
79 Group:          Libraries
80 Requires:       %{name} = %{version}-%{release}
81
82 %description c++
83 C++ binding for OSSP uuid library.
84
85 %description c++ -l pl.UTF-8
86 Wiązania C++ dla biblioteki OSSP uuid.
87
88 %package c++-devel
89 Summary:        C++ development support for Universally Unique Identifier library
90 Summary(pl.UTF-8):      Pliki programistyczne wiązania C++ biblioteki OSSP uuid
91 Group:          Development/Libraries
92 Requires:       %{name}-c++ = %{version}-%{release}
93 Requires:       %{name}-devel = %{version}-%{release}
94 Requires:       libstdc++-devel
95
96 %description c++-devel
97 C++ development headers and libraries for OSSP uuid.
98
99 %description c++-devel -l pl.UTF-8
100 Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
101
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
114 %package dce
115 Summary:        DCE support for Universally Unique Identifier library
116 Summary(pl.UTF-8):      Obsługa DCE dla biblioteki OSSP uuid
117 Group:          Development/Libraries
118 Requires:       %{name} = %{version}-%{release}
119
120 %description dce
121 DCE OSSP uuid library.
122
123 %description dce -l pl.UTF-8
124 Biblioteka DCE OSSP uuid.
125
126 %package dce-devel
127 Summary:        DCE development support for Universally Unique Identifier library
128 Summary(pl.UTF-8):      Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid
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
136 %description dce-devel -l pl.UTF-8
137 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
138
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
153 %package -n perl-uuid
154 Summary:        OSSP uuid Perl Binding
155 Summary(pl.UTF-8):      Perlowe wiązania biblioteki OSSP uuid
156 Group:          Development/Libraries
157 Requires:       %{name} = %{version}-%{release}
158
159 %description -n perl-uuid
160 Perl OSSP uuid modules, which includes a Data::UUID replacement.
161
162 %description -n perl-uuid -l pl.UTF-8
163 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
164
165 %package -n php-uuid
166 Summary:        PHP support for Universally Unique Identifier library
167 Summary(pl.UTF-8):      Wiązania PHP dla biblioteki OSSP UUID
168 Group:          Development/Libraries
169 Requires:       %{name} = %{version}-%{release}
170 %{?requires_php_extension}
171 Requires:       php-common >= 4:5.0.4
172
173 %description -n php-uuid
174 UUID is a PHP extension for the creation of Universally Unique
175 Identifiers (UUID).
176
177 %description -n php-uuid -l pl.UTF-8
178 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
179 identyfikatorów UUID.
180
181 %package -n postgresql-uuid
182 Summary:        OSSP uuid bindings for PostgreSQL
183 Summary(pl.UTF-8):      Wiązania OSSP uuid dla PostgreSQL-a
184 Group:          Development/Libraries
185 Requires:       %{name} = %{version}-%{release}
186
187 %description -n postgresql-uuid
188 PostgreSQL OSSP uuid module.
189
190 %description -n postgresql-uuid -l pl.UTF-8
191 Moduł OSSP uuid dla PostgreSQL-a.
192
193 %prep
194 %setup -q -n uuid-%{version}
195 %patch0 -p1
196
197 %build
198 # Build the library.
199 %configure \
200         --includedir=%{_includedir}/ossp-uuid \
201         %{!?with_static_libs:--disable-static} \
202         --with-dce \
203         --with-cxx \
204         --with%{!?with_perl:out}-perl \
205         --with%{!?with_php:out}-php \
206         --with%{!?with_pgsql:out}-pgsql
207
208 %{__make}
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT/%{_lib}
213 %{__make} install \
214         WITH_PHP=no \
215         WITH_PERL=no \
216         DESTDIR=$RPM_BUILD_ROOT
217
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
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
247 %clean
248 rm -rf $RPM_BUILD_ROOT
249
250 %post   -p /sbin/ldconfig
251 %postun -p /sbin/ldconfig
252
253 %post   c++ -p /sbin/ldconfig
254 %postun c++ -p /sbin/ldconfig
255
256 %post   dce -p /sbin/ldconfig
257 %postun dce -p /sbin/ldconfig
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
263 %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
264 %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
265 %{_mandir}/man1/uuid.1*
266
267 %files devel
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_bindir}/uuid-config
270 %attr(755,root,root) %{_libdir}/libossp-uuid.so
271 %{_libdir}/libossp-uuid.la
272 %dir %{_includedir}/ossp-uuid
273 %{_includedir}/ossp-uuid/uuid.h
274 %{_pkgconfigdir}/ossp-uuid.pc
275 %{_mandir}/man1/uuid-config.1*
276 %{_mandir}/man3/ossp-uuid.3*
277
278 %if %{with static_libs}
279 %files static
280 %defattr(644,root,root,755)
281 %{_libdir}/libossp-uuid.a
282 %endif
283
284 %files c++
285 %defattr(644,root,root,755)
286 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
287 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
288
289 %files c++-devel
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_libdir}/libossp-uuid++.so
292 %{_libdir}/libossp-uuid++.la
293 %{_includedir}/ossp-uuid/uuid++.hh
294 %{_mandir}/man3/uuid++.3*
295
296 %if %{with static_libs}
297 %files c++-static
298 %defattr(644,root,root,755)
299 %{_libdir}/libossp-uuid++.a
300 %endif
301
302 %files dce
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
305 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
306
307 %files dce-devel
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so
310 %{_libdir}/libossp-uuid_dce.la
311 %{_includedir}/ossp-uuid/uuid_dce.h
312
313 %if %{with static_libs}
314 %files dce-static
315 %defattr(644,root,root,755)
316 %{_libdir}/libossp-uuid_dce.a
317 %endif
318
319 %if %{with perl}
320 %files -n perl-uuid
321 %defattr(644,root,root,755)
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
327 %{_mandir}/man3/OSSP::uuid.3*
328 %endif
329
330 %if %{with php}
331 %files -n php-uuid
332 %defattr(644,root,root,755)
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
336 %endif
337
338 %if %{with pgsql}
339 %files -n postgresql-uuid
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so
342 %{_datadir}/postgresql/uuid.sql
343 %endif
This page took 0.100894 seconds and 3 git commands to generate.