]>
Commit | Line | Data |
---|---|---|
69654187 ER |
1 | # TODO |
2 | # - dedicated uid (or not?) | |
3 | # - finish files after deps available | |
4 | ||
5 | # | |
6 | # Conditional build: | |
7 | %bcond_without tests # build without tests | |
8 | ||
9 | Summary: Secure, simple and fast HTTP server | |
10 | Name: and-httpd | |
11 | Version: 0.99.11 | |
12 | Release: 0.1 | |
13 | License: LGPL | |
14 | Group: Daemons | |
15 | URL: http://www.and.org/and-httpd/ | |
16 | Source0: http://www.and.org/and-httpd/%{version}/%{name}-%{version}.tar.bz2 | |
17 | # Source0-md5: c0775fa77dc72b4627205d83b2cd3f58 | |
18 | BuildRequires: libcap-devel | |
19 | BuildRequires: perl-base | |
20 | BuildRequires: pkgconfig >= 0.8 | |
21 | BuildRequires: rpmbuild(macros) >= 1.228 | |
22 | BuildRequires: socket_poll-devel | |
23 | BuildRequires: timer_q-devel | |
24 | BuildRequires: vstr-devel | |
25 | Requires(postun): /usr/sbin/userdel | |
26 | Requires(pre): /bin/id | |
27 | Requires(pre): /usr/sbin/useradd | |
28 | Requires(post,preun): /sbin/chkconfig | |
29 | Requires: rc-scripts | |
30 | Requires: vstr >= 1.0.14 | |
31 | Provides: user(http) | |
32 | Provides: webserver | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define httpd_uid 51 | |
36 | %define wwwdir /home/services/httpd | |
37 | ||
38 | %description | |
39 | And-httpd is currently only a URL to file mapping daemon, in other | |
40 | words in can take an incomming URL and map it to a file in a number of | |
41 | ways. However it cannot do CGI or anything like apache-httpd | |
42 | mod_python etc. ... it cannot even dynamically create directory | |
43 | listings, however the -tools package contains utilities that can do | |
44 | them outside of the daemon. | |
45 | ||
46 | %package tools | |
47 | Summary: Tools to help with managing webserver data | |
48 | Group: Development/Tools | |
49 | Requires: perl-base | |
50 | Requires: python | |
51 | Requires: scons | |
52 | ||
53 | %description tools | |
54 | Tools to help managing data under /var/www, including: | |
55 | - automatic directory indexer. | |
56 | - automatic gzip encoding generator. | |
57 | - automatic converter from and-httpd syslog to Apache-httpd combined | |
58 | log. | |
59 | ||
60 | %prep | |
61 | %setup -q | |
62 | ||
63 | %build | |
64 | %configure \ | |
65 | %{?debug:--enable-debug} \ | |
66 | %{?debug:--enable-debug-vstr} \ | |
67 | %{?debug:--enable-debug-timer_q} \ | |
68 | %{nil} | |
69 | ||
70 | %{__make} %{?with_tests:check} | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | %{__make} install \ | |
75 | DESTDIR=$RPM_BUILD_ROOT | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %if 0 | |
81 | %pre | |
82 | %useradd -c "And-httpd" -u %{httpd_uid} -s /sbin/nologin -r -d %{wwwdir} and-httpd | |
83 | ||
84 | %post | |
85 | /sbin/chkconfig --add %{name} | |
86 | %service %{name} restart | |
87 | ||
88 | %preun | |
89 | if [ "$1" = "0" ]; then | |
90 | %service -q %{name} stop | |
91 | /sbin/chkconfig --del %{name} | |
92 | fi | |
93 | %endif | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc %{_datadir}/doc/and-httpd-* | |
98 | %attr(755,root,root) %{_sbindir}/* | |
99 | %attr(755,root,root) %{_bindir}/* | |
100 | %{_sysconfdir}/and-httpd/conf.d/README | |
101 | %attr(754,root,root) /etc/rc.d/init.d/and-httpd | |
102 | %{_sysconfdir}/cron.hourly/and-httpd_* | |
103 | %config(noreplace) %{_sysconfdir}/and-httpd/and-httpd.conf | |
104 | %config(noreplace) %{_sysconfdir}/and-httpd/conf.d/_*.conf | |
105 | %config %{_sysconfdir}/and-httpd/mime_types_extra.txt | |
106 | %{wwwdir}/err/* | |
107 | %{wwwdir}/conf/* | |
108 | %{wwwdir}/conf_tmpl/* | |
109 | %{wwwdir}/html | |
110 | %{wwwdir}/generated_html | |
111 | %{_mandir}/man8/and-httpd* | |
112 | %{_mandir}/man5/and-httpd* | |
113 | ||
114 | %files tools | |
115 | %defattr(644,root,root,755) | |
116 | %{_datadir}/and-httpd-*-tools/* | |
117 | %{_libexecdir}/and-httpd-*-tools/* |