1 Summary: A fast, lightweighte, non-forking HTTP server for UN*X systems
2 Summary(pl.UTF-8): 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 Patch0: %{name}-getline.patch
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires(post,preun): /sbin/chkconfig
17 Requires(postun): /usr/sbin/groupdel
18 Requires(postun): /usr/sbin/userdel
19 Requires(pre): /bin/id
20 Requires(pre): /usr/bin/getgid
21 Requires(pre): /usr/sbin/groupadd
22 Requires(pre): /usr/sbin/useradd
23 Requires(pre): sh-utils
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.
37 %description -l pl.UTF-8
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}-%{version}p3
47 cp -f %{SOURCE3} dir_cgi.c
50 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 %service mathopd restart "%{name} HTTP daemon"
79 if [ "$1" = "0" ]; then
81 /sbin/chkconfig --del %{name}
85 if [ "$1" = "0" ]; then
91 %defattr(644,root,root,755)
93 %attr(755,root,root) %{_sbindir}/mathopd*
94 %attr(755,http,http) %{_datadir}
95 %attr(754,root,root) /etc/rc.d/init.d/mathopd
96 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mathopd.conf
97 %attr(750,http,http) %dir %{_var}/log/mathopd