-
# TODO:
# - provide or autogenerate self signed cert in post, so after installing
# lighttpd-ssl server will still work
Summary(pl.UTF-8): Szybki i lekki serwer HTTP
Name: lighttpd
Version: 1.4.35
-Release: 6
+Release: 7
License: BSD
Group: Networking/Daemons/HTTP
Source0: http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.bz2
# Source8-md5: 3e1008ee1d3d6d390cf81fe3072b4f50
Source9: light_logo.png
# Source9-md5: cbb7f0676e51ee2e26cf004df293fc62
-Source10: pld_button.png
-# Source10-md5: 185afa921e81bd726b9f0f9f0909dc6e
-Source11: %{name}-pld.html
+Source11: %{name}.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
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)
%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{%{systemdtmpfilesdir},%{systemdunitdir}}
+ $RPM_BUILD_ROOT/var/cache/lighttpd/mod_compress
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
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
# Install lighttpd images
cp -p %{SOURCE7} %{SOURCE8} %{SOURCE9} $RPM_BUILD_ROOT%{_lighttpddir}/html
-cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_lighttpddir}/html/pld_button.png
cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_lighttpddir}/html/index.html
# NOTE: the order of the modules is somewhat important as the modules are
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
%groupremove lighttpd
%groupremove http
fi
-%systemd_reload
%posttrans
# minimizing lighttpd restarts logics. we restart webserver:
%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}
%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