]>
Commit | Line | Data |
---|---|---|
8becfe02 | 1 | # TODO |
e73d7b29 | 2 | # - fix bindings compilation (when library is not installed) |
ce1a1410 ER |
3 | # |
4 | # Conditional build: | |
660f1672 ER |
5 | %bcond_with php # build PHP binding |
6 | %bcond_with perl # build Perl binding | |
7 | %bcond_with pgsql # build postgresql binding | |
ce1a1410 | 8 | # |
8becfe02 | 9 | Summary: Universally Unique Identifier library |
660f1672 | 10 | Name: ossp-uuid |
e531fcde | 11 | Version: 1.6.2 |
364139c7 | 12 | Release: 6 |
8becfe02 ER |
13 | License: MIT |
14 | Group: Libraries | |
15 | URL: http://www.ossp.org/pkg/lib/uuid/ | |
660f1672 | 16 | Source0: ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz |
e531fcde | 17 | # Source0-md5: 5db0d43a9022a6ebbbc25337ae28942f |
660f1672 | 18 | Patch0: uuid-ossp-prefix.patch |
8becfe02 | 19 | BuildRequires: libtool |
f832c0e2 | 20 | %{?with_php:BuildRequires: php-devel >= 3:5.0.0} |
ce1a1410 | 21 | %{?with_pgsql:BuildRequires: postgresql-devel} |
f832c0e2 | 22 | BuildRequires: rpmbuild(macros) >= 1.344 |
8becfe02 ER |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | OSSP uuid is a ISO-C:1999 application programming interface (API) and | |
27 | corresponding command line interface (CLI) for the generation of DCE | |
28 | 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique | |
29 | Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 | |
30 | (time and node based), version 3 (name based, MD5), version 4 (random | |
31 | number based) and version 5 (name based, SHA-1). Additional API | |
32 | bindings are provided for the languages ISO-C++:1998, Perl:5 and | |
33 | PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 | |
34 | and Perl Data::UUID APIs. | |
35 | ||
36 | %package devel | |
37 | Summary: Development support for Universally Unique Identifier library | |
38 | Group: Development/Libraries | |
39 | Requires: %{name} = %{version}-%{release} | |
40 | ||
41 | %description devel | |
42 | Development headers and libraries for OSSP uuid. | |
43 | ||
44 | %package c++ | |
45 | Summary: C++ support for Universally Unique Identifier library | |
46 | Group: Libraries | |
47 | Requires: %{name} = %{version}-%{release} | |
48 | ||
49 | %description c++ | |
50 | C++ libraries for OSSP uuid. | |
51 | ||
52 | %package c++-devel | |
53 | Summary: C++ development support for Universally Unique Identifier library | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-c++ = %{version}-%{release} | |
56 | Requires: %{name}-devel = %{version}-%{release} | |
57 | ||
58 | %description c++-devel | |
59 | C++ development headers and libraries for OSSP uuid. | |
60 | ||
61 | %package dce | |
62 | Summary: DCE support for Universally Unique Identifier library | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
65 | ||
66 | %description dce | |
67 | DCE OSSP uuid library. | |
68 | ||
69 | %package dce-devel | |
70 | Summary: DCE development support for Universally Unique Identifier library | |
71 | Group: Development/Libraries | |
72 | Requires: %{name}-dce = %{version}-%{release} | |
73 | Requires: %{name}-devel = %{version}-%{release} | |
74 | ||
75 | %description dce-devel | |
76 | DCE development headers and libraries for OSSP uuid. | |
77 | ||
660f1672 | 78 | %package -n perl-uuid |
f832c0e2 | 79 | Summary: OSSP uuid Perl Binding |
8becfe02 ER |
80 | Group: Development/Libraries |
81 | Requires: %{name} = %{version}-%{release} | |
82 | ||
660f1672 | 83 | %description -n perl-uuid |
8becfe02 ER |
84 | Perl OSSP uuid modules, which includes a Data::UUID replacement. |
85 | ||
660f1672 | 86 | %package -n php-uuid |
8becfe02 ER |
87 | Summary: PHP support for Universally Unique Identifier library |
88 | Group: Development/Libraries | |
89 | Requires: %{name} = %{version}-%{release} | |
f832c0e2 ER |
90 | %{?requires_php_extension} |
91 | Requires: php-common >= 4:5.0.4 | |
8becfe02 | 92 | |
660f1672 | 93 | %description -n php-uuid |
f832c0e2 ER |
94 | UUID is a PHP extension for the creation of Universally Unique |
95 | Identifiers (UUID). | |
8becfe02 | 96 | |
660f1672 | 97 | %package -n postgresql-uuid |
f832c0e2 | 98 | Summary: OSSP uuid bindings for PostgreSQL |
8becfe02 ER |
99 | Group: Development/Libraries |
100 | Requires: %{name} = %{version}-%{release} | |
101 | ||
660f1672 | 102 | %description -n postgresql-uuid |
8becfe02 ER |
103 | PostgreSQL OSSP uuid module. |
104 | ||
105 | %prep | |
660f1672 | 106 | %setup -q -n uuid-%{version} |
e73d7b29 | 107 | %patch0 -p1 |
8becfe02 ER |
108 | |
109 | %build | |
110 | # Build the library. | |
111 | %configure \ | |
364139c7 | 112 | --includedir=%{_includedir}/oosp-uuid \ |
8becfe02 | 113 | --disable-static \ |
8becfe02 ER |
114 | --with-dce \ |
115 | --with-cxx \ | |
ce1a1410 ER |
116 | --with%{!?with_perl:out}-perl \ |
117 | --with%{!?with_php:out}-php \ | |
118 | --with%{!?with_pgsql:out}-pgsql | |
8becfe02 ER |
119 | |
120 | %{__make} | |
121 | ||
8becfe02 ER |
122 | %install |
123 | rm -rf $RPM_BUILD_ROOT | |
fda6c944 | 124 | install -d $RPM_BUILD_ROOT/%{_lib} |
8becfe02 ER |
125 | %{__make} install \ |
126 | DESTDIR=$RPM_BUILD_ROOT | |
127 | ||
f832c0e2 ER |
128 | %if %{with php} |
129 | install -d $RPM_BUILD_ROOT%{_datadir}/php | |
660f1672 | 130 | mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/uuid.php |
f832c0e2 ER |
131 | %endif |
132 | ||
fda6c944 ER |
133 | mv -f $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so.* $RPM_BUILD_ROOT/%{_lib} |
134 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libossp-uuid.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libossp-uuid.so | |
135 | ||
8becfe02 ER |
136 | %clean |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
139 | %post -p /sbin/ldconfig | |
140 | %postun -p /sbin/ldconfig | |
141 | ||
142 | %post c++ -p /sbin/ldconfig | |
143 | %postun c++ -p /sbin/ldconfig | |
144 | ||
145 | %post dce -p /sbin/ldconfig | |
146 | %postun dce -p /sbin/ldconfig | |
147 | ||
148 | %files | |
149 | %defattr(644,root,root,755) | |
150 | %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS | |
151 | %attr(755,root,root) %{_bindir}/uuid | |
fda6c944 ER |
152 | %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.* |
153 | %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16 | |
237e5788 | 154 | %{_mandir}/man1/uuid.1* |
8becfe02 ER |
155 | |
156 | %files devel | |
157 | %defattr(644,root,root,755) | |
158 | %attr(755,root,root) %{_bindir}/uuid-config | |
364139c7 AM |
159 | %dir %{_includedir}/oosp-uuid |
160 | %{_includedir}/oosp-uuid/uuid.h | |
e73d7b29 ER |
161 | %{_libdir}/libossp-uuid.so |
162 | %{_pkgconfigdir}/ossp-uuid.pc | |
163 | %{_mandir}/man3/ossp-uuid.3* | |
237e5788 | 164 | %{_mandir}/man1/uuid-config.1* |
e73d7b29 | 165 | %{_libdir}/libossp-uuid.la |
8becfe02 ER |
166 | |
167 | %files c++ | |
168 | %defattr(644,root,root,755) | |
e73d7b29 ER |
169 | %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.* |
170 | %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16 | |
8becfe02 ER |
171 | |
172 | %files c++-devel | |
173 | %defattr(644,root,root,755) | |
364139c7 | 174 | %{_includedir}/oosp-uuid/uuid++.hh |
e73d7b29 ER |
175 | %{_libdir}/libossp-uuid++.so |
176 | %{_libdir}/libossp-uuid++.la | |
8becfe02 ER |
177 | %{_mandir}/man3/uuid++.3* |
178 | ||
179 | %files dce | |
180 | %defattr(644,root,root,755) | |
e73d7b29 ER |
181 | %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.* |
182 | %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16 | |
8becfe02 ER |
183 | |
184 | %files dce-devel | |
185 | %defattr(644,root,root,755) | |
364139c7 | 186 | %{_includedir}/oosp-uuid/uuid_dce.h |
e73d7b29 ER |
187 | %{_libdir}/libossp-uuid_dce.so |
188 | %{_libdir}/libossp-uuid_dce.la | |
8becfe02 | 189 | |
ce1a1410 | 190 | %if %{with perl} |
660f1672 | 191 | %files -n perl-uuid |
8becfe02 ER |
192 | %defattr(644,root,root,755) |
193 | %{perl_vendorarch}/auto/* | |
194 | %{perl_vendorarch}/Data* | |
195 | %{perl_vendorarch}/OSSP* | |
196 | %{_mandir}/man3/Data::UUID.3* | |
197 | %{_mandir}/man3/OSSP::uuid.3* | |
ce1a1410 | 198 | %endif |
8becfe02 | 199 | |
ce1a1410 | 200 | %if %{with php} |
660f1672 | 201 | %files -n php-uuid |
8becfe02 | 202 | %defattr(644,root,root,755) |
e73d7b29 | 203 | %{_libdir}/php/ossp-uuid.so |
f832c0e2 | 204 | %{_datadir}/php/uuid.php |
ce1a1410 | 205 | %endif |
8becfe02 | 206 | |
ce1a1410 | 207 | %if %{with pgsql} |
660f1672 | 208 | %files -n postgresql-uuid |
8becfe02 | 209 | %defattr(644,root,root,755) |
e73d7b29 | 210 | %{_libdir}/postgresql/ossp-uuid.so |
8becfe02 | 211 | %{_datadir}/postgresql/uuid.sql |
ce1a1410 | 212 | %endif |