]> git.ipfire.org Git - ipfire-3.x.git/blob - nss-util/nss-util.spec
Change file layout of the makefiles.
[ipfire-3.x.git] / nss-util / nss-util.spec
1 %global nspr_version 4.8.6
2
3 Summary: Network Security Services Utilities Library
4 Name: nss-util
5 Version: 3.12.8
6 Release: 2%{?dist}
7 License: MPLv1.1 or GPLv2+ or LGPLv2+
8 URL: http://www.mozilla.org/projects/security/pki/nss/
9 Group: System Environment/Libraries
10 Requires: nspr >= %{nspr_version}
11 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
12 BuildRequires: nspr-devel >= %{nspr_version}
13 BuildRequires: zlib-devel
14 BuildRequires: pkgconfig
15 BuildRequires: gawk
16 BuildRequires: psmisc
17 BuildRequires: perl
18
19 Source0: %{name}-%{version}.tar.bz2
20 # The nss-util tar ball is a subset of nss-{version}-stripped.tar.bz2,
21 # Therefore we use the nss-split-util.sh script to keeping only what we need.
22 # Download the nss tarball via CVS from the nss propect and follow these
23 # steps to make the r tarball for nss-util out of the for nss:
24 # fedpkg clone nss
25 # fedpkg clone nss-util
26 # cd nss-util/master
27 # cp ../../nss/devel/${version}-stripped.tar.bz2 .
28 # sh ./nss-split-util.sh ${version}
29 # A file named {name}-{version}.tar.bz2 should appear
30 Source1: nss-split-util.sh
31 Source2: nss-util.pc.in
32 Source3: nss-util-config.in
33
34
35 %description
36 Utilities for Network Security Services and the Softoken module
37
38 # We shouln't need to have a devel subpackage as util will be used in the
39 # context of nss or nss-softoken. keeping to please rpmlint.
40 #
41 %package devel
42 Summary: Development libraries for Network Security Services Utilities
43 Group: Development/Libraries
44 Requires: nss-util = %{version}-%{release}
45 Requires: nspr-devel >= %{nspr_version}
46 Requires: pkgconfig
47
48 %description devel
49 Header and library files for doing development with Network Security Services.
50
51
52 %prep
53 %setup -q
54
55
56 %build
57
58 # Enable compiler optimizations and disable debugging code
59 BUILD_OPT=1
60 export BUILD_OPT
61
62 # Generate symbolic info for debuggers
63 XCFLAGS=$RPM_OPT_FLAGS
64 export XCFLAGS
65
66 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
67 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
68
69 export PKG_CONFIG_ALLOW_SYSTEM_LIBS
70 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
71
72 NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'`
73 NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'`
74
75 export NSPR_INCLUDE_DIR
76 export NSPR_LIB_DIR
77
78 NSS_USE_SYSTEM_SQLITE=1
79 export NSS_USE_SYSTEM_SQLITE
80
81 %ifarch x86_64 ppc64 ia64 s390x sparc64
82 USE_64=1
83 export USE_64
84 %endif
85
86 # make util
87 %{__make} -C ./mozilla/security/coreconf
88 %{__make} -C ./mozilla/security/nss
89
90 # Set up our package file
91 %{__mkdir_p} ./mozilla/dist/pkgconfig
92 %{__cat} %{SOURCE2} | sed -e "s,%%libdir%%,%{_libdir},g" \
93 -e "s,%%prefix%%,%{_prefix},g" \
94 -e "s,%%exec_prefix%%,%{_prefix},g" \
95 -e "s,%%includedir%%,%{_includedir}/nss3,g" \
96 -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
97 -e "s,%%NSSUTIL_VERSION%%,%{version},g" > \
98 ./mozilla/dist/pkgconfig/nss-util.pc
99
100 NSSUTIL_VMAJOR=`cat mozilla/security/nss/lib/util/nssutil.h | grep "#define.*NSSUTIL_VMAJOR" | awk '{print $3}'`
101 NSSUTIL_VMINOR=`cat mozilla/security/nss/lib/util/nssutil.h | grep "#define.*NSSUTIL_VMINOR" | awk '{print $3}'`
102 NSSUTIL_VPATCH=`cat mozilla/security/nss/lib/util/nssutil.h | grep "#define.*NSSUTIL_VPATCH" | awk '{print $3}'`
103
104 export NSSUTIL_VMAJOR
105 export NSSUTIL_VMINOR
106 export NSSUTIL_VPATCH
107
108 %{__cat} %{SOURCE3} | sed -e "s,@libdir@,%{_libdir},g" \
109 -e "s,@prefix@,%{_prefix},g" \
110 -e "s,@exec_prefix@,%{_prefix},g" \
111 -e "s,@includedir@,%{_includedir}/nss3,g" \
112 -e "s,@MOD_MAJOR_VERSION@,$NSSUTIL_VMAJOR,g" \
113 -e "s,@MOD_MINOR_VERSION@,$NSSUTIL_VMINOR,g" \
114 -e "s,@MOD_PATCH_VERSION@,$NSSUTIL_VPATCH,g" \
115 > ./mozilla/dist/pkgconfig/nss-util-config
116
117 chmod 755 ./mozilla/dist/pkgconfig/nss-util-config
118
119
120 %install
121
122 %{__rm} -rf $RPM_BUILD_ROOT
123
124 # There is no make install target so we'll do it ourselves.
125
126 %{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/nss3
127 %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
128 %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/nss3
129 %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
130 %{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir}
131
132 for file in libnssutil3.so
133 do
134 %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir}
135 done
136
137 # Copy the include files we want
138 # The util headers, the rest come from softokn and nss
139 for file in mozilla/dist/public/nss/*.h
140 do
141 %{__install} -p -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/nss3
142 done
143
144 # Copy the package configuration files
145 %{__install} -p -m 644 ./mozilla/dist/pkgconfig/nss-util.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nss-util.pc
146 %{__install} -p -m 755 ./mozilla/dist/pkgconfig/nss-util-config $RPM_BUILD_ROOT/%{_bindir}/nss-util-config
147
148 %clean
149 %{__rm} -rf $RPM_BUILD_ROOT
150
151 %post
152 /sbin/ldconfig >/dev/null 2>/dev/null
153
154 %postun
155 /sbin/ldconfig >/dev/null 2>/dev/null
156
157 %files
158 %defattr(-,root,root)
159 %{_libdir}/libnssutil3.so
160
161 %files devel
162 %defattr(-,root,root)
163 # package configuration files
164 %{_libdir}/pkgconfig/nss-util.pc
165 %{_bindir}/nss-util-config
166
167 # co-owned with nss
168 %dir %{_includedir}/nss3
169 # these are marked as public export in
170 # mozilla/security/nss/lib/util/manifest.mk
171 %{_includedir}/nss3/base64.h
172 %{_includedir}/nss3/ciferfam.h
173 %{_includedir}/nss3/nssb64.h
174 %{_includedir}/nss3/nssb64t.h
175 %{_includedir}/nss3/nsslocks.h
176 %{_includedir}/nss3/nssilock.h
177 %{_includedir}/nss3/nssilckt.h
178 %{_includedir}/nss3/nssrwlk.h
179 %{_includedir}/nss3/nssrwlkt.h
180 %{_includedir}/nss3/nssutil.h
181 %{_includedir}/nss3/pkcs11.h
182 %{_includedir}/nss3/pkcs11f.h
183 %{_includedir}/nss3/pkcs11n.h
184 %{_includedir}/nss3/pkcs11p.h
185 %{_includedir}/nss3/pkcs11t.h
186 %{_includedir}/nss3/pkcs11u.h
187 %{_includedir}/nss3/portreg.h
188 %{_includedir}/nss3/secasn1.h
189 %{_includedir}/nss3/secasn1t.h
190 %{_includedir}/nss3/seccomon.h
191 %{_includedir}/nss3/secder.h
192 %{_includedir}/nss3/secdert.h
193 %{_includedir}/nss3/secdig.h
194 %{_includedir}/nss3/secdigt.h
195 %{_includedir}/nss3/secerr.h
196 %{_includedir}/nss3/secitem.h
197 %{_includedir}/nss3/secoid.h
198 %{_includedir}/nss3/secoidt.h
199 %{_includedir}/nss3/secport.h
200 %{_includedir}/nss3/utilrename.h
201
202 %changelog
203 * Wed Sep 29 2010 jkeating - 3.12.8-2
204 - Rebuilt for gcc bug 634757
205
206 * Thu Sep 23 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.8-1
207 - Update to 3.12.8
208
209 * Sat Sep 18 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7.99.4-1
210 - NSS 3.12.8 RC0
211
212 * Sat Sep 04 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7.99.3-1
213 - NSS 3.12.8 Beta 3
214
215 * Sat Aug 29 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-2
216 - Define NSS_USE_SYSTEM_SQLITE and remove nolocalsql patch
217
218 * Mon Aug 16 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.7-1
219 - Update to 3.12.7
220
221 * Fri Mar 05 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.6-1
222 - Update to 3.12.6
223
224 * Mon Jan 18 2010 Elio Maldonado <emaldona@redhat.com> - 3.12.5-2
225 - Fix in nss-util-config.in
226
227 * Thu Dec 03 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.5-1
228 - Update to 3.12.5
229
230 * Thu Sep 10 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-8
231 - Retagging for a chained build with nss-softokn and nss
232
233 * Thu Sep 10 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-5
234 - Restoring -rpath-link to nss-util-config
235
236 * Tue Sep 08 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-4
237 - Installing shared libraries to %%{_libdir}
238
239 * Sat Sep 05 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-3
240 - Remove symbolic links to shared libraries from devel - 521155
241 - Apply nss-nolocalsql patch subset for nss-util
242 - No rpath-link in nss-util-config
243
244 * Fri Sep 04 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-2
245 - Retagging for a chained build
246
247 * Thu Sep 03 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.4-1
248 - Update to 3.12.4
249 - Don't require sqlite
250
251 * Thu Aug 27 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-15
252 - Bump the release number for a chained build of nss-util, nss-softokn and nss
253
254 * Thu Aug 27 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-14
255 - Cleanup nss-util-config.in
256
257 * Thu Aug 27 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-13
258 - nss-util-devel doesn't require nss-devel
259
260 * Wed Aug 26 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-12
261 - bump to unique nvr
262
263 * Wed Aug 26 2009 Elio Maldonado<emaldona@redhat.com> - 3.12.3.99.3-11
264 - Remove spurious executable permissions from nss-util-config
265 - Shorten some descriptions to keep rpmlint happy
266
267 * Mon Aug 24 2009 Dennis Gilmore <dennis@ausil.us> 3.12.3.99.3-10
268 - dont include the headers in nss-util only in the -devel package
269 - nss-util-devel Requires nss-devel since its only providing a subset of the headers.
270
271 * Thu Aug 20 2009 Dennis Gilmore <dennis@ausil.us> 3.12.3.99.3-9
272 - Provide nss-devel since we obsolete it
273
274 * Thu Aug 19 2009 Elio Maldonado <emaldona@redhat.com> 3.12.3.99.3-8.1
275 - nss-util-devel obsoletes nss-devel < 3.12.3.99.3-8
276
277 * Thu Aug 19 2009 Elio Maldonado <emaldona@redhat.com> 3.12.3.99.3-8
278 - Initial build