]> git.pld-linux.org Git - packages/mathopd.git/blob - mathopd.spec
- drop Provides: httpd
[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.5
5 Release:        1
6 License:        BSD
7 Group:          Networking
8 Source0:        http://www.mathopd.org/dist/%{name}-%{version}p3.tar.gz
9 # Source0-md5:  6e0fea187134cb52509c2f98a8644d11
10 Source1:        %{name}.init
11 Source2:        %{name}.conf
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
23 Provides:       group(http)
24 Provides:       user(http)
25 Provides:       webserver
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _datadir        /home/services/httpd
29
30 %description
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.
35
36 %description -l pl
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¶æ
40 rzeczy.
41
42 %prep
43 %setup -q -n %{name}-%{version}p3
44
45 cp -f %{SOURCE3}  dir_cgi.c
46
47 %build
48 CFLAGS="%{rpmcflags}"; export CFLAGS
49
50 %{__cc} %{rpmcflags} %{rpmldflags} -o mathopd-dir_cgi dir_cgi.c
51
52 cd src
53 %{__make} CC="%{__cc}"
54
55 %install
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}
60
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}
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %pre
70 %groupadd -g 51 -r -f http
71 %useradd -u 51 -r -d %{_datadir} -s /bin/false -c "HTTP User" -g http http
72
73 %post
74 /sbin/chkconfig --add %{name}
75 if [ -f /var/lock/subsys/mathopd ]; then
76         /etc/rc.d/init.d/mathopd restart 1>&2
77 else
78         echo "Run \"/etc/rc.d/init.d/mathopd start\" to start %{name} HTTP daemon."
79 fi
80
81 %preun
82 if [ "$1" = "0" ]; then
83         if [ -f /var/lock/subsys/mathopd ]; then
84                 /etc/rc.d/init.d/mathopd stop 1>&2
85         fi
86         /sbin/chkconfig --del %{name}
87 fi
88
89 %postun
90 if [ "$1" = "0" ]; then
91         %userremove http
92         %groupremove http
93 fi
94
95 %files
96 %defattr(644,root,root,755)
97 %doc [A-Z]* doc/*
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
This page took 0.028547 seconds and 3 git commands to generate.