]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- fix perl and php bindings (install ourselves, their makefile makes wrong assumptions)
[packages/ossp-uuid.git] / ossp-uuid.spec
1 # TODO
2 # - fix bindings compilation (when library is not installed)
3 #
4 # Conditional build:
5 %bcond_without  php             # build PHP binding
6 %bcond_without  perl            # build Perl binding
7 %bcond_without  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:        7
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 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)
26
27 %description
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.
37
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.
49
50 %package devel
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}
55
56 %description devel
57 Development headers and libraries for OSSP uuid.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki OSSP uuid.
61
62 %package c++
63 Summary:        C++ support for Universally Unique Identifier library
64 Summary(pl.UTF-8):      Wiązania C++ dla biblioteki OSSP uuid
65 Group:          Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68 %description c++
69 C++ binding for OSSP uuid library.
70
71 %description c++ -l pl.UTF-8
72 Wiązania C++ dla biblioteki OSSP uuid.
73
74 %package c++-devel
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}
80
81 %description c++-devel
82 C++ development headers and libraries for OSSP uuid.
83
84 %description c++-devel -l pl.UTF-8
85 Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
86
87 %package dce
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}
92
93 %description dce
94 DCE OSSP uuid library.
95
96 %description dce -l pl.UTF-8
97 Biblioteka DCE OSSP uuid.
98
99 %package dce-devel
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}
105
106 %description dce-devel
107 DCE development headers and libraries for OSSP uuid.
108
109 %description dce-devel -l pl.UTF-8
110 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
111
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}
117
118 %description -n perl-uuid
119 Perl OSSP uuid modules, which includes a Data::UUID replacement.
120
121 %description -n perl-uuid -l pl.UTF-8
122 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
123
124 %package -n php-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
131
132 %description -n php-uuid
133 UUID is a PHP extension for the creation of Universally Unique
134 Identifiers (UUID).
135
136 %description -n php-uuid -l pl.UTF-8
137 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
138 identyfikatorów UUID.
139
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}
145
146 %description -n postgresql-uuid
147 PostgreSQL OSSP uuid module.
148
149 %description -n postgresql-uuid -l pl.UTF-8
150 Moduł OSSP uuid dla PostgreSQL-a.
151
152 %prep
153 %setup -q -n uuid-%{version}
154 %patch0 -p1
155
156 %build
157 # Build the library.
158 %configure \
159         --includedir=%{_includedir}/ossp-uuid \
160         --disable-static \
161         --with-dce \
162         --with-cxx \
163         --with%{!?with_perl:out}-perl \
164         --with%{!?with_php:out}-php \
165         --with%{!?with_pgsql:out}-pgsql
166
167 %{__make}
168
169 %install
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT/%{_lib}
172 %{__make} install \
173         WITH_PHP=no \
174         WITH_PERL=no \
175         DESTDIR=$RPM_BUILD_ROOT
176
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
179
180 %if %{with perl}
181 %{__make} pure_install \
182         -C perl \
183         INSTALLDIRS=vendor \
184         DESTDIR=$RPM_BUILD_ROOT
185
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
189 %endif
190
191 %if %{with php}
192 install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d}
193 %{__make} install \
194         -C php \
195         -f Makefile.local \
196         EXTDIR=%{php_extensiondir} \
197         DESTDIR=$RPM_BUILD_ROOT
198
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
202 extension=%{name}.so
203 EOF
204 %endif
205
206 %clean
207 rm -rf $RPM_BUILD_ROOT
208
209 %post   -p /sbin/ldconfig
210 %postun -p /sbin/ldconfig
211
212 %post   c++ -p /sbin/ldconfig
213 %postun c++ -p /sbin/ldconfig
214
215 %post   dce -p /sbin/ldconfig
216 %postun dce -p /sbin/ldconfig
217
218 %files
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*
225
226 %files devel
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*
236
237 %files c++
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
241
242 %files c++-devel
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*
248
249 %files dce
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
253
254 %files dce-devel
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
259
260 %if %{with perl}
261 %files -n perl-uuid
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*
269 %endif
270
271 %if %{with php}
272 %files -n php-uuid
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
277 %endif
278
279 %if %{with pgsql}
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
284 %endif
This page took 0.056733 seconds and 4 git commands to generate.