-# TODO
-# - with apr_memcache: http://www.outoforder.cc/projects/libs/apr_memcache
%define mod_name gnutls
%define apxs /usr/sbin/apxs
Summary: SSL v3, TLS 1.0 and TLS 1.1 encryption for Apache HTTPD
Summary(pl.UTF-8): Szyfrowanie SSL v3, TLS 1.0 i TLS 1.1 dla serwera HTTP Apache
Name: apache-mod_%{mod_name}
-Version: 0.2.0
-Release: 0.2
+Version: 0.5.4
+Release: 0.1
License: Apache Group License
-Group: Networking/Daemons
+Group: Networking/Daemons/HTTP
Source0: http://www.outoforder.cc/downloads/mod_gnutls/mod_gnutls-%{version}.tar.bz2
-# Source0-md5: 80ab766a7b9cfbb730e789032ff26d68
+# Source0-md5: 4be7daab0e4b0af9b2eff104fc61af87
Source1: %{name}.conf
Source2: %{name}-dhfile
Source3: %{name}-rsafile
Patch0: %{name}-libtool.patch
-Patch1: %{name}-no_certtool.patch
-Patch2: %{name}-paths.patch
+Patch1: %{name}-paths.patch
URL: http://www.outoforder.cc/projects/apache/mod_gnutls/
-BuildRequires: apache-apxs
+BuildRequires: %{apxs}
BuildRequires: apache-devel >= 2.0.42
+BuildRequires: apr_memcache-devel >= 0.7.0
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: gnutls-devel >= 1.2.0
+BuildRequires: gnutls-devel >= 2.4.0
BuildRequires: libtool
+BuildRequires: pkgconfig
Requires: apache(modules-api) = %apache_modules_api
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%setup -q -n mod_%{mod_name}-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
%{__libtoolize}
%{__automake}
%{__autoconf}
%configure \
- --with-apxs=%{apxs} \
- --with-libgnutls=%{_prefix} \
- --without-apr-memcache
+ --with-apxs=%{apxs}
%{__make}
rm -rf $RPM_BUILD_ROOT
%post
+if [ "$1" = "1" ]; then
+ echo "Generating dhfile/rsafile - this may take some time..."
+ d=/etc/httpd/tls
+ [ -f "$d/dhfile" ] || /usr/bin/certtool --generate-dh-params --bits 1024 --outfile $d/dhfile
+ [ -f "$d/rsafile" ] || /usr/bin/certtool --generate-privkey --bits 512 --outfile $d/rsafile
+fi
%service -q httpd restart
%postun
if [ "$1" = "0" ]; then
%service -q httpd restart
+ rm -f /etc/httpd/tls/{dhfile,rsafile}
fi
%files
%defattr(644,root,root,755)
%attr(750,root,root) %dir %{_sysconfdir}/tls
-%attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/tls/*
+%dir %{_sysconfdir}/tls
%attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_gnutls.conf
-%attr(755,root,root) %{_pkglibdir}/*
+%attr(755,root,root) %{_pkglibdir}/mod_gnutls.so