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(post,preun): /sbin/chkconfig
16 Requires(postun): /usr/sbin/groupdel
17 Requires(postun): /usr/sbin/userdel
18 Requires(pre): /bin/id
19 Requires(pre): /usr/bin/getgid
20 Requires(pre): /usr/sbin/groupadd
21 Requires(pre): /usr/sbin/useradd
22 Requires(pre): sh-utils
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _datadir /home/services/httpd
31 Mathopd is a very small, yet very fast HTTP server for UN*X systems.
32 Mathopd is designed specifically to handle a large number of
33 connections with minimal fuss. It contains no unnecessary add-ons, but
34 it does the trick for most things.
37 Mathopd jest bardzo ma³ym, bardzo szybkim serwerem HTTP dla systemów
38 uniksowych. Jest zaprojektowany specjalnie do obs³ugi du¿ej liczby
39 po³±czeñ. Nie ma niepotrzebnych dodatków, ale potrafi wiêkszo¶æ
43 %setup -q -n %{name}-%{version}p3
45 cp -f %{SOURCE3} dir_cgi.c
48 CFLAGS="%{rpmcflags}"; export CFLAGS
50 %{__cc} %{rpmcflags} %{rpmldflags} -o mathopd-dir_cgi dir_cgi.c
53 %{__make} CC="%{__cc}"
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{_datadir}/cgi-bin \
58 $RPM_BUILD_ROOT/etc/rc.d/init.d \
59 $RPM_BUILD_ROOT{%{_sbindir},%{_var}/log/mathopd}
61 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mathopd
62 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
63 install src/mathopd $RPM_BUILD_ROOT%{_sbindir}
64 install mathopd-dir_cgi $RPM_BUILD_ROOT%{_sbindir}
67 rm -rf $RPM_BUILD_ROOT
70 %groupadd -g 51 -r -f http
71 %useradd -u 51 -r -d %{_datadir} -s /bin/false -c "HTTP User" -g http http
74 /sbin/chkconfig --add %{name}
75 if [ -f /var/lock/subsys/mathopd ]; then
76 /etc/rc.d/init.d/mathopd restart 1>&2
78 echo "Run \"/etc/rc.d/init.d/mathopd start\" to start %{name} HTTP daemon."
82 if [ "$1" = "0" ]; then
83 if [ -f /var/lock/subsys/mathopd ]; then
84 /etc/rc.d/init.d/mathopd stop 1>&2
86 /sbin/chkconfig --del %{name}
90 if [ "$1" = "0" ]; then
96 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_sbindir}/mathopd*
99 %attr(755,http,http) %{_datadir}
100 %attr(754,root,root) /etc/rc.d/init.d/mathopd
101 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mathopd.conf
102 %attr(750,http,http) %dir %{_var}/log/mathopd