2007-02-19 05:31:25 +01:00
|
|
|
# norootforbuild
|
|
|
|
|
2010-02-22 15:16:27 +01:00
|
|
|
%define webroot /srv/www
|
|
|
|
|
|
|
|
Name: hiawatha
|
2011-10-10 13:26:44 +02:00
|
|
|
Version: 7.7
|
2010-02-22 15:16:27 +01:00
|
|
|
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
|
|
|
|
|
2011-10-10 13:26:44 +02:00
|
|
|
BuildRequires: libxml2-devel libxslt-devel openssl-devel udev
|
2010-02-22 15:16:27 +01:00
|
|
|
|
|
|
|
|
2007-02-19 05:31:25 +01:00
|
|
|
%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
|
2010-02-22 15:16:27 +01:00
|
|
|
|
2007-02-19 05:31:25 +01:00
|
|
|
|
|
|
|
%build
|
2010-02-22 15:16:27 +01:00
|
|
|
%__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}}
|
|
|
|
|
2007-02-19 05:31:25 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
2010-02-22 15:16:27 +01:00
|
|
|
%__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
|
2007-02-19 05:31:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
%pre
|
2010-02-22 15:16:27 +01:00
|
|
|
/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 || :
|
|
|
|
|
2007-02-19 05:31:25 +01:00
|
|
|
|
2009-03-09 16:58:35 +01:00
|
|
|
%post
|
2010-02-22 15:16:27 +01:00
|
|
|
%fillup_and_insserv %{name}-httpd
|
|
|
|
%fillup_and_insserv %{name}-fastcgi
|
2009-03-09 16:58:35 +01:00
|
|
|
%run_permissions
|
|
|
|
%verifyscript
|
|
|
|
%verify_permissions -e %{_sbindir}/cgi-wrapper
|
|
|
|
|
2010-02-22 15:16:27 +01:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal %{name}-httpd
|
|
|
|
%stop_on_removal %{name}-fastcgi
|
|
|
|
|
|
|
|
|
2011-09-06 18:54:15 +02:00
|
|
|
%postun
|
|
|
|
%restart_on_update %{name}-httpd
|
|
|
|
%restart_on_update %{name}-fastcgi
|
|
|
|
%{insserv_cleanup}
|
|
|
|
|
|
|
|
|
2010-02-22 15:16:27 +01:00
|
|
|
%clean
|
|
|
|
%__rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
2007-02-19 05:31:25 +01:00
|
|
|
%files
|
2010-02-22 15:16:27 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS ChangeLog COPYING
|
|
|
|
%{_bindir}/ssi-cgi
|
|
|
|
%verify(not mode) %attr(4750,root,%{name}) %{_sbindir}/cgi-wrapper
|
|
|
|
%{_sbindir}/%{name}
|
2007-02-19 05:31:25 +01:00
|
|
|
%{_sbindir}/newroot
|
|
|
|
%{_sbindir}/php-fcgi
|
|
|
|
%{_sbindir}/wigwam
|
2010-02-22 15:16:27 +01:00
|
|
|
%{_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}
|
|
|
|
|
2007-05-12 22:21:51 +02:00
|
|
|
|
|
|
|
%changelog
|