]> git.pld-linux.org Git - packages/apache-mod_nss.git/blob - apache-mod_nss.spec
30c73d5b903948382b570f2fde1c49cdb90fcdfc
[packages/apache-mod_nss.git] / apache-mod_nss.spec
1 # TODO
2 # - certutil tries to open /dev/tty to get passphrase for nss db init
3 %define         mod_name        nss
4 %define         apxs            /usr/sbin/apxs
5 Summary:        mod_nss - strong cryptography support for Apache using SSL/TLS library NSS
6 Summary(pl.UTF-8):      mod_nss - silna kryptografia dla Apache'a przy użyciu biblioteki SSL/TLS NSS
7 Name:           apache-mod_nss
8 Version:        1.0.8
9 Release:        0.1
10 License:        Apache v2.0
11 Group:          Networking/Daemons
12 Source0:        http://directory.fedoraproject.org/sources/mod_nss-%{version}.tar.gz
13 # Source0-md5:  32458d91ce909260a6081cce58004e2f
14 Source1:        apache-server.crt
15 Source2:        apache-server.key
16 Patch0:         %{name}-config.patch
17 URL:            http://directory.fedoraproject.org/wiki/Mod_nss
18 BuildRequires:  %{apxs}
19 BuildRequires:  apache-devel >= 2.0
20 BuildRequires:  apr-devel >= 1:1.0
21 BuildRequires:  apr-util-devel >= 1:1.0
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  nspr-devel >= 1:4.6.2
24 BuildRequires:  nss-devel >= 1:3.11.3
25 #BuildRequires: nss-tools
26 #BuildRequires: openssl-tools
27 Requires:       apache(modules-api) = %{apache_modules_api}
28 Requires:       nspr >= 1:4.6.2
29 Requires:       nss >= 1:3.11.3
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
33 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
34
35 %description
36 An Apache 2.x module for implementing crypto using the Mozilla NSS
37 crypto libraries. This supports SSL v3/TLS v1 including support for
38 client certificate authentication. NSS provides web applications with
39 a FIPS 140 certified crypto provider and support for a full range of
40 PKCS#11 devices.
41
42 mod_nss is based directly on the mod_ssl package from Apache 2.0.54.
43 It is a conversion from using OpenSSL calls to using NSS calls
44 instead.
45
46 %description -l pl.UTF-8
47 Moduł Apache'a 2.x implementujący kryptografię przy użyciu bibliotek
48 kryptograficznych Mozilla NSS. Obsługuje SSL v3/TLS v1 wraz z
49 uwierzytelnianiem z użyciem certyfikatu klienta. NSS zapewnia
50 aplikacjom WWW dostarczanie kryptografii z certyfikacją FIPS 140 i
51 obsługę pełnego zakresu urządzeń PKCS#11.
52
53 mod_nss jest oparty bezpośrednio na pakiecie mod_ssl z Apache'a
54 2.0.54, jedynie został zmodyfikowany tak, aby używał wywołań NSS
55 zamiast OpenSSL.
56
57 %prep
58 %setup -q -n mod_nss-%{version}
59 %patch0 -p1
60 cp %{SOURCE1} server.crt
61 cp %{SOURCE2} server.key
62
63 %build
64 # apr-util is missing in configure check
65 CPPFLAGS=$(apu-1-config --includes)
66 %configure \
67         CPP="%{__cpp}" \
68         CXXCPP="%{__cxx} -E" \
69         --with-apxs=%{apxs} \
70         --with-apr-config \
71         --with-nspr-inc=/usr/include/nspr \
72         --with-nspr-lib=%{_libdir} \
73         --with-nss-inc=/usr/include/nss \
74         --with-nss-lib=%{_libdir}
75
76 %{__make}
77
78 install -d nss
79 # XXX: this is interactive, cannot be done in rpm build process
80 #certutil -N -d nss
81 #openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -name "Server-Cert" -passout pass:
82 #pk12util -i server.p12 -d nss -W ''
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_sysconfdir}/{conf.d,nss}}
87 install .libs/libmodnss.so $RPM_BUILD_ROOT%{_pkglibdir}
88 install nss_pcache $RPM_BUILD_ROOT%{_sbindir}
89
90 cp -a nss.conf $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/40_mod_%{mod_name}.conf
91 #cp -a nss/* $RPM_BUILD_ROOT%{_sysconfdir}/nss
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post
97 %service -q httpd restart
98
99 %postun
100 if [ "$1" = "0" ]; then
101         %service -q httpd restart
102 fi
103
104 %files
105 %defattr(644,root,root,755)
106 %doc NOTICE README TODO docs/mod_nss.html migrate.pl
107 %attr(750,root,root) %dir %{_sysconfdir}/nss
108 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/cert8.db
109 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/key3.db
110 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nss/secmod.db
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
112 %attr(755,root,root) %{_pkglibdir}/libmodnss.so
113 %attr(755,root,root) %{_sbindir}/nss_pcache
This page took 0.028505 seconds and 3 git commands to generate.