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://www.mathopd.org/dist/%{name}-%{version}p3.tar.gz
9 # Source0-md5: 6e0fea187134cb52509c2f98a8644d11
12 Source3: http://www.mathopd.org/dist/dir_cgi.c.txt
13 URL: http://www.mathopd.org/
14 BuildRequires: rpmbuild(macros) >= 1.202
15 Requires(pre): /bin/id
16 Requires(pre): /usr/bin/getgid
17 Requires(pre): /usr/sbin/groupadd
18 Requires(pre): /usr/sbin/useradd
19 Requires(pre): sh-utils
20 Requires(postun): /usr/sbin/groupdel
21 Requires(postun): /usr/sbin/userdel
22 Requires(post,preun): /sbin/chkconfig
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _datadir /home/services/httpd
32 Mathopd is a very small, yet very fast HTTP server for UN*X systems.
33 Mathopd is designed specifically to handle a large number of
34 connections with minimal fuss. It contains no unnecessary add-ons, but
35 it does the trick for most things.
38 Mathopd jest bardzo ma³ym, bardzo szybkim serwerem HTTP dla systemów
39 uniksowych. Jest zaprojektowany specjalnie do obs³ugi du¿ej liczby
40 po³±czeñ. Nie ma niepotrzebnych dodatków, ale potrafi wiêkszo¶æ
44 %setup -q -n %{name}-1.5p3
46 cp -f %{SOURCE3} dir_cgi.c
49 CFLAGS="%{rpmcflags}"; export CFLAGS
51 %{__cc} %{rpmcflags} %{rpmldflags} -o mathopd-dir_cgi dir_cgi.c
54 %{__make} CC="%{__cc}"
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT%{_datadir}/cgi-bin \
59 $RPM_BUILD_ROOT/etc/rc.d/init.d \
60 $RPM_BUILD_ROOT{%{_sbindir},%{_var}/log/mathopd}
62 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mathopd
63 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
64 install src/mathopd $RPM_BUILD_ROOT%{_sbindir}
65 install mathopd-dir_cgi $RPM_BUILD_ROOT%{_sbindir}
68 rm -rf $RPM_BUILD_ROOT
71 %groupadd -g 51 -r -f http
72 %useradd -u 51 -r -d %{_datadir} -s /bin/false -c "HTTP User" -g http http
75 /sbin/chkconfig --add %{name}
76 if [ -f /var/lock/subsys/mathopd ]; then
77 /etc/rc.d/init.d/mathopd restart 1>&2
79 echo "Run \"/etc/rc.d/init.d/mathopd start\" to start %{name} HTTP daemon."
83 if [ "$1" = "0" ]; then
84 if [ -f /var/lock/subsys/mathopd ]; then
85 /etc/rc.d/init.d/mathopd stop 1>&2
87 /sbin/chkconfig --del %{name}
91 if [ "$1" = "0" ]; then
97 %defattr(644,root,root,755)
99 %attr(755,root,root) %{_sbindir}/mathopd*
100 %attr(755,http,http) %{_datadir}
101 %attr(754,root,root) /etc/rc.d/init.d/mathopd
102 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mathopd.conf
103 %attr(750,http,http) %dir %{_var}/log/mathopd