# TODO:
# - provide or autogenerate self signed cert in post, so after installing
# lighttpd-ssl server will still work
+# - patch with mod_websocket: https://github.com/Juniper/lighttpd-for-juise
#
# Conditional build:
%bcond_with tests # build with tests
Summary: Fast and light HTTP server
Summary(pl.UTF-8): Szybki i lekki serwer HTTP
Name: lighttpd
-Version: 1.4.32
-Release: 2
+Version: 1.4.35
+Release: 4
License: BSD
Group: Networking/Daemons/HTTP
Source0: http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.bz2
-# Source0-md5: 8e2d4ae8e918d4de1aeb9842584d170b
+# Source0-md5: f7a88130ee9984b421ad8aa80629750a
Source1: %{name}.init
Source2: %{name}.conf
Source3: %{name}.user
Source135: %{name}-mod_extforward.conf
Source136: %{name}-mod_h264_streaming.conf
Source137: %{name}-mod_cgi_php.conf
+Source138: %{name}-mod_compress.tmpwatch
#Patch100: %{name}-branch.diff
Patch0: %{name}-use_bin_sh.patch
Patch1: %{name}-mod_evasive-status_code.patch
Patch3: %{name}-branding.patch
Patch5: %{name}-mod_deflate.patch
Patch6: test-port-setup.patch
-Patch7: %{name}-crypt.patch
+Patch7: env-documentroot.patch
#Patch: %{name}-modinit-before-fork.patch
#Patch: %{name}-errorlog-before-fork.patch
URL: http://www.lighttpd.net/
Group: Networking/Daemons/HTTP
Requires: %{name} = %{version}-%{release}
Requires: %{name}-mod_fastcgi = %{version}-%{release}
-Requires: php-fcgi
+Requires: php(fcgi)
Provides: webserver(php)
Obsoletes: lighttpd-php-external
%patch3 -p1
%{?with_deflate:%patch5 -p1}
%patch6 -p1
-%patch7 -p1
+%patch7 -p0
rm -f src/mod_ssi_exprparser.h # bad patching: should be removed by is emptied instead
cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
cp -p %{SOURCE12} $RPM_BUILD_ROOT/etc/monit/%{name}.monitrc
cp -p %{SOURCE15} $RPM_BUILD_ROOT/etc/init/%{name}.conf
-install %{SOURCE16} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
-install %{SOURCE17} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
+cp -p %{SOURCE16} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE17} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
# handled in the way they are specified. mod_rewrite should always be the first
# module, mod_accesslog always the last.
+conf_available=$RPM_BUILD_ROOT%{_sysconfdir}/conf.d
+conf_enabled=../
+
cp -p %{SOURCE117} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/10_mod_rewrite.conf
cp -p %{SOURCE116} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/11_mod_redirect.conf
touch $RPM_BUILD_ROOT/var/lib/lighttpd/lighttpd.rrd
+install -d $RPM_BUILD_ROOT/etc/tmpwatch
+cp -p %{SOURCE138} $RPM_BUILD_ROOT/etc/tmpwatch/lighttpd-mod_compress.conf
+
%if %{without mysql}
# avoid packaging dummy module
%{__rm} $RPM_BUILD_ROOT%{_libdir}/mod_mysql_vhost.so
%files mod_compress
%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/lighttpd-mod_compress.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_compress.conf
%attr(755,root,root) %{_libdir}/mod_compress.so
%dir %attr(775,root,lighttpd) /var/cache/lighttpd/mod_compress