Browse Source

lighttpd-1.4.66-1

Tomohiro "Tomo-p" KATO 2 years ago
parent
commit
251dadf69e
1 changed files with 69 additions and 44 deletions
  1. 69 44
      l/lighttpd/lighttpd-vl.spec

+ 69 - 44
l/lighttpd/lighttpd-vl.spec

@@ -1,22 +1,22 @@
+%bcond_with systemd
+
 %define webroot /var/www/lighttpd
 
-%if %{?_dist_release} == "vl6"
-%define owneruser lighttpd
-%define ownergroup lighttpd
-%else
 %define owneruser www-data
 %define ownergroup www-data
-%endif
 
 Summary: Lightning fast webserver with light system requirements
 Summary(ja): 少ないシステムリソースで動く超高速なウェブサーバ
 Name: lighttpd
-Version: 1.4.53
-Release: 1%{?_dist_release}
+Version: 1.4.66
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
+Group: servers
+Vendor: Project Vine
+Distribution: Vine Linux
+
 License: BSD
-Group: System Environment/Daemons
 URL: http://www.lighttpd.net/
-Source0: http://www.lighttpd.net/download/lighttpd-%{version}.tar.xz
+Source0: https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-%{version}.tar.xz
 Source1: lighttpd.logrotate
 Source2: php.d-lighttpd.ini
 Source3: lighttpd.init
@@ -25,26 +25,27 @@ Source10: index.html
 Source11: http://www.lighttpd.net/favicon.ico
 Source13: http://www.lighttpd.net/light_button.png
 Source14: http://www.lighttpd.net/light_logo.png
+Source100: lighttpd.service
 # config file patches
 ## for vl7 and later
-Patch0: lighttpd-1.4.31-vine.patch
-## for vl6
-Patch1: lighttpd-1.4.31-vine6.patch
+Patch0: lighttpd-1.4.66-vine.patch
 # security patch(es)
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires(pre): shadow-utils
-%if %{?_dist_release} != "vl6"
 Requires(pre): www-common
-%endif
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Requires(postun): chkconfig
-BuildRequires: openssl-devel, pcre-devel, bzip2-devel, zlib-devel, gcc-c++
+BuildRequires: openssl-devel, pcre2-devel, bzip2-devel, zlib-devel, gcc-c++
 %{?_with_ldap:BuildRequires: openldap-devel}
 BuildRequires: libxcrypt-devel
 BuildRequires: gamin-devel
 BuildRequires: gdbm-devel
 BuildRequires: lua-devel
+%if %{with systemd}
+%{?systemd_requires}
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(postun): chkconfig
+%endif
 
 %description
 Secure, fast, compliant and very flexible web-server which has been optimized
@@ -58,19 +59,21 @@ Available rpmbuild rebuild options :
 --with : memcache webdavprops ldap
 --without: lua
 
-%package mod_mysql_vhost
+
+%package mod_vhostdb_mysql
 Summary: Virtual host module for lighttpd that uses a MySQL database
-Group: System Environment/Daemons
+Group: servers
 Requires: %{name} = %{version}
 BuildRequires: libmariadb-devel
+Obsoletes: lighttpd-mod_mysql_vhost < 1.4.66
 
-%description mod_mysql_vhost
+%description mod_vhostdb_mysql
 Virtual host module for lighttpd that uses a MySQL database.
 
 
 %package fastcgi
 Summary: FastCGI module and spawning helper for lighttpd and PHP configuration
-Group: System Environment/Daemons
+Group: servers
 Requires: %{name} = %{version}
 Requires: spawn-fcgi
 
@@ -83,13 +86,12 @@ tweaked PHP package (--enable-fastcgi and --enable-discard-path added) or
 recompile PHP yourself.
 
 
+%debug_package
+
+
 %prep
 %setup -q
-%if %{?_dist_release} == "vl6"
-%patch1 -p1 -b .vine6
-%else
 %patch0 -p1 -b .vine
-%endif
 
 %build
 %configure \
@@ -99,21 +101,29 @@ recompile PHP yourself.
     --with-openssl \
     --with-fam \
     --with-gdbm \
-    --with-pcre \
+    --with-pcre2 \
     %{?_with_memcache:--with-memcache} \
     %{?_with_webdavprops:--with-webdav-props} \
     %{?_with_webdavlocks:--with-webdav-locks} \
-    %{?!_without_lua:--with-lua}
-%{__make}
+    %{?!_without_lua:--with-lua} \
+    %{nil}
+
+%{__make} %{?_smp_mflags}
 
 
 %install
 %{__rm} -rf %{buildroot}
 %{__make} install DESTDIR=%{buildroot}
 
+%if %{with systemd}
+install -D -p -m 0644 %{SOURCE100} \
+    %{buildroot}%{_unitdir}/lighttpd.service
+%else
 # Install included init script and sysconfig entry
 %{__install} -D -p -m 0755 %{SOURCE3} \
     %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
+%endif
+
 %{__install} -D -p -m 0644 %{SOURCE4} \
     %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
 
@@ -138,10 +148,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/
 %{__install} -D -p -m 0644 %{SOURCE2} \
     %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini
 
-# Install our own init script
-%{__install} -D -p -m 0755 %{SOURCE3} \
-    %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
-
 # Install our own default web page and images
 %{__mkdir_p} %{buildroot}%{webroot}
 %{__install} -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE13} \
@@ -158,30 +164,38 @@ mkdir -p %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/
 %clean
 %{__rm} -rf %{buildroot}
 
-%if %{?_dist_release} == "vl6"
-%pre
-/usr/sbin/useradd -s /sbin/nologin -M -r -d %{webroot} \
-    -c "lighttpd web server" lighttpd &>/dev/null || :
-%endif
 
 %post
+%if %{with systemd}
+%systemd_post lighttpd.service
+%else
 /sbin/chkconfig --add lighttpd
+%endif
 
 %preun
-if [ $1 -eq 0 ]; then
+%if %{with systemd}
+%systemd_preun lighttpd.service
+%else
+if [ $1 -eq 0 -o -x /bin/systemctl ]; then
   /sbin/service lighttpd stop &>/dev/null || :
   /sbin/chkconfig --del lighttpd
 fi
+%endif
 
 %postun
+%if %{with systemd}
+%systemd_postun_with_restart lighttpd.service
+%else
 if [ $1 -ge 1 ]; then
     /sbin/service lighttpd condrestart &>/dev/null || :
 fi
+%endif
 
 
 %files
 %defattr(-, root, root, 0755)
-%doc AUTHORS NEWS COPYING README
+%license COPYING
+%doc AUTHORS NEWS README
 %doc doc/config/lighttpd.conf
 %dir %{_sysconfdir}/lighttpd/
 %config(noreplace) %{_sysconfdir}/lighttpd/lighttpd.conf
@@ -190,13 +204,17 @@ fi
 %config(noreplace) %{_sysconfdir}/lighttpd/vhosts.d/*
 %config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd
 %config(noreplace) %{_sysconfdir}/sysconfig/lighttpd
+%if %{with systemd}
+%{_unitdir}/lighttpd.service
+%else
 %{_sysconfdir}/rc.d/init.d/lighttpd
+%endif
 %{_sbindir}/lighttpd
 %{_sbindir}/lighttpd-angel
 %{_libdir}/lighttpd/
 %exclude %{_libdir}/lighttpd/*.la
 %exclude %{_libdir}/lighttpd/mod_fastcgi.so
-%exclude %{_libdir}/lighttpd/mod_mysql_vhost.so
+%exclude %{_libdir}/lighttpd/mod_vhostdb_mysql.so
 %exclude %{_sysconfdir}/lighttpd/conf.d/fastcgi.conf
 %exclude %{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
 %{_mandir}/man8/lighttpd.8*
@@ -204,11 +222,10 @@ fi
 %attr(0750, %{owneruser}, %{ownergroup}) %{_var}/log/lighttpd/
 %{webroot}/
 
-%files mod_mysql_vhost
+%files mod_vhostdb_mysql
 %defattr(-, root, root, 0755)
 %dir %{_libdir}/lighttpd/
-%{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
-%{_libdir}/lighttpd/mod_mysql_vhost.so
+%{_libdir}/lighttpd/mod_vhostdb_mysql.so
 
 %files fastcgi
 %defattr(-, root, root, 0755)
@@ -219,6 +236,14 @@ fi
 
 
 %changelog
+* Fri Sep 16 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.66-1
+- new upstream release.
+- added systemd support (disabled as default).
+- dropped Patch1.
+- updated Patch0.
+- dropped mod_mysql_vhost.
+- added mod_vhostdb_mysql.
+
 * Mon May 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.53-1
 - new upstream release.
 - added BR:libxcrypt-devel.