1
0
forked from pool/hiawatha
hiawatha/hiawatha.spec
Mariusz Fik f3d5f5242d Accepting request 227405 from home:Fisiu:branches:server:http
- Update to 9.4:
  * Keep-Alive connections for reverse proxy made optional.
  * ErrorXSLTfile option added.
  * IgnoreDotHiawatha option added.
  * RandomHeader option added.
  * Dropped support for RC4.
  * PolarSSL updated to version 1.3.4.
  * Added support for Hyper Text Coffee Pot Control Protocol (RFC2324).
  * Added SSL_CIPHER to CGI environment.
  * Added Public/Private to UrlToolkit expire option.
  * Small improvements.

OBS-URL: https://build.opensuse.org/request/show/227405
OBS-URL: https://build.opensuse.org/package/show/server:http/hiawatha?expand=0&rev=59
2014-03-25 00:35:59 +00:00

140 lines
4.5 KiB
RPMSpec

#
# spec file for package hiawatha
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013-2014 Mariusz Fik <fisiu@opensuse.org>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define webroot /srv/www
Name: hiawatha
Version: 9.4
Release: 0
Summary: A secure and advanced webserver
License: GPL-2.0
Group: Productivity/Networking/Web/Servers
Url: http://www.hiawatha-webserver.org
Source0: http://www.hiawatha-webserver.org/files/%{name}-%{version}.tar.gz
Source1: %{name}.logrotate
Source2: %{name}.service
Source100: %{name}.firewall
Source101: %{name}-ssl.firewall
BuildRequires: cmake >= 2.8.4
BuildRequires: libxslt-devel
BuildRequires: pkg-config
BuildRequires: systemd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: logrotate
%{?systemd_requires}
%description
Hiawatha is a webserver for Unix and has been build with security in mind.
This resulted in a highly secure webserver, in both code and features.
This webserver runs on Linux, BSD, MacOS X and Windows. Although it can run any
kind of CGI / FastCGI application, it has been optimized for usage with PHP.
Most well known PHP frameworks and CMS applications have been tested with
Hiawatha and ran without a problem. Hiawatha supports many web and HTTP features
such as CGI/FastCGI, HTTP authentication, virtual host support, request
pipelining, keep alive connections, URL rewriting and many more.
%prep
%setup -q
%build
mkdir build
cd build
cmake .. \
-DCMAKE_C_FLAGS="%{optflags} -pie -fPIC" \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DCMAKE_INSTALL_BINDIR="%{_bindir}" \
-DCMAKE_INSTALL_SBINDIR="%{_sbindir}" \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCONFIG_DIR="%{_sysconfdir}/hiawatha" \
-DLOG_DIR="%{_localstatedir}/log/hiawatha" \
-DPID_DIR="%{_localstatedir}/run" \
-DWORK_DIR="%{_localstatedir}/lib/hiawatha" \
-DWEBROOT_DIR="%{webroot}/%{name}/htdocs" \
-DENABLE_CACHE=On \
-DENABLE_IPV6=On \
-DENABLE_MONITOR=On \
-DENABLE_RPROXY=On \
-DENABLE_SSL=On \
-DENABLE_TOMAHAWK=On \
-DENABLE_TOOLKIT=On \
-DENABLE_XSLT=On \
-DENABLE_ZLIB_SUPPORT=On
make %{?_smp_mflags}
%install
cd build
%makeinstall
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
# run as wwwrun user
sed "s/#ServerId = www-data/ServerId = wwwrun/" -i %{buildroot}%{_sysconfdir}/hiawatha/hiawatha.conf
# susefirewall config files
install -D -m 0644 %{S:100} \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
install -D -m 0644 %{S:101} \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-ssl
# temp fix
rm -vf %{buildroot}%{_libdir}/%{name}/libpolarssl.so
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%defattr(-,root,root)
%doc ChangeLog LICENSE README.md
%{_bindir}/ssi-cgi
%{_sbindir}/%{name}
%{_sbindir}/wigwam
%attr(0755,root,root) %verify(not mode) %{_sbindir}/cgi-wrapper
%{_unitdir}/%{name}.service
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libpolarssl.so*
%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}/index.xslt
%config(noreplace) %{_sysconfdir}/%{name}/error.xslt
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-ssl
%{_mandir}/man1/*.1.gz
%dir %{webroot}/%{name}
%dir %{webroot}/%{name}/htdocs
%{webroot}/%{name}/htdocs/index.html
%dir %attr(-,wwwrun,www) %{_localstatedir}/lib/%{name}/
%dir %attr(-,wwwrun,www) %{_localstatedir}/log/%{name}/
%changelog