]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- BR: libstdc++-devel
[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 %{?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
84 %description c++-devel
85 C++ development headers and libraries for OSSP uuid.
86
87 %description c++-devel -l pl.UTF-8
88 Pliki programistyczne wiązania C++ biblioteki OSSP uuid.
89
90 %package dce
91 Summary:        DCE support for Universally Unique Identifier library
92 Summary(pl.UTF-8):      Obsługa DCE dla biblioteki OSSP uuid
93 Group:          Development/Libraries
94 Requires:       %{name} = %{version}-%{release}
95
96 %description dce
97 DCE OSSP uuid library.
98
99 %description dce -l pl.UTF-8
100 Biblioteka DCE OSSP uuid.
101
102 %package dce-devel
103 Summary:        DCE development support for Universally Unique Identifier library
104 Summary(pl.UTF-8):      Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid
105 Group:          Development/Libraries
106 Requires:       %{name}-dce = %{version}-%{release}
107 Requires:       %{name}-devel = %{version}-%{release}
108
109 %description dce-devel
110 DCE development headers and libraries for OSSP uuid.
111
112 %description dce-devel -l pl.UTF-8
113 Pliki programistyczne obsługi DCE dla biblioteki OSSP uuid.
114
115 %package -n perl-uuid
116 Summary:        OSSP uuid Perl Binding
117 Summary(pl.UTF-8):      Perlowe wiązania biblioteki OSSP uuid
118 Group:          Development/Libraries
119 Requires:       %{name} = %{version}-%{release}
120
121 %description -n perl-uuid
122 Perl OSSP uuid modules, which includes a Data::UUID replacement.
123
124 %description -n perl-uuid -l pl.UTF-8
125 Moduły Perla OSSP uuid, zawierające zamiennik Data::UUID.
126
127 %package -n php-uuid
128 Summary:        PHP support for Universally Unique Identifier library
129 Summary(pl.UTF-8):      Wiązania PHP dla biblioteki OSSP UUID
130 Group:          Development/Libraries
131 Requires:       %{name} = %{version}-%{release}
132 %{?requires_php_extension}
133 Requires:       php-common >= 4:5.0.4
134
135 %description -n php-uuid
136 UUID is a PHP extension for the creation of Universally Unique
137 Identifiers (UUID).
138
139 %description -n php-uuid -l pl.UTF-8
140 UUID to rozrzeszenie PHP do tworzenia całkowicie unikalnych
141 identyfikatorów UUID.
142
143 %package -n postgresql-uuid
144 Summary:        OSSP uuid bindings for PostgreSQL
145 Summary(pl.UTF-8):      Wiązania OSSP uuid dla PostgreSQL-a
146 Group:          Development/Libraries
147 Requires:       %{name} = %{version}-%{release}
148
149 %description -n postgresql-uuid
150 PostgreSQL OSSP uuid module.
151
152 %description -n postgresql-uuid -l pl.UTF-8
153 Moduł OSSP uuid dla PostgreSQL-a.
154
155 %prep
156 %setup -q -n uuid-%{version}
157 %patch0 -p1
158
159 %build
160 # Build the library.
161 %configure \
162         --includedir=%{_includedir}/ossp-uuid \
163         --disable-static \
164         --with-dce \
165         --with-cxx \
166         --with%{!?with_perl:out}-perl \
167         --with%{!?with_php:out}-php \
168         --with%{!?with_pgsql:out}-pgsql
169
170 %{__make}
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT/%{_lib}
175 %{__make} install \
176         WITH_PHP=no \
177         WITH_PERL=no \
178         DESTDIR=$RPM_BUILD_ROOT
179
180 mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib}
181 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so
182
183 %if %{with perl}
184 %{__make} pure_install \
185         -C perl \
186         INSTALLDIRS=vendor \
187         DESTDIR=$RPM_BUILD_ROOT
188
189 rm $RPM_BUILD_ROOT%{perl_vendorarch}/OSSP/uuid.pod
190 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/.packlist
191 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/OSSP/uuid/uuid.bs
192 %endif
193
194 %if %{with php}
195 install -d $RPM_BUILD_ROOT{%{php_data_dir},%{php_sysconfdir}/conf.d}
196 %{__make} install \
197         -C php \
198         -f Makefile.local \
199         EXTDIR=%{php_extensiondir} \
200         DESTDIR=$RPM_BUILD_ROOT
201
202 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{php_data_dir}}/uuid.php
203 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini
204 ; Enable %{name} extension module
205 extension=%{name}.so
206 EOF
207 %endif
208
209 %clean
210 rm -rf $RPM_BUILD_ROOT
211
212 %post   -p /sbin/ldconfig
213 %postun -p /sbin/ldconfig
214
215 %post   c++ -p /sbin/ldconfig
216 %postun c++ -p /sbin/ldconfig
217
218 %post   dce -p /sbin/ldconfig
219 %postun dce -p /sbin/ldconfig
220
221 %files
222 %defattr(644,root,root,755)
223 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
224 %attr(755,root,root) %{_bindir}/uuid
225 %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
226 %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
227 %{_mandir}/man1/uuid.1*
228
229 %files devel
230 %defattr(644,root,root,755)
231 %attr(755,root,root) %{_bindir}/uuid-config
232 %attr(755,root,root) %{_libdir}/libossp-uuid.so
233 %{_libdir}/libossp-uuid.la
234 %dir %{_includedir}/ossp-uuid
235 %{_includedir}/ossp-uuid/uuid.h
236 %{_pkgconfigdir}/ossp-uuid.pc
237 %{_mandir}/man1/uuid-config.1*
238 %{_mandir}/man3/ossp-uuid.3*
239
240 %files c++
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
244
245 %files c++-devel
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/libossp-uuid++.so
248 %{_libdir}/libossp-uuid++.la
249 %{_includedir}/ossp-uuid/uuid++.hh
250 %{_mandir}/man3/uuid++.3*
251
252 %files dce
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
255 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
256
257 %files dce-devel
258 %defattr(644,root,root,755)
259 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so
260 %{_libdir}/libossp-uuid_dce.la
261 %{_includedir}/ossp-uuid/uuid_dce.h
262
263 %if %{with perl}
264 %files -n perl-uuid
265 %defattr(644,root,root,755)
266 %dir %{perl_vendorarch}/OSSP
267 %{perl_vendorarch}/OSSP/uuid.pm
268 %dir %{perl_vendorarch}/auto/OSSP
269 %dir %{perl_vendorarch}/auto/OSSP/uuid
270 %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/uuid/uuid.so
271 %{_mandir}/man3/OSSP::uuid.3*
272 %endif
273
274 %if %{with php}
275 %files -n php-uuid
276 %defattr(644,root,root,755)
277 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
278 %attr(755,root,root) %{php_extensiondir}/%{name}.so
279 %{php_data_dir}/uuid.php
280 %endif
281
282 %if %{with pgsql}
283 %files -n postgresql-uuid
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_libdir}/postgresql/ossp-uuid.so
286 %{_datadir}/postgresql/uuid.sql
287 %endif
This page took 0.105409 seconds and 3 git commands to generate.