]> git.pld-linux.org Git - packages/mathopd.git/blob - mathopd.spec
- massive attack: source-md5
[packages/mathopd.git] / mathopd.spec
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
3 Name:           mathopd
4 Version:        1.4gamma
5 Release:        2
6 Group:          Networking
7 License:        BSD
8 Source0:        http://www.mathopd.org/dist/%{name}-1.4-gamma.tar.gz
9 # Source0-md5:  f16222d1fdf70cd15c0c5e73984cc757
10 Source1:        %{name}.init
11 Source2:        %{name}.conf
12 URL:            http://www.mathopd.org/
13 Provides:       httpd
14 Provides:       webserver
15 Requires(pre):  sh-utils
16 Requires(pre): /usr/bin/getgid
17 Requires(pre): /bin/id
18 Requires(pre): /usr/sbin/groupadd
19 Requires(pre): /usr/sbin/useradd
20 Requires(postun):      /usr/sbin/userdel
21 Requires(postun):      /usr/sbin/groupdel
22 Requires(post,preun):   /sbin/chkconfig
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Mathopd is a very small, yet very fast HTTP server for UN*X systems.
27 Mathopd is designed specifically to handle a large number of
28 connections with minimal fuss. It contains no unnecessary add-ons, but
29 it does the trick for most things.
30
31 %description -l pl
32 Mathopd jest bardzo ma³ym, bardzo szybkim serwerem HTTP dla systemów
33 uniksowych. Jest zaprojektowany specjalnie do obs³ugi du¿ej liczby
34 po³±czeñ. Nie ma niepotrzebnych dodatków, ale potrafi wiêkszo¶æ
35 rzeczy.
36
37 %prep
38 %setup -q -n %{name}-1.4
39
40 %build
41 CFLAGS="%{rpmcflags}"; export CFLAGS
42 cd src
43 %{__make}
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT/home/httpd/cgi-bin \
48         $RPM_BUILD_ROOT/etc/rc.d/init.d \
49         $RPM_BUILD_ROOT{%{_sbindir},%{_var}/log/mathopd}
50
51 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mathopd
52 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
53 install src/mathopd $RPM_BUILD_ROOT%{_sbindir}
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %pre
59 if [ -n "`getgid http`" ]; then
60        if [ "`getgid http`" != "51" ]; then
61                echo "Error: group http doesn't have gid=51. Correct this before installing %{name}." 1>&2
62                exit 1
63        fi
64 else
65         /usr/sbin/groupadd -g 51 -r -f http
66 fi
67 if [ -n "`id -u http 2>/dev/null`" ]; then
68        if [ "`id -u http`" != "51" ]; then
69                echo "Error: user http doesn't have uid=51. Correct this before installing %{name}." 1>&2
70                exit 1
71        fi
72 else
73        /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
74 fi
75
76 %post
77 /sbin/chkconfig --add %{name}
78 if [ -f /var/lock/subsys/mathopd ]; then
79         /etc/rc.d/init.d/mathopd restart 1>&2
80 else
81         echo "Run \"/etc/rc.d/init.d/mathopd start\" to start %{name} daemon."
82 fi
83
84 %preun
85 if [ "$1" = "0" ]; then
86         if [ -f /var/lock/subsys/mathopd ]; then
87                 /etc/rc.d/init.d/mathopd stop 1>&2
88         fi
89         /sbin/chkconfig --del %{name}
90 fi
91
92 %postun
93 if [ "$1" = "0" ]; then
94        /usr/sbin/userdel http
95        /usr/sbin/groupdel http
96 fi
97
98 %files
99 %defattr(644,root,root,755)
100 %doc [A-Z]* doc/*
101 %attr(755,root,root) %{_sbindir}/mathopd
102 %attr(-, http, http) /home/httpd/*
103 %attr(0755, root, root) /etc/rc.d/init.d/mathopd
104 %config %{_sysconfdir}/mathopd.conf
105 %attr(750,http,http) %dir %{_var}/log/mathopd
This page took 0.035745 seconds and 4 git commands to generate.