]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- release 3 (again...)
[packages/ossp-uuid.git] / ossp-uuid.spec
1 # TODO
2 # - fix bindings compilation (when library is not installed)
3 #
4 # Conditional build:
5 %bcond_with             php                     # build PHP binding
6 %bcond_with             perl            # build Perl binding
7 %bcond_with             pgsql           # build postgresql binding
8 #
9 Summary:        Universally Unique Identifier library
10 Name:           ossp-uuid
11 Version:        1.6.2
12 Release:        3
13 License:        MIT
14 Group:          Libraries
15 URL:            http://www.ossp.org/pkg/lib/uuid/
16 Source0:        ftp://ftp.ossp.org/pkg/lib/uuid/uuid-%{version}.tar.gz
17 # Source0-md5:  5db0d43a9022a6ebbbc25337ae28942f
18 Patch0:         uuid-ossp-prefix.patch
19 BuildRequires:  libtool
20 %{?with_php:BuildRequires:      php-devel >= 3:5.0.0}
21 %{?with_pgsql:BuildRequires:    postgresql-devel}
22 BuildRequires:  rpmbuild(macros) >= 1.344
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
78 %package -n perl-uuid
79 Summary:        OSSP uuid Perl Binding
80 Group:          Development/Libraries
81 Requires:       %{name} = %{version}-%{release}
82
83 %description -n perl-uuid
84 Perl OSSP uuid modules, which includes a Data::UUID replacement.
85
86 %package -n php-uuid
87 Summary:        PHP support for Universally Unique Identifier library
88 Group:          Development/Libraries
89 Requires:       %{name} = %{version}-%{release}
90 %{?requires_php_extension}
91 Requires:       php-common >= 4:5.0.4
92
93 %description -n php-uuid
94 UUID is a PHP extension for the creation of Universally Unique
95 Identifiers (UUID).
96
97 %package -n postgresql-uuid
98 Summary:        OSSP uuid bindings for PostgreSQL
99 Group:          Development/Libraries
100 Requires:       %{name} = %{version}-%{release}
101
102 %description -n postgresql-uuid
103 PostgreSQL OSSP uuid module.
104
105 %prep
106 %setup -q -n uuid-%{version}
107 %patch0 -p1
108
109 %build
110 # Build the library.
111 %configure \
112         --disable-static \
113         --with-dce \
114         --with-cxx \
115         --with%{!?with_perl:out}-perl \
116         --with%{!?with_php:out}-php \
117         --with%{!?with_pgsql:out}-pgsql
118
119 %{__make}
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123 %{__make} install \
124         DESTDIR=$RPM_BUILD_ROOT
125
126 %if %{with php}
127 install -d $RPM_BUILD_ROOT%{_datadir}/php
128 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/uuid.php
129 %endif
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %post -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
136
137 %post c++ -p /sbin/ldconfig
138 %postun c++ -p /sbin/ldconfig
139
140 %post dce -p /sbin/ldconfig
141 %postun dce -p /sbin/ldconfig
142
143 %files
144 %defattr(644,root,root,755)
145 %doc AUTHORS ChangeLog HISTORY NEWS PORTING README SEEALSO THANKS TODO USERS
146 %attr(755,root,root) %{_bindir}/uuid
147 %attr(755,root,root) %{_libdir}/libossp-uuid.so.*.*.*
148 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid.so.16
149 %{_mandir}/man1/uuid.1*
150
151 %files devel
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/uuid-config
154 %{_includedir}/uuid.h
155 %{_libdir}/libossp-uuid.so
156 %{_pkgconfigdir}/ossp-uuid.pc
157 %{_mandir}/man3/ossp-uuid.3*
158 %{_mandir}/man1/uuid-config.1*
159 %{_libdir}/libossp-uuid.la
160
161 %files c++
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
165
166 %files c++-devel
167 %defattr(644,root,root,755)
168 %{_includedir}/uuid++.hh
169 %{_libdir}/libossp-uuid++.so
170 %{_libdir}/libossp-uuid++.la
171 %{_mandir}/man3/uuid++.3*
172
173 %files dce
174 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
176 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
177
178 %files dce-devel
179 %defattr(644,root,root,755)
180 %{_includedir}/uuid_dce.h
181 %{_libdir}/libossp-uuid_dce.so
182 %{_libdir}/libossp-uuid_dce.la
183
184 %if %{with perl}
185 %files -n perl-uuid
186 %defattr(644,root,root,755)
187 %{perl_vendorarch}/auto/*
188 %{perl_vendorarch}/Data*
189 %{perl_vendorarch}/OSSP*
190 %{_mandir}/man3/Data::UUID.3*
191 %{_mandir}/man3/OSSP::uuid.3*
192 %endif
193
194 %if %{with php}
195 %files -n php-uuid
196 %defattr(644,root,root,755)
197 %{_libdir}/php/ossp-uuid.so
198 %{_datadir}/php/uuid.php
199 %endif
200
201 %if %{with pgsql}
202 %files -n postgresql-uuid
203 %defattr(644,root,root,755)
204 %{_libdir}/postgresql/ossp-uuid.so
205 %{_datadir}/postgresql/uuid.sql
206 %endif
This page took 0.05612 seconds and 4 git commands to generate.