]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - lighttpd.spec
- md5
[packages/lighttpd.git] / lighttpd.spec
index 977eaa742bc4de48a6ad56d130599c7d6b57a99d..a7ca805ae8a5fdf0b8a6f5f9f321eb784b5a9dde 100644 (file)
@@ -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)
@@ -20,6 +21,7 @@
 %bcond_with    webdav_locks    # webdav locks with extra efsprogs deps
 %bcond_with    valgrind        # compile code with valgrind support.
 %bcond_with    deflate         # build deflate module (needs patch update with current svn)
+%bcond_with    h264_streaming          # build h264_streaming module
 
 %if %{with webdav_locks}
 %define                webdav_progs    1
 Summary:       Fast and light HTTP server
 Summary(pl.UTF-8):     Szybki i lekki serwer HTTP
 Name:          lighttpd
-Version:       1.4.29
-Release:       4
+Version:       1.4.40
+Release:       2
 License:       BSD
 Group:         Networking/Daemons/HTTP
-Source0:       http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.bz2
-# Source0-md5: e6e67b09986cb504db630b5a86b2dd76
+Source0:       http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.xz
+# Source0-md5: 89e0da2b6b8a2c4592d549ff10094068
 Source1:       %{name}.init
 Source2:       %{name}.conf
 Source3:       %{name}.user
@@ -52,7 +54,8 @@ Source11:     %{name}-pld.html
 Source12:      %{name}.monitrc
 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
@@ -91,18 +94,27 @@ 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
+# use branch.sh script to create branch.diff
 Patch100:      %{name}-branch.diff
+# Patch100-md5:        7bd09235304c8bcb16f34d49d480c0fb
 Patch0:                %{name}-use_bin_sh.patch
 Patch1:                %{name}-mod_evasive-status_code.patch
 Patch2:                %{name}-mod_h264_streaming.patch
 Patch3:                %{name}-branding.patch
-#Patch4:               %{name}-modinit-before-fork.patch
 Patch5:                %{name}-mod_deflate.patch
-#Patch8:               %{name}-errorlog-before-fork.patch
+Patch6:                test-port-setup.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}
@@ -118,10 +130,13 @@ BuildRequires:    mailcap >= 2.1.14-4.4
 %{?with_ssl:BuildRequires:     openssl-devel}
 BuildRequires: pcre-devel
 BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpm >= 4.4.9-56
+BuildRequires: rpmbuild(macros) >= 1.647
 %{?with_webdav_props:BuildRequires:    sqlite3-devel}
+BuildRequires: tar >= 1:1.22
 %{?with_valgrind:BuildRequires:        valgrind}
 BuildRequires: which
+BuildRequires: xz
 BuildRequires: zlib-devel
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
@@ -137,11 +152,13 @@ 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)
 Provides:      user(lighttpd)
 Provides:      webserver
+Provides:      webserver(headers)
 Provides:      webserver(mime)
 Conflicts:     logrotate < 3.7-4
 # for the posttrans scriptlet, conflicts because in vserver environment rpm package is not installed.
@@ -764,7 +781,7 @@ Summary(pl.UTF-8):  Obsługa PHP przez FastCGI, uruchamiane przez lighttpd
 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
 
@@ -780,8 +797,8 @@ Summary(pl.UTF-8):  Obsługa PHP przez FastCGI, uruchamianie sterowane zewnętrzn
 Group:         Networking/Daemons/HTTP
 Requires:      %{name} = %{version}-%{release}
 Requires:      %{name}-mod_fastcgi = %{version}-%{release}
+Suggests:      php(fpm)
 Suggests:      php-fcgi-init
-Suggests:      php-fpm
 Obsoletes:     lighttpd-php-spawned
 
 %description php-external
@@ -819,19 +836,25 @@ Plik monitrc do monitorowania serwera www lighttpd.
 
 %prep
 %setup -q
-%patch100 -p0
-#%patch4 -p0
+%patch100 -p1
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
+#%patch1 -p1 UPDATE (and submit upstream!) if you need this
+%{?with_h264_streaming:%patch2 -p1}
 %patch3 -p1
 %{?with_deflate:%patch5 -p1}
+%patch6 -p1
+%patch7 -p1
 
 rm -f src/mod_ssi_exprparser.h # bad patching: should be removed by is emptied instead
 
 # build mime.types.conf
 sh %{SOURCE6} /etc/mime.types
-cp -a %{SOURCE14} PLD-TODO
+cp -p %{SOURCE14} PLD-TODO
+
+%if "%{pld_release}" == "ac"
+%{__sed} -i -e 's/ serial_tests//' configure.ac
+%{__sed} -i -e 's/dist-xz/dist-bzip2/' configure.ac
+%endif
 
 %build
 ver=$(awk '/AC_INIT/{a=$2;gsub(/[\[\],]/, "", a); print a}' configure.ac)
@@ -841,13 +864,12 @@ if [ "$ver" != "%{version}" ]; then
 fi
 
 %{__libtoolize}
+%{__autoheader}
 %{__aclocal}
 %{__autoconf}
 %{__automake}
 
 %configure \
-       --enable-maintainer-mode \
-       --with-distribution="PLD Linux" \
        %{!?with_ipv6:--disable-ipv6} \
        %{!?with_largefile:--disable-lfs} \
        %{?with_valgrind:--with-valgrind} \
@@ -866,17 +888,19 @@ fi
 %{__make} -j1
 
 %if %{with tests}
+export LIGHTTPD_TEST_PORT=$((2048 + RANDOM % 10))
 %{__make} check
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig,init,monit}} \
+install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig,monit}} \
        $RPM_BUILD_ROOT%{_sysconfdir}/{conf,vhosts,webapps}.d \
        $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \
        $RPM_BUILD_ROOT%{_datadir}/lighttpd/errordocs \
        $RPM_BUILD_ROOT/var/lib/lighttpd \
-       $RPM_BUILD_ROOT/var/cache/lighttpd/mod_compress
+       $RPM_BUILD_ROOT/var/cache/lighttpd/mod_compress \
+       $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -886,7 +910,8 @@ cp -p %{SOURCE2} %{SOURCE3} mime.types.conf $RPM_BUILD_ROOT%{_sysconfdir}
 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
+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
 
@@ -899,6 +924,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
 
@@ -914,7 +942,9 @@ cp -p %{SOURCE109} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_evasive.conf
 cp -p %{SOURCE110} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_evhost.conf
 cp -p %{SOURCE112} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_fastcgi.conf
 cp -p %{SOURCE113} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_flv_streaming.conf
+%if %{with h264_streaming}
 cp -p %{SOURCE136} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_h264_streaming.conf
+%endif
 cp -p %{SOURCE114} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_indexfile.conf
 cp -p %{SOURCE115} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_proxy.conf
 cp -p %{SOURCE118} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_rrdtool.conf
@@ -945,6 +975,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
@@ -974,12 +1007,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
@@ -987,6 +1022,7 @@ if [ "$1" = "0" ]; then
        %groupremove lighttpd
        %groupremove http
 fi
+%systemd_reload
 
 %posttrans
 # minimizing lighttpd restarts logics. we restart webserver:
@@ -1085,7 +1121,6 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.types.conf
 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
-%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
 
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 %attr(750,root,root) %dir /var/log/archive/%{name}
@@ -1094,6 +1129,8 @@ fi
 %attr(644,lighttpd,lighttpd) %ghost /var/log/%{name}/error.log
 %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
@@ -1152,6 +1189,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
@@ -1198,10 +1236,12 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_flv_streaming.conf
 %attr(755,root,root) %{_libdir}/mod_flv_streaming.so
 
+%if %{with h264_streaming}
 %files mod_h264_streaming
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_h264_streaming.conf
 %attr(755,root,root) %{_libdir}/mod_h264_streaming.so
+%endif
 
 %files mod_indexfile
 %defattr(644,root,root,755)
This page took 0.319578 seconds and 4 git commands to generate.