]>
Commit | Line | Data |
---|---|---|
8becfe02 ER |
1 | # TODO |
2 | # - conflicts with e2fsprogs uuid, rename libs with ossp prefix? | |
ce1a1410 ER |
3 | # - rename include ossp/uuid.h? |
4 | # - rename package to ossp-uuid? | |
5 | # - fix bindings compilation | |
6 | # | |
7 | # Conditional build: | |
f832c0e2 ER |
8 | %bcond_without php # build PHP binding |
9 | %bcond_with perl # build Perl binding | |
10 | %bcond_without pgsql # build postgresql binding | |
ce1a1410 | 11 | # |
8becfe02 ER |
12 | Summary: Universally Unique Identifier library |
13 | Name: uuid | |
f832c0e2 | 14 | Version: 1.6.1 |
237e5788 | 15 | Release: 0.2 |
8becfe02 ER |
16 | License: MIT |
17 | Group: Libraries | |
18 | URL: http://www.ossp.org/pkg/lib/uuid/ | |
19 | Source0: ftp://ftp.ossp.org/pkg/lib/uuid/%{name}-%{version}.tar.gz | |
f832c0e2 | 20 | # Source0-md5: 18c8875411da07fe4503fdfc2136bf46 |
8becfe02 | 21 | BuildRequires: libtool |
f832c0e2 | 22 | %{?with_php:BuildRequires: php-devel >= 3:5.0.0} |
ce1a1410 | 23 | %{?with_pgsql:BuildRequires: postgresql-devel} |
f832c0e2 | 24 | BuildRequires: rpmbuild(macros) >= 1.344 |
8becfe02 ER |
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 | %package devel | |
39 | Summary: Development support for Universally Unique Identifier library | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
42 | ||
43 | %description devel | |
44 | Development headers and libraries for OSSP uuid. | |
45 | ||
46 | %package c++ | |
47 | Summary: C++ support for Universally Unique Identifier library | |
48 | Group: Libraries | |
49 | Requires: %{name} = %{version}-%{release} | |
50 | ||
51 | %description c++ | |
52 | C++ libraries for OSSP uuid. | |
53 | ||
54 | %package c++-devel | |
55 | Summary: C++ development support for Universally Unique Identifier library | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-c++ = %{version}-%{release} | |
58 | Requires: %{name}-devel = %{version}-%{release} | |
59 | ||
60 | %description c++-devel | |
61 | C++ development headers and libraries for OSSP uuid. | |
62 | ||
63 | %package dce | |
64 | Summary: DCE support for Universally Unique Identifier library | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | ||
68 | %description dce | |
69 | DCE OSSP uuid library. | |
70 | ||
71 | %package dce-devel | |
72 | Summary: DCE development support for Universally Unique Identifier library | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-dce = %{version}-%{release} | |
75 | Requires: %{name}-devel = %{version}-%{release} | |
76 | ||
77 | %description dce-devel | |
78 | DCE development headers and libraries for OSSP uuid. | |
79 | ||
80 | %package -n perl-%{name} | |
f832c0e2 | 81 | Summary: OSSP uuid Perl Binding |
8becfe02 ER |
82 | Group: Development/Libraries |
83 | Requires: %{name} = %{version}-%{release} | |
84 | ||
85 | %description -n perl-%{name} | |
86 | Perl OSSP uuid modules, which includes a Data::UUID replacement. | |
87 | ||
88 | %package -n php-%{name} | |
89 | Summary: PHP support for Universally Unique Identifier library | |
90 | Group: Development/Libraries | |
91 | Requires: %{name} = %{version}-%{release} | |
f832c0e2 ER |
92 | %{?requires_php_extension} |
93 | Requires: php-common >= 4:5.0.4 | |
8becfe02 ER |
94 | |
95 | %description -n php-%{name} | |
f832c0e2 ER |
96 | UUID is a PHP extension for the creation of Universally Unique |
97 | Identifiers (UUID). | |
8becfe02 ER |
98 | |
99 | %package -n postgresql-%{name} | |
f832c0e2 | 100 | Summary: OSSP uuid bindings for PostgreSQL |
8becfe02 ER |
101 | Group: Development/Libraries |
102 | Requires: %{name} = %{version}-%{release} | |
103 | ||
104 | %description -n postgresql-%{name} | |
105 | PostgreSQL OSSP uuid module. | |
106 | ||
107 | %prep | |
108 | %setup -q | |
109 | ||
110 | %build | |
111 | # Build the library. | |
112 | %configure \ | |
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 | |
124 | %{__make} install \ | |
125 | DESTDIR=$RPM_BUILD_ROOT | |
126 | ||
f832c0e2 ER |
127 | %if %{with php} |
128 | install -d $RPM_BUILD_ROOT%{_datadir}/php | |
129 | mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/%{name}.php | |
130 | %endif | |
131 | ||
8becfe02 ER |
132 | %clean |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %post -p /sbin/ldconfig | |
136 | %postun -p /sbin/ldconfig | |
137 | ||
138 | %post c++ -p /sbin/ldconfig | |
139 | %postun c++ -p /sbin/ldconfig | |
140 | ||
141 | %post dce -p /sbin/ldconfig | |
142 | %postun dce -p /sbin/ldconfig | |
143 | ||
144 | %files | |
145 | %defattr(644,root,root,755) | |
146 | %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS | |
147 | %attr(755,root,root) %{_bindir}/uuid | |
ce1a1410 | 148 | %attr(755,root,root) %{_libdir}/libuuid.so.*.*.* |
f832c0e2 | 149 | %attr(755,root,root) %ghost %{_libdir}/libuuid.so.16 |
237e5788 | 150 | %{_mandir}/man1/uuid.1* |
8becfe02 ER |
151 | |
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) %{_bindir}/uuid-config | |
155 | %{_includedir}/uuid.h | |
156 | %{_libdir}/libuuid.so | |
157 | %{_pkgconfigdir}/uuid.pc | |
158 | %{_mandir}/man3/uuid.3* | |
237e5788 | 159 | %{_mandir}/man1/uuid-config.1* |
ce1a1410 | 160 | %{_libdir}/libuuid.la |
8becfe02 ER |
161 | |
162 | %files c++ | |
163 | %defattr(644,root,root,755) | |
ce1a1410 | 164 | %attr(755,root,root) %{_libdir}/libuuid++.so.*.*.* |
f832c0e2 | 165 | %attr(755,root,root) %ghost %{_libdir}/libuuid++.so.16 |
8becfe02 ER |
166 | |
167 | %files c++-devel | |
168 | %defattr(644,root,root,755) | |
169 | %{_includedir}/uuid++.hh | |
170 | %{_libdir}/libuuid++.so | |
ce1a1410 | 171 | %{_libdir}/libuuid++.la |
8becfe02 ER |
172 | %{_mandir}/man3/uuid++.3* |
173 | ||
174 | %files dce | |
175 | %defattr(644,root,root,755) | |
ce1a1410 | 176 | %attr(755,root,root) %{_libdir}/libuuid_dce.so.*.*.* |
f832c0e2 | 177 | %attr(755,root,root) %ghost %{_libdir}/libuuid_dce.so.16 |
8becfe02 ER |
178 | |
179 | %files dce-devel | |
180 | %defattr(644,root,root,755) | |
181 | %{_includedir}/uuid_dce.h | |
182 | %{_libdir}/libuuid_dce.so | |
ce1a1410 | 183 | %{_libdir}/libuuid_dce.la |
8becfe02 | 184 | |
ce1a1410 | 185 | %if %{with perl} |
8becfe02 ER |
186 | %files -n perl-%{name} |
187 | %defattr(644,root,root,755) | |
188 | %{perl_vendorarch}/auto/* | |
189 | %{perl_vendorarch}/Data* | |
190 | %{perl_vendorarch}/OSSP* | |
191 | %{_mandir}/man3/Data::UUID.3* | |
192 | %{_mandir}/man3/OSSP::uuid.3* | |
ce1a1410 | 193 | %endif |
8becfe02 | 194 | |
ce1a1410 | 195 | %if %{with php} |
8becfe02 ER |
196 | %files -n php-%{name} |
197 | %defattr(644,root,root,755) | |
198 | %{_libdir}/php/uuid.so | |
f832c0e2 | 199 | %{_datadir}/php/uuid.php |
ce1a1410 | 200 | %endif |
8becfe02 | 201 | |
ce1a1410 | 202 | %if %{with pgsql} |
8becfe02 ER |
203 | %files -n postgresql-%{name} |
204 | %defattr(644,root,root,755) | |
205 | %{_libdir}/postgresql/uuid.so | |
206 | %{_datadir}/postgresql/uuid.sql | |
ce1a1410 | 207 | %endif |