]> git.pld-linux.org Git - packages/nss.git/blob - nss.spec
- updated to 3.11.4
[packages/nss.git] / nss.spec
1 # TODO
2 # - check if the signed nss lib data (*.chk) is still valid after rpm stripping
3 #
4 %define foover  %(echo %{version} | tr . _)
5 Summary:        NSS - Network Security Services
6 Summary(pl):    NSS - Network Security Services
7 Name:           nss
8 Version:        3.11.4
9 Release:        1
10 Epoch:          1
11 License:        GPL
12 Group:          Libraries
13 # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/dbm -r DBM_1_61_RTM
14 # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/security/dbm -r DBM_1_61_RTM
15 # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/security/coreconf -r NSS_3_9_4_RTM
16 # :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot mozilla/security/nss -r NSS_3_9_4_RTM
17 #Source0:       %{name}-%{version}.tar.bz2
18 Source0:        ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_%{foover}_RTM/src/%{name}-%{version}.tar.gz
19 # Source0-md5:  74af8ebdf94307f47ff8931adbef9c39
20 Source1:        %{name}-mozilla-nss.pc
21 Source2:        %{name}-config.in
22 Patch0:         %{name}-Makefile.patch
23 URL:            http://www.mozilla.org/projects/security/pki/nss/
24 BuildRequires:  nspr-devel >= 1:4.6.4
25 BuildRequires:  zlib-devel
26 BuildConflicts: mozilla < 0.9.6-3
27 Requires:       nspr >= 1:4.6.4
28 Obsoletes:      libnss3
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         specflags       -fno-strict-aliasing
32
33 %description
34 NSS supports cross-platform development of security-enabled server
35 applications. Applications built with NSS can support PKCS #5,
36 PKCS #7, PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 and v3, X.509 v3
37 certificates, and other security standards.
38
39 %description -l pl
40 NSS wspomaga pisanie wieloplatformowych bezpiecznych serwerów.
41 Aplikacja u¿ywaj±ca NSS jest w stanie obs³u¿yæ PKCS #5, PKCS #7,
42 PKCS #11, PKCS #12, S/MIME, TLS, SSL v2 oraz v3, certyfikaty X.509 v3,
43 i wiele innych bezpiecznych standardów.
44
45 %package tools
46 Summary:        NSS command line tools and utilities
47 Summary(pl):    Narzêdzia NSS
48 Group:          Applications
49 Requires:       %{name} = %{epoch}:%{version}-%{release}
50
51 %description tools
52 The NSS Toolkit command line tool.
53
54 %description tools -l pl
55 Narzêdzia NSS obs³ugiwane z linii poleceñ.
56
57 %package devel
58 Summary:        NSS - header files
59 Summary(pl):    NSS - pliki nag³ówkowe
60 Group:          Development/Libraries
61 Requires:       %{name} = %{epoch}:%{version}-%{release}
62 Requires:       nspr-devel >= 1:4.6.4
63 Obsoletes:      libnss3-devel
64
65 %description devel
66 Development part of NSS library.
67
68 %description devel -l pl
69 Czê¶æ biblioteki NSS przeznaczona dla programistów.
70
71 %package static
72 Summary:        NSS - static library
73 Summary(pl):    NSS - biblioteka statyczna
74 Group:          Development/Libraries
75 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
76
77 %description static
78 Static NSS Toolkit libraries.
79
80 %description static -l pl
81 Statyczne wersje bibliotek z NSS.
82
83 %prep
84 %setup -q
85 %patch0 -p1
86
87 %build
88 cd mozilla/security/nss
89
90 %ifarch %{x8664} ppc64
91 export USE_64=1
92 %endif
93
94 %{__make} -j1 build_coreconf \
95         NSDISTMODE=copy \
96         NS_USE_GCC=1 \
97         MOZILLA_CLIENT=1 \
98         NO_MDUPDATE=1 \
99         USE_PTHREADS=1 \
100         BUILD_OPT=1 \
101         CC="%{__cc}" \
102         OPTIMIZER="%{rpmcflags}"
103
104 %{__make} -j1 build_dbm \
105         NSDISTMODE=copy \
106         NS_USE_GCC=1 \
107         MOZILLA_CLIENT=1 \
108         NO_MDUPDATE=1 \
109         USE_PTHREADS=1 \
110         BUILD_OPT=1 \
111         CC="%{__cc}" \
112         OPTIMIZER="%{rpmcflags}" \
113         PLATFORM="pld"
114
115 %{__make} -j1 all \
116         NSDISTMODE=copy \
117         NS_USE_GCC=1 \
118         MOZILLA_CLIENT=1 \
119         NO_MDUPDATE=1 \
120         USE_PTHREADS=1 \
121         USE_SYSTEM_ZLIB=1 \
122         ZLIB_LIBS="-lz" \
123         BUILD_OPT=1 \
124         CC="%{__cc}" \
125         OPTIMIZER="%{rpmcflags}" \
126         PLATFORM="pld"
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/nss,%{_libdir},%{_pkgconfigdir}}
131
132 install mozilla/dist/private/nss/*      $RPM_BUILD_ROOT%{_includedir}/nss
133 install mozilla/dist/public/dbm/*       $RPM_BUILD_ROOT%{_includedir}/nss
134 install mozilla/dist/public/nss/*       $RPM_BUILD_ROOT%{_includedir}/nss
135 install mozilla/dist/pld/bin/*          $RPM_BUILD_ROOT%{_bindir}
136 install mozilla/dist/pld/lib/*          $RPM_BUILD_ROOT%{_libdir}
137
138 %{__sed} -e '
139         s#libdir=.*#libdir=%{_libdir}#g
140         s#includedir=.*#includedir=%{_includedir}#g
141         s#VERSION#%{version}#g
142 ' %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nss.pc
143 ln -s mozilla-nss.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/nss.pc
144
145 NSS_VMAJOR=$(awk '/#define.*NSS_VMAJOR/ {print $3}' mozilla/security/nss/lib/nss/nss.h)
146 NSS_VMINOR=$(awk '/#define.*NSS_VMINOR/ {print $3}' mozilla/security/nss/lib/nss/nss.h)
147 NSS_VPATCH=$(awk '/#define.*NSS_VPATCH/ {print $3}' mozilla/security/nss/lib/nss/nss.h)
148 %{__sed} -e "
149         s,@libdir@,%{_libdir},g
150         s,@prefix@,%{_prefix},g
151         s,@exec_prefix@,%{_prefix},g
152         s,@includedir@,%{_includedir}/nss,g
153         s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g
154         s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g
155         s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g
156 " %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/nss-config
157 chmod +x $RPM_BUILD_ROOT%{_bindir}/nss-config
158
159 # resolve conflict with squid
160 mv -f $RPM_BUILD_ROOT%{_bindir}/{,nss-}client
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %post   -p /sbin/ldconfig
166 %postun -p /sbin/ldconfig
167
168 %files
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/lib*.so
171 %{_libdir}/lib*.chk
172
173 %files devel
174 %defattr(644,root,root,755)
175 %{_includedir}/nss
176 %{_libdir}/libcrmf.a
177 %{_pkgconfigdir}/*.pc
178 %attr(755,root,root) %{_bindir}/nss-config
179
180 %files tools
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/*
183 %exclude %{_bindir}/nss-config
184
185 %files static
186 %defattr(644,root,root,755)
187 %{_libdir}/lib*.a
188 %exclude %{_libdir}/libcrmf.a
This page took 0.406416 seconds and 3 git commands to generate.