1
0
forked from pool/hiawatha
hiawatha/hiawatha.spec

119 lines
3.2 KiB
RPMSpec
Raw Normal View History

# norootforbuild
%define webroot /srv/www
Name: hiawatha
Version: 7.7
Release: 1
Summary: A secure webserver for Unix
License: GPLv2
Url: http://www.hiawatha-webserver.org
Group: Productivity/Networking/Web/Servers
Source0: http://hiawatha.leisink.org/files/hiawatha-%{version}.tar.gz
Source1: %{name}.permissions
Source2: %{name}.logrotate
Source3: %{name}-httpd.init
Source4: %{name}-fastcgi.init
Source99: %{name}.rpmlintrc
PreReq: %insserv_prereq %fillup_prereq pwdutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libxml2-devel libxslt-devel openssl-devel udev
%description
Hiawatha is a secure webserver for Unix. It has been written with 'being
secure' as its main goal. Hiawatha has many security features that no other
webserver has. This and the fact that Hiawatha's source code is free of
security-bugs, makes Hiawatha the most secure webserver available.
%prep
%setup
%build
%__sed -i -e "s|#ServerId = www-data|ServerId = hiawatha|g" etc/%{name}/%{name}.conf.in
export webrootdir=%{webroot}/%{name}/htdocs
%configure \
--enable-chroot \
--enable-command
%__make %{?jobs:-j%{jobs}}
%install
%makeinstall
%__mkdir_p %{buildroot}/%{_localstatedir}/log/%{name}
%__mkdir_p %{buildroot}/%{_localstatedir}/lib/%{name}
%__install -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/permissions.d/%{name}
%__install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%__install -D -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/%{name}-httpd
%__ln_s -f %{_sysconfdir}/init.d/%{name}-httpd %{buildroot}%{_sbindir}/rc%{name}-httpd
%__install -D -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/%{name}-fastcgi
%__ln_s -f %{_sysconfdir}/init.d/%{name}-fastcgi %{buildroot}%{_sbindir}/rc%{name}-fastcgi
%pre
/usr/sbin/groupadd -r %{name} &>/dev/null || :
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "User to run hiawatha" -d /var/lib/%{name} %{name} &>/dev/null || :
%post
%fillup_and_insserv %{name}-httpd
%fillup_and_insserv %{name}-fastcgi
%run_permissions
%verifyscript
%verify_permissions -e %{_sbindir}/cgi-wrapper
%preun
%stop_on_removal %{name}-httpd
%stop_on_removal %{name}-fastcgi
%postun
%restart_on_update %{name}-httpd
%restart_on_update %{name}-fastcgi
%{insserv_cleanup}
%clean
%__rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING
%{_bindir}/ssi-cgi
%verify(not mode) %attr(4750,root,%{name}) %{_sbindir}/cgi-wrapper
%{_sbindir}/%{name}
%{_sbindir}/newroot
%{_sbindir}/php-fcgi
%{_sbindir}/wigwam
%{_sbindir}/rc%{name}-httpd
%{_sbindir}/rc%{name}-fastcgi
%{_sysconfdir}/init.d/%{name}-httpd
%{_sysconfdir}/init.d/%{name}-fastcgi
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/cgi-wrapper.conf
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/mimetype.conf
%config(noreplace) %{_sysconfdir}/%{name}/php-fcgi.conf
%config(noreplace) %{_sysconfdir}/%{name}/index.xslt
%config(noreplace) %{_sysconfdir}/permissions.d/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{_mandir}/man1/*.1.gz
%dir %{webroot}/%{name}
%dir %{webroot}/%{name}/htdocs
%{webroot}/%{name}/htdocs/index.html
%defattr(-,%{name},%{name})
%dir %{_localstatedir}/log/%{name}
%dir %{_localstatedir}/lib/%{name}
%changelog