# # spec file for package thttpd # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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/ # Name: thttpd Provides: http_daemon PreReq: %fillup_prereq %insserv_prereq permissions Version: 2.25b Release: 0 Source: %{name}-%{version}.tar.bz2 Source1: %{name}-SuSE.tar.bz2 Patch0: %{name}-%{version}-configure.patch Patch1: %{name}-%{version}-dirs.patch Patch2: %{name}-%{version}-time_h.patch Patch3: %{name}-%{version}-newautoconf.patch Patch4: %{name}-%{version}-sec.patch Patch5: %{name}-%{version}-static.patch Patch6: %{name}-%{version}-pie.patch Patch7: %{name}-%{version}-syslogtocern.diff Patch8: %{name}-%{version}-overflow.diff Patch9: %{name}-%{version}-chown.diff Patch10: %{name}-%{version}-zerolen.patch Patch11: %{name}-%{version}-strcpy.patch Patch12: thttpd-2.25b-getline.patch Url: http://www.acme.com/software/thttpd/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Small and very simple webserver License: BSD-3-Clause Group: Productivity/Networking/Web/Servers BuildRequires: libtool automake %description Thttpd is a very compact no-frills httpd serving daemon that can handle very high loads. While lacking many of the advanced features of Roxen or Apache, thttpd operates without forking and is extremely efficient in memory use. Basic support for cgi scripts, authentication, and ssi is provided for. Advanced features include the ability to throttle traffic. Authors: -------- jef@acme.com %define serverroot /srv/www %prep %setup -q -a 1 %patch0 %patch1 %patch2 %patch3 %patch4 %patch5 %patch6 %patch7 %patch8 %patch9 %patch10 %patch11 %patch12 %build cp /usr/share/automake-1.11/config.* . # update server root path sed -i "s@__SRVROOT__@%{serverroot}/htdocs@g" README.SuSE SuSE/etc/thttpd.conf sed -i "s@__PREFIX__@%{_prefix}@g;\ s@__SYSCONFDIR__@%{_sysconfdir}@g;\ s@__NAME__@%{name}@g;\ s@__VERSION__@%{version}@g" SuSE/etc/init.d/thttpd chmod 744 SuSE/etc/init.d/thttpd chmod 644 SuSE/etc/thttpd.conf mv aclocal.m4 acinclude.m4 libtoolize --force aclocal --force autoconf -f V_CCOPT="$RPM_OPT_FLAGS -Wall" \ ./configure \ --mandir=%{_mandir} \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --sysconfdir=%{_sysconfdir} %ifarch s390 s390x make F_PIE="-fPIE" %else make F_PIE="-fpie" %endif %install install -d %{buildroot}/usr/bin \ %{buildroot}/usr/sbin \ %{buildroot}%{_mandir}/man1 \ %{buildroot}%{_mandir}/man8 \ %{buildroot}%{serverroot}/htdocs/users make DESTDIR=%{buildroot} install cp -a SuSE/* %{buildroot} sed "s@THTTPD-RELEASE@%{version}@" \ %{buildroot}%{serverroot}/htdocs/index.html.template > \ %{buildroot}%{serverroot}/htdocs/index.html rm -f %{buildroot}%{serverroot}/htdocs/index.html.template %post %{fillup_and_insserv thttpd} %run_permissions %verifyscript %verify_permissions -e /usr/bin/makeweb %preun %stop_on_removal thttpd %postun %restart_on_update thttpd %{insserv_cleanup} %clean rm -rf "%{buildroot}" %files %defattr(-, root, root) %doc README README.SuSE config.h %{serverroot}/htdocs/* %attr(775, root, www) %{serverroot}/htdocs/users %config(noreplace) %{serverroot}/htdocs/index.html %verify(not mode) %attr(2750, root, www) /usr/bin/makeweb /usr/bin/htpasswd /usr/sbin/* /usr/share/man/*/* %config /etc/init.d/thttpd %config(noreplace) /etc/thttpd.conf %changelog