1 Summary: A fast, lightweighte, non-forking HTTP server for UN*X systems
2 Summary(pl): Szybki, niedu¿y, nie forkuj±cy siê serwer HTTP
8 Source0: http://mathop.diva.nl/dist/%{name}-%{version}.tar.gz
11 URL: http://www.mathopd.org/
14 Prereq: /sbin/chkconfig
15 Prereq: /usr/sbin/useradd
16 Prereq: /usr/bin/getgid
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Mathopd is a very small, yet very fast HTTP server for UN*X systems.
24 Mathopd is designed specifically to handle a large number of
25 connections with minimal fuss. It contains no unnecessary add-ons, but
26 it does the trick for most things.
30 Mathopd jest bardzo ma³ym, bardzo szybkim serwerem HTTP dla systemów
31 uniksowych. Jest zaprojektowany specjalnie do obs³ugi du¿ej liczby
32 po³±czeñ. Nie ma niepotrzebnych dodatków, ale potrafi wiêkszo¶æ
39 CFLAGS="%{rpmcflags}"; export CFLAGS
44 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT/home/httpd/cgi-bin
47 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
48 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_var}/log/mathopd}
50 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mathopd
51 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/
52 install src/mathopd $RPM_BUILD_ROOT/%{_sbindir}
54 gzip -9nf [A-Z]* doc/*
57 rm -rf $RPM_BUILD_ROOT
60 if [ -n "`getgid http`" ]; then
61 if [ "`getgid http`" != "51" ]; then
62 echo "Warning: group http haven't gid=51. Correct this before install %{name}" 1>&2
66 /usr/sbin/groupadd -g 51 -r -f http
68 if [ -n "`id -u http 2>/dev/null`" ]; then
69 if [ "`id -u http`" != "51" ]; then
70 echo "Warning: user http haven't uid=51. Correct this before install %{name}" 1>&2
74 /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
78 /sbin/chkconfig --add %{name}
79 if [ -f /var/lock/subsys/mathopd ]; then
80 /etc/rc.d/init.d/mathopd restart 1>&2
82 echo "Run \"/etc/rc.d/init.d/mathopd start\" to start %{name} daemon."
86 if [ "$1" = "0" ]; then
87 if [ -f /var/lock/subsys/mathopd ]; then
88 /etc/rc.d/init.d/mathopd stop 1>&2
91 if [ "$1" = "0" ]; then
92 /sbin/chkconfig --del %{name}
96 if [ "$1" = "0" ]; then
97 /usr/sbin/userdel http
98 /usr/sbin/groupdel http
102 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_sbindir}/mathopd
105 %attr(-, http, http) /home/httpd
106 %attr(0755, root, root) /etc/rc.d/init.d/mathopd
107 %config %{_sysconfdir}/mathopd.conf
108 %attr( 750,http,http) %dir %{_var}/log/mathopd