]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- php bindings need libtoolize
[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 %define         php_name        php55
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:        23
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 Patch1:         php3.patch
20 URL:            http://www.ossp.org/pkg/lib/uuid/
21 %{?with_php:BuildRequires:      %{php_name}-devel}
22 %{?with_php:BuildRequires:      %{php_name}-program}
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libtool
25 %{?with_perl:BuildRequires:     perl-devel}
26 %{?with_pgsql:BuildRequires:    postgresql-backend-devel}
27 %{?with_pgsql:BuildRequires:    postgresql-devel}
28 BuildRequires:  rpmbuild(macros) >= 1.519
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 OSSP uuid is a ISO-C:1999 application programming interface (API) and
33 corresponding command line interface (CLI) for the generation of DCE
34 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique
35 Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1
36 (time and node based), version 3 (name based, MD5), version 4 (random
37 number based) and version 5 (name based, SHA-1). Additional API
38 bindings are provided for the languages ISO-C++:1998, Perl:5 and
39 PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1
40 and Perl Data::UUID APIs.
41
42 %description -l pl.UTF-8
43 OSSP uuid to interfejs programistyczny (API) ISO-C:1999 i
44 odpowiadający mu interfejs linii poleceń (CLI) do generowania
45 całkowicie unikalnych identyfikatorów UUID (Universally Unique
46 Identifier) zgodnych z DCE 1.1, ISO/IEC 11578:1996 i RFC 4122.
47 Obsługuje wariant DCE 1.1 UUID-ów w wersji 1 (oparty na czasie i
48 węzłach), w wersji 3 (oparty na nazwie i MD5), w wersji 4 (oparty na
49 liczbach losowych) oraz w wersji 5 (oparty na nazwach i SHA-1).
50 Załączone są dodatkowe wiązania API do języków ISO-C++:1998, Perl:5
51 oraz PHP:4/5. Istnieje też opcjonalna warstwa kompatybilności dla API
52 ISO-C DCE-1.1 i perlowego Data::UUID.
53
54 %package devel
55 Summary:        Development files for Universally Unique Identifier library
56 Summary(pl.UTF-8):      Pliki programistyczne biblioteki OSSP uuid
57 Group:          Development/Libraries
58 Requires:       %{name} = %{version}-%{release}
59
60 %description devel
61 Development headers and libraries for OSSP uuid.
62
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe biblioteki OSSP uuid.
65
66 %package static
67 Summary:        Universally Unique Identifier library - static library
68 Summary(pl.UTF-8):      Biblioteka statyczna OSSP uuid
69 Group:          Development/Libraries
70 Requires:       %{name}-devel = %{version}-%{release}
71
72 %description static
73 Universally Unique Identifier library - static library
74
75 %description static -l pl.UTF-8
76 Biblioteka statyczna OSSP uuid
77
78 %package c++
79 Summary:        C++ support for Universally Unique Identifier library
80 Summary(pl.UTF-8):      Wiązania C++ dla biblioteki OSSP uuid
81 Group:          Libraries
82 Requires:       %{name} = %{version}-%{release}
83
84 %description c++
85 C++ binding for OSSP uuid library.
86
87 %description c++ -l pl.UTF-8
88 Wiązania C++ dla biblioteki OSSP uuid.
89
90 %package c++-devel
91 Summary:        C++ development support for Universally Unique Identifier library
92 Summary(pl.UTF-8):      Pliki programistyczne wiązania C++ biblioteki OSSP uuid
93 Group:          Development/Libraries
94 Requires:       %{name}-c++ = %{version}-%{release}
95 Requires:       %{name}-devel = %{version}-%{release}
96 Requires:       libstdc++-devel
97
98 %description c++-devel
99 C++ development headers and libraries for OSSP uuid.
100
101 %description c++-devel -l pl.UTF-8
102 Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
103
104 %package c++-static
105 Summary:        C++ support for Universally Unique Identifier library - static library
106 Summary(pl.UTF-8):      Wiązania C++ dla biblioteki OSSP uuid - biblioteka statyczna
107 Group:          Development/Libraries
108 Requires:       %{name}-c++-devel = %{version}-%{release}
109
110 %description c++-static
111 C++ support for Universally Unique Identifier library - static library
112
113 %description c++-static -l pl.UTF-8
114 Wiązania C++ dla biblioteki OSSP uuid - biblioteka statyczna
115
116 %package dce
117 Summary:        DCE support for Universally Unique Identifier library
118 Summary(pl.UTF-8):      Obsługa DCE dla biblioteki OSSP uuid
119 Group:          Development/Libraries
120 Requires:       %{name} = %{version}-%{release}
121
122 %description dce
123 DCE OSSP uuid library.
124
125 %description dce -l pl.UTF-8
126 Biblioteka DCE OSSP uuid.
127
128 %package dce-devel
129 Summary:        DCE development support for Universally Unique Identifier library
130 Summary(pl.UTF-8):      Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid
131 Group:          Development/Libraries
132 Requires:       %{name}-dce = %{version}-%{release}
133 Requires:       %{name}-devel = %{version}-%{release}
134
135 %description dce-devel
136 DCE development headers and libraries for OSSP uuid.
137
138 %description dce-devel -l pl.UTF-8
139 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
140
141 %package dce-static
142 Summary:        DCE development support for Universally Unique Identifier library - static library
143 Summary(pl.UTF-8):      Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid - biblioteka statyczna
144 Group:          Development/Libraries
145 Requires:       %{name}-dce-devel = %{version}-%{release}
146
147 %description dce-static
148 DCE development support for Universally Unique Identifier library -
149 static library
150
151 %description dce-static -l pl.UTF-8
152 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid -
153 biblioteka statyczna
154
155 %package -n perl-uuid
156 Summary:        OSSP uuid Perl Binding
157 Summary(pl.UTF-8):      Perlowe wiązania biblioteki OSSP uuid
158 Group:          Development/Libraries
159 Requires:       %{name} = %{version}-%{release}
160
161 %description -n perl-uuid
162 Perl OSSP uuid modules, which includes a Data::UUID replacement.
163
164 %description -n perl-uuid -l pl.UTF-8
165 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
166
167 %package -n %{php_name}-uuid
168 Summary:        PHP support for Universally Unique Identifier library
169 Summary(pl.UTF-8):      Wiązania PHP dla biblioteki OSSP UUID
170 Group:          Development/Libraries
171 Requires:       %{name} = %{version}-%{release}
172 %{?requires_php_extension}
173
174 %description -n %{php_name}-uuid
175 UUID is a PHP extension for the creation of Universally Unique
176 Identifiers (UUID).
177
178 %description -n %{php_name}-uuid -l pl.UTF-8
179 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
180 identyfikatorów UUID.
181
182 %package -n postgresql-uuid
183 Summary:        OSSP uuid bindings for PostgreSQL
184 Summary(pl.UTF-8):      Wiązania OSSP uuid dla PostgreSQL-a
185 Group:          Development/Libraries
186 Requires:       %{name} = %{version}-%{release}
187
188 %description -n postgresql-uuid
189 PostgreSQL OSSP uuid module.
190
191 %description -n postgresql-uuid -l pl.UTF-8
192 Moduł OSSP uuid dla PostgreSQL-a.
193
194 %prep
195 %setup -q -n uuid-%{version}
196 %patch0 -p1
197 %patch1 -p1
198
199 %build
200 %if %{with php}
201 cd php
202 %{__libtoolize}
203 cd ..
204 %endif
205 # Build the library.
206 %configure \
207         --includedir=%{_includedir}/ossp-uuid \
208         %{!?with_static_libs:--disable-static} \
209         --with-dce \
210         --with-cxx \
211         --with%{!?with_perl:out}-perl \
212         --with%{!?with_php:out}-php PHP=php \
213         --with%{!?with_pgsql:out}-pgsql
214
215 %{__make}
216
217 %install
218 rm -rf $RPM_BUILD_ROOT
219 install -d $RPM_BUILD_ROOT/%{_lib}
220 %{__make} install \
221         WITH_PHP=no \
222         WITH_PERL=no \
223         DESTDIR=$RPM_BUILD_ROOT
224
225 mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib}
226 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so
227
228 %if %{with perl}
229 %{__make} pure_install \
230         -C perl \
231         INSTALLDIRS=vendor \
232         DESTDIR=$RPM_BUILD_ROOT
233
234 rm $RPM_BUILD_ROOT%{perl_vendorarch}/OSSP/uuid.pod
235 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/.packlist
236 %endif
237
238 %if %{with php}
239 install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d}
240 %{__make} install \
241         -C php \
242         -f Makefile.local \
243         EXTDIR=%{php_extensiondir} \
244         DESTDIR=$RPM_BUILD_ROOT
245
246 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{php_data_dir}}/uuid.php
247 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini
248 ; Enable %{name} extension module
249 extension=%{name}.so
250 EOF
251 %endif
252
253 %clean
254 rm -rf $RPM_BUILD_ROOT
255
256 %post   -p /sbin/ldconfig
257 %postun -p /sbin/ldconfig
258
259 %post   c++ -p /sbin/ldconfig
260 %postun c++ -p /sbin/ldconfig
261
262 %post   dce -p /sbin/ldconfig
263 %postun dce -p /sbin/ldconfig
264
265 %files
266 %defattr(644,root,root,755)
267 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
268 %attr(755,root,root) %{_bindir}/uuid
269 %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
270 %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
271 %{_mandir}/man1/uuid.1*
272
273 %files devel
274 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_bindir}/uuid-config
276 %attr(755,root,root) %{_libdir}/libossp-uuid.so
277 %{_libdir}/libossp-uuid.la
278 %dir %{_includedir}/ossp-uuid
279 %{_includedir}/ossp-uuid/uuid.h
280 %{_pkgconfigdir}/ossp-uuid.pc
281 %{_mandir}/man1/uuid-config.1*
282 %{_mandir}/man3/ossp-uuid.3*
283
284 %if %{with static_libs}
285 %files static
286 %defattr(644,root,root,755)
287 %{_libdir}/libossp-uuid.a
288 %endif
289
290 %files c++
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
293 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
294
295 %files c++-devel
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_libdir}/libossp-uuid++.so
298 %{_libdir}/libossp-uuid++.la
299 %{_includedir}/ossp-uuid/uuid++.hh
300 %{_mandir}/man3/uuid++.3*
301
302 %if %{with static_libs}
303 %files c++-static
304 %defattr(644,root,root,755)
305 %{_libdir}/libossp-uuid++.a
306 %endif
307
308 %files dce
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
311 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
312
313 %files dce-devel
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so
316 %{_libdir}/libossp-uuid_dce.la
317 %{_includedir}/ossp-uuid/uuid_dce.h
318
319 %if %{with static_libs}
320 %files dce-static
321 %defattr(644,root,root,755)
322 %{_libdir}/libossp-uuid_dce.a
323 %endif
324
325 %if %{with perl}
326 %files -n perl-uuid
327 %defattr(644,root,root,755)
328 %dir %{perl_vendorarch}/OSSP
329 %{perl_vendorarch}/OSSP/uuid.pm
330 %dir %{perl_vendorarch}/auto/OSSP
331 %dir %{perl_vendorarch}/auto/OSSP/uuid
332 %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/uuid/uuid.so
333 %{_mandir}/man3/OSSP::uuid.3*
334 %endif
335
336 %if %{with php}
337 %files -n %{php_name}-uuid
338 %defattr(644,root,root,755)
339 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
340 %attr(755,root,root) %{php_extensiondir}/%{name}.so
341 %{php_data_dir}/uuid.php
342 %endif
343
344 %if %{with pgsql}
345 %files -n postgresql-uuid
346 %defattr(644,root,root,755)
347 %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so
348 %{_datadir}/postgresql/uuid.sql
349 %endif
This page took 0.105361 seconds and 3 git commands to generate.