]> git.pld-linux.org Git - packages/ossp-uuid.git/blob - ossp-uuid.spec
- release 7
[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:        7
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         --includedir=%{_includedir}/oosp-uuid \
113         --disable-static \
114         --with-dce \
115         --with-cxx \
116         --with%{!?with_perl:out}-perl \
117         --with%{!?with_php:out}-php \
118         --with%{!?with_pgsql:out}-pgsql
119
120 %{__make}
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT/%{_lib}
125 %{__make} install \
126         DESTDIR=$RPM_BUILD_ROOT
127
128 %if %{with php}
129 install -d $RPM_BUILD_ROOT%{_datadir}/php
130 mv $RPM_BUILD_ROOT{%{php_extensiondir},%{_datadir}/php}/uuid.php
131 %endif
132
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
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
152 %attr(755,root,root) /%{_lib}/libossp-uuid.so.*.*.*
153 %attr(755,root,root) %ghost /%{_lib}/libossp-uuid.so.16
154 %{_mandir}/man1/uuid.1*
155
156 %files devel
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_bindir}/uuid-config
159 %dir %{_includedir}/oosp-uuid
160 %{_includedir}/oosp-uuid/uuid.h
161 %{_libdir}/libossp-uuid.so
162 %{_pkgconfigdir}/ossp-uuid.pc
163 %{_mandir}/man3/ossp-uuid.3*
164 %{_mandir}/man1/uuid-config.1*
165 %{_libdir}/libossp-uuid.la
166
167 %files c++
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libossp-uuid++.so.*.*.*
170 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid++.so.16
171
172 %files c++-devel
173 %defattr(644,root,root,755)
174 %{_includedir}/oosp-uuid/uuid++.hh
175 %{_libdir}/libossp-uuid++.so
176 %{_libdir}/libossp-uuid++.la
177 %{_mandir}/man3/uuid++.3*
178
179 %files dce
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_libdir}/libossp-uuid_dce.so.*.*.*
182 %attr(755,root,root) %ghost %{_libdir}/libossp-uuid_dce.so.16
183
184 %files dce-devel
185 %defattr(644,root,root,755)
186 %{_includedir}/oosp-uuid/uuid_dce.h
187 %{_libdir}/libossp-uuid_dce.so
188 %{_libdir}/libossp-uuid_dce.la
189
190 %if %{with perl}
191 %files -n perl-uuid
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*
198 %endif
199
200 %if %{with php}
201 %files -n php-uuid
202 %defattr(644,root,root,755)
203 %{_libdir}/php/ossp-uuid.so
204 %{_datadir}/php/uuid.php
205 %endif
206
207 %if %{with pgsql}
208 %files -n postgresql-uuid
209 %defattr(644,root,root,755)
210 %{_libdir}/postgresql/ossp-uuid.so
211 %{_datadir}/postgresql/uuid.sql
212 %endif
This page took 0.084642 seconds and 3 git commands to generate.