]> git.pld-linux.org Git - packages/mathopd.git/blob - mathopd.spec
- changed prio of initscripts from 99 to 95 so it boots before gdm
[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.4b15
5 Release:        2
6 Group:          Networking
7 License:        BSD
8 Source0:        http://mathop.diva.nl/dist/%{name}-%{version}.tar.gz
9 Source1:        %{name}.init
10 Source2:        %{name}.conf
11 URL:            http://www.mathopd.org/
12 Provides:       httpd
13 Provides:       webserver
14 Prereq:         /sbin/chkconfig
15 Prereq:         /usr/sbin/useradd
16 Prereq:         /usr/bin/getgid
17 Prereq:         /bin/id
18 Prereq:         sh-utils
19 Prereq:         rc-scripts
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
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.
27
28
29 %description -l pl
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¶æ
33 rzeczy.
34
35 %prep
36 %setup -q
37
38 %build
39 CFLAGS="%{rpmcflags}"; export CFLAGS
40 cd src
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45
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}
49
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}
53
54 gzip -9nf [A-Z]* doc/*
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %pre
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
63                 exit 1
64         fi
65 else
66         /usr/sbin/groupadd -g 51 -r -f http
67 fi
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
71                 exit 1
72         fi
73 else
74         /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
75 fi
76
77 %post
78 /sbin/chkconfig --add %{name}
79 if [ -f /var/lock/subsys/mathopd ]; then
80         /etc/rc.d/init.d/mathopd restart 1>&2
81 else
82         echo "Run \"/etc/rc.d/init.d/mathopd start\" to start %{name} daemon."
83 fi
84
85 %preun
86 if [ "$1" = "0" ]; then
87         if [ -f /var/lock/subsys/mathopd ]; then
88                 /etc/rc.d/init.d/mathopd stop 1>&2
89         fi
90 fi
91 if [ "$1" = "0" ]; then
92         /sbin/chkconfig --del %{name}
93 fi
94
95 %postun
96 if [ "$1" = "0" ]; then
97         /usr/sbin/userdel http
98         /usr/sbin/groupdel http
99 fi
100
101 %files
102 %defattr(644,root,root,755)
103 %doc doc/*.gz *.gz
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
This page took 0.050366 seconds and 4 git commands to generate.