1 %define mod_name gnutls
2 %define apxs /usr/sbin/apxs
3 Summary: SSL v3, TLS 1.0 and TLS 1.1 encryption for Apache HTTPD
4 Summary(pl.UTF-8): Szyfrowanie SSL v3, TLS 1.0 i TLS 1.1 dla serwera HTTP Apache
5 Name: apache-mod_%{mod_name}
8 License: Apache Group License
9 Group: Networking/Daemons/HTTP
10 Source0: http://www.outoforder.cc/downloads/mod_gnutls/mod_gnutls-%{version}.tar.bz2
11 # Source0-md5: 9b7050fb0dfec88225b15c821dfd26c4
13 Source2: %{name}-dhfile
14 Source3: %{name}-rsafile
15 Patch0: %{name}-libtool.patch
16 Patch1: %{name}-paths.patch
17 URL: http://www.outoforder.cc/projects/apache/mod_gnutls/
18 BuildRequires: %{apxs}
19 BuildRequires: apache-devel >= 2.0.42
20 BuildRequires: apr_memcache-devel >= 0.7.0
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: gnutls-devel >= 2.10.0
24 BuildRequires: libtool
25 BuildRequires: pkgconfig
26 Requires: apache(modules-api) = %apache_modules_api
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
30 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
33 mod_gnutls uses the GnuTLS library to provide SSL v3, TLS 1.0 and TLS
34 1.1 encryption for Apache HTTPD. It is similar to mod_ssl in purpose,
35 but does not use OpenSSL.
38 - Support for SSL v3, TLS 1.0 and TLS 1.1.
39 - Support for Server Name Indication
40 - Distributed SSL Session Cache via Memcached
41 - Local SSL Session Cache using DBM
43 %description -l pl.UTF-8
44 mod_gnutls używa biblioteki GnuTLS do obsługi szyfrowania SSL v3, TLS
45 1.0 i TLS 1.1 dla serwera HTTP Apache. Pod względem przeznaczenia jest
46 podobny do mod_ssl, ale nie używa biblioteki OpenSSL.
49 - obsługa SSL v3, TLS 1.0 i TLS 1.1
50 - obsługa identyfikacji nazwy serwera (Server Name Indication)
51 - rozproszona pamięć podręczna sesji SSL poprzez Memcached
52 - lokalna pamięć podręczna sesji SSL korzystająca z DBM
55 %setup -q -n mod_%{mod_name}-%{version}
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/{conf.d,tls}}
73 install src/.libs/libmod_gnutls.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_gnutls.so
74 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/40_mod_gnutls.conf
75 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/tls/dhfile
76 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/tls/rsafile
79 rm -rf $RPM_BUILD_ROOT
82 if [ "$1" = "1" ]; then
83 echo "Generating dhfile/rsafile - this may take some time..."
85 [ -f "$d/dhfile" ] || /usr/bin/certtool --generate-dh-params --bits 1024 --outfile $d/dhfile
86 [ -f "$d/rsafile" ] || /usr/bin/certtool --generate-privkey --bits 512 --outfile $d/rsafile
88 %service -q httpd restart
91 if [ "$1" = "0" ]; then
92 %service -q httpd restart
93 rm -f /etc/httpd/tls/{dhfile,rsafile}
97 %defattr(644,root,root,755)
98 %attr(750,root,root) %dir %{_sysconfdir}/tls
99 %dir %{_sysconfdir}/tls
100 %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_gnutls.conf
101 %attr(755,root,root) %{_pkglibdir}/mod_gnutls.so