From 69654187fe21ce36c20722d80901e33c5748304d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 9 Oct 2012 00:43:47 +0300 Subject: [PATCH] new, version 0.99.11; slightly based on author's .spec --- and-httpd.spec | 117 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 and-httpd.spec diff --git a/and-httpd.spec b/and-httpd.spec new file mode 100644 index 0000000..1e193da --- /dev/null +++ b/and-httpd.spec @@ -0,0 +1,117 @@ +# TODO +# - dedicated uid (or not?) +# - finish files after deps available + +# +# Conditional build: +%bcond_without tests # build without tests + +Summary: Secure, simple and fast HTTP server +Name: and-httpd +Version: 0.99.11 +Release: 0.1 +License: LGPL +Group: Daemons +URL: http://www.and.org/and-httpd/ +Source0: http://www.and.org/and-httpd/%{version}/%{name}-%{version}.tar.bz2 +# Source0-md5: c0775fa77dc72b4627205d83b2cd3f58 +BuildRequires: libcap-devel +BuildRequires: perl-base +BuildRequires: pkgconfig >= 0.8 +BuildRequires: rpmbuild(macros) >= 1.228 +BuildRequires: socket_poll-devel +BuildRequires: timer_q-devel +BuildRequires: vstr-devel +Requires(postun): /usr/sbin/userdel +Requires(pre): /bin/id +Requires(pre): /usr/sbin/useradd +Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts +Requires: vstr >= 1.0.14 +Provides: user(http) +Provides: webserver +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define httpd_uid 51 +%define wwwdir /home/services/httpd + +%description +And-httpd is currently only a URL to file mapping daemon, in other +words in can take an incomming URL and map it to a file in a number of +ways. However it cannot do CGI or anything like apache-httpd +mod_python etc. ... it cannot even dynamically create directory +listings, however the -tools package contains utilities that can do +them outside of the daemon. + +%package tools +Summary: Tools to help with managing webserver data +Group: Development/Tools +Requires: perl-base +Requires: python +Requires: scons + +%description tools +Tools to help managing data under /var/www, including: +- automatic directory indexer. +- automatic gzip encoding generator. +- automatic converter from and-httpd syslog to Apache-httpd combined + log. + +%prep +%setup -q + +%build +%configure \ + %{?debug:--enable-debug} \ + %{?debug:--enable-debug-vstr} \ + %{?debug:--enable-debug-timer_q} \ + %{nil} + +%{__make} %{?with_tests:check} + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%if 0 +%pre +%useradd -c "And-httpd" -u %{httpd_uid} -s /sbin/nologin -r -d %{wwwdir} and-httpd + +%post +/sbin/chkconfig --add %{name} +%service %{name} restart + +%preun +if [ "$1" = "0" ]; then + %service -q %{name} stop + /sbin/chkconfig --del %{name} +fi +%endif + +%files +%defattr(644,root,root,755) +%doc %{_datadir}/doc/and-httpd-* +%attr(755,root,root) %{_sbindir}/* +%attr(755,root,root) %{_bindir}/* +%{_sysconfdir}/and-httpd/conf.d/README +%attr(754,root,root) /etc/rc.d/init.d/and-httpd +%{_sysconfdir}/cron.hourly/and-httpd_* +%config(noreplace) %{_sysconfdir}/and-httpd/and-httpd.conf +%config(noreplace) %{_sysconfdir}/and-httpd/conf.d/_*.conf +%config %{_sysconfdir}/and-httpd/mime_types_extra.txt +%{wwwdir}/err/* +%{wwwdir}/conf/* +%{wwwdir}/conf_tmpl/* +%{wwwdir}/html +%{wwwdir}/generated_html +%{_mandir}/man8/and-httpd* +%{_mandir}/man5/and-httpd* + +%files tools +%defattr(644,root,root,755) +%{_datadir}/and-httpd-*-tools/* +%{_libexecdir}/and-httpd-*-tools/* -- 2.43.0