X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=lighttpd.spec;h=e6a60f908d23d0750998fed5a02f880b0000b3b7;hb=e91e6bd06d400c32171311eb8e189e073b349ad4;hp=1c271fda978f0c31cc60d8386212329b023440fe;hpb=1a836c436ecad819839fd171cec25b6ae2b690ab;p=packages%2Flighttpd.git diff --git a/lighttpd.spec b/lighttpd.spec index 1c271fd..e6a60f9 100644 --- a/lighttpd.spec +++ b/lighttpd.spec @@ -2,9 +2,10 @@ # 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_without tests # build with tests +%bcond_with tests # build with tests %bcond_without xattr # support of extended attributes %bcond_without ipv6 # IPv4-only version (doesn't require IPv6 in kernel) %bcond_without largefile # largefile support (see notes above) @@ -28,12 +29,12 @@ Summary: Fast and light HTTP server Summary(pl.UTF-8): Szybki i lekki serwer HTTP Name: lighttpd -Version: 1.4.30 -Release: 10 +Version: 1.4.35 +Release: 3 License: BSD Group: Networking/Daemons/HTTP Source0: http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.bz2 -# Source0-md5: 63f9df52dcae0ab5689a95c99c54e48a +# Source0-md5: f7a88130ee9984b421ad8aa80629750a Source1: %{name}.init Source2: %{name}.conf Source3: %{name}.user @@ -54,6 +55,7 @@ Source13: branch.sh Source14: TODO Source15: %{name}.upstart Source16: %{name}.tmpfiles +Source17: %{name}.service Source100: %{name}-mod_access.conf Source101: %{name}-mod_accesslog.conf Source102: %{name}-mod_alias.conf @@ -92,6 +94,7 @@ Source134: %{name}-mod_magnet.conf 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 @@ -99,13 +102,17 @@ Patch2: %{name}-mod_h264_streaming.patch Patch3: %{name}-branding.patch Patch5: %{name}-mod_deflate.patch Patch6: test-port-setup.patch -Patch7: %{name}-openssl_TLSEXT_SNI.patch +Patch7: env-documentroot.patch #Patch: %{name}-modinit-before-fork.patch #Patch: %{name}-errorlog-before-fork.patch URL: http://www.lighttpd.net/ %{?with_xattr:BuildRequires: attr-devel} BuildRequires: autoconf >= 2.57 +%if "%{pld_release}" != "ac" +BuildRequires: automake >= 1:1.11.2 +%else BuildRequires: automake +%endif BuildRequires: bzip2-devel BuildRequires: fcgi-devel %{?with_gamin:BuildRequires: gamin-devel} @@ -121,6 +128,7 @@ BuildRequires: mailcap >= 2.1.14-4.4 %{?with_ssl:BuildRequires: openssl-devel} BuildRequires: pcre-devel BuildRequires: pkgconfig +BuildRequires: rpm >= 4.4.9-56 BuildRequires: rpmbuild(macros) >= 1.647 %{?with_webdav_props:BuildRequires: sqlite3-devel} %{?with_valgrind:BuildRequires: valgrind} @@ -140,6 +148,7 @@ Requires: %{name}-mod_indexfile = %{version}-%{release} Requires: %{name}-mod_staticfile = %{version}-%{release} Requires: rc-scripts >= 0.4.3.0 Requires: rpm-whiteout >= 1.5 +Requires: systemd-units >= 38 Suggests: %{name}-mod_accesslog Provides: group(http) Provides: group(lighttpd) @@ -830,7 +839,7 @@ Plik monitrc do monitorowania serwera www lighttpd. %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 @@ -851,8 +860,6 @@ fi %{__automake} %configure \ - --enable-maintainer-mode \ - --with-distribution="PLD Linux" \ %{!?with_ipv6:--disable-ipv6} \ %{!?with_largefile:--disable-lfs} \ %{?with_valgrind:--with-valgrind} \ @@ -883,7 +890,7 @@ install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d $RPM_BUILD_ROOT%{_datadir}/lighttpd/errordocs \ $RPM_BUILD_ROOT/var/lib/lighttpd \ $RPM_BUILD_ROOT/var/cache/lighttpd/mod_compress \ - $RPM_BUILD_ROOT%{systemdtmpfilesdir} + $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -894,7 +901,8 @@ cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} 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 +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 @@ -907,6 +915,9 @@ cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_lighttpddir}/html/index.html # 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 @@ -953,6 +964,9 @@ cp -p %{SOURCE132} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/ssl.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 @@ -982,12 +996,14 @@ for a in access.log error.log breakage.log; do fi done /sbin/chkconfig --add %{name} +%systemd_post %{name}.service %preun if [ "$1" = "0" ]; then %service %{name} stop /sbin/chkconfig --del %{name} fi +%systemd_preun %{name}.service %postun if [ "$1" = "0" ]; then @@ -995,6 +1011,7 @@ if [ "$1" = "0" ]; then %groupremove lighttpd %groupremove http fi +%systemd_reload %posttrans # minimizing lighttpd restarts logics. we restart webserver: @@ -1103,6 +1120,7 @@ fi %attr(644,lighttpd,lighttpd) %ghost /var/log/%{name}/breakage.log %dir %attr(770,root,lighttpd) /var/run/%{name} %{systemdtmpfilesdir}/%{name}.conf +%{systemdunitdir}/%{name}.service %attr(754,root,root) /etc/rc.d/init.d/%{name} %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/* %attr(755,root,root) %{_sbindir}/lighttpd @@ -1161,6 +1179,7 @@ fi %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