]> git.pld-linux.org Git - packages/mathopd.git/blob - mathopd.spec
Release 6 (by relup.sh)
[packages/mathopd.git] / mathopd.spec
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
3 Name:           mathopd
4 Version:        1.5
5 Release:        6
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 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
24 Provides:       group(http)
25 Provides:       user(http)
26 Provides:       webserver
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _datadir        /home/services/httpd
30
31 %description
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.
36
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ść
41 rzeczy.
42
43 %prep
44 %setup -q -n %{name}-%{version}p3
45 %patch0 -p1
46
47 cp -f %{SOURCE3}  dir_cgi.c
48
49 %build
50 CFLAGS="%{rpmcflags}"; export CFLAGS
51 %{__cc} %{rpmcflags} %{rpmldflags} -o mathopd-dir_cgi dir_cgi.c
52
53 cd src
54 %{__make} CC="%{__cc}"
55
56 %install
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}
61
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}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %pre
71 %groupadd -g 51 -r -f http
72 %useradd -u 51 -r -d %{_datadir} -s /bin/false -c "HTTP User" -g http http
73
74 %post
75 /sbin/chkconfig --add %{name}
76 %service mathopd restart "%{name} HTTP daemon"
77
78 %preun
79 if [ "$1" = "0" ]; then
80         %service mathopd stop
81         /sbin/chkconfig --del %{name}
82 fi
83
84 %postun
85 if [ "$1" = "0" ]; then
86         %userremove http
87         %groupremove http
88 fi
89
90 %files
91 %defattr(644,root,root,755)
92 %doc [A-Z]* doc/*
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
This page took 0.028495 seconds and 3 git commands to generate.