]> git.pld-linux.org Git - packages/cherokee.git/blob - cherokee.spec
- bcond header, strict internal dep
[packages/cherokee.git] / cherokee.spec
1 #
2 # Conditional build:
3 %bcond_without  php             # adds PHP support
4 %bcond_with     mono            # adds ASPX support
5 %bcond_with     gnomevfs        # compile the gnomevfs handler (broken)
6 %bcond_without  gnutls          # build with tls=gnutls
7 %bcond_with     openssl         # build with tls=openssl
8 #
9 %if %{with gnutls} || %{with openssl}
10 %define with_tls 1
11 %endif
12 Summary:        Fast, Flexible and Lightweight Web server
13 Summary(pl):    Cherokee - serwer WWW
14 Name:           cherokee
15 Version:        0.4.29
16 Release:        0.15
17 License:        GPL v2
18 Group:          Networking/Daemons
19 Source0:        http://www.0x50.org/download/0.4/0.4.29/%{name}-%{version}.tar.gz
20 # Source0-md5:  854e6e61a69781746496012658d8ef98
21 Source1:        %{name}.init
22 Source2:        %{name}.sysconfig
23 Patch0:         %{name}-config.patch
24 Patch1:         %{name}-php-path.patch
25 URL:            http://www.0x50.org/
26 BuildRequires:  autoconf
27 BuildRequires:  automake
28 BuildRequires:  fcgi-devel
29 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
30 %{?with_gnutls:BuildRequires:   gnutls-devel >= 0.9.99}
31 %{?with_openssl:BuildRequires:  openssl-devel}
32 BuildRequires:  pam-devel
33 BuildRequires:  pcre-devel
34 BuildRequires:  pkgconfig
35 BuildRequires:  rpmbuild(macros) >= 1.268
36 BuildRequires:  zlib-devel
37 Requires(post,postun):  /sbin/ldconfig
38 Requires(post,preun):   rc-scripts
39 Requires(postun):       /usr/sbin/groupdel
40 Requires(postun):       /usr/sbin/userdel
41 Requires(pre):  /bin/id
42 Requires(pre):  /usr/bin/getgid
43 Requires(pre):  /usr/sbin/groupadd
44 Requires(pre):  /usr/sbin/useradd
45 Provides:       group(cherokee)
46 Provides:       group(http)
47 Provides:       user(cherokee)
48 Provides:       webserver
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         _sysconfdir     /etc/cherokee
52 %define         _wwwhome        /home/services/%{name}
53 %define         _wwwroot        %{_wwwhome}/html
54
55 %description
56 Cherokee is a flexible, very fast, lightweight Web server. It is
57 implemented entirely in C, and has no dependencies beyond a standard C
58 library. It is embeddable and extensible wi th plug-ins. It supports
59 on-the-fly configuration by reading files or strings, TLS/SSL (via
60 GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly
61 features, PHP, custom error management, and much more.
62
63 %description -l pl
64 Cherokee to serwer WWW:
65 - SZYBKI i ma³y
66 - mo¿liwy do wbudowania
67 - rozszerzalny przy pomocy wtyczek
68 - z mo¿liwo¶ci± przypisania sposobu obs³ugi do ¶cie¿ek
69 - z obs³ug± serwerów wirtualnych
70 - z obs³ug± FastCGI
71 - z obs³ug± kodowania, w tym GZipa
72 - z obs³ug± loggerów, w tym NCSA
73 - z dynamiczn± lub statyczn± kompilacj± wtyczek
74 - z obs³ug± strumieni
75 - wykonuj±cy popularne zadania: praca jako demon, obs³uga typów MIME,
76   logowanie poprzez sysloga, po³±czenia keep-alive, dzia³anie w
77   ¶rodowisku chrootowanym
78 - o przejrzystym kodzie ;-)
79 - bêd±cy oprogramowaniem wolnodostêpnym.
80
81 %package devel
82 Summary:        Header files for Cherokee web server
83 Summary(pl):    Pliki nag³ówkowe dla serwera WWW Cherokee
84 Group:          Development/Libraries
85 Requires:       %{name} = %{version}-%{release}
86
87 %description devel
88 Header files for Cherokee web server.
89
90 %description devel -l pl
91 Pliki nag³ówkowe dla serwera WWW Cherokee.
92
93 %prep
94 %setup -q
95 %patch0 -p1
96 %patch1 -p1
97
98 %build
99 %{__aclocal} -I m4
100 %{__autoconf}
101 %{__autoheader}
102 %{__automake}
103 %configure \
104         --sysconfdir=/etc \
105         --enable-os-string="PLD Linux" \
106         --with-wwwroot=%{_wwwroot} \
107         --disable-static \
108         %{?with_gnomevfs:--enable-gnomevfs} \
109         %{?with_tls:--enable-tls=%{?with_gnutls:gnutls}%{?with_openssl:openssl}} \
110         --enable-pthreads \
111         %{?with_php:--with-php=%{_prefix}} \
112         %{?with_mono:--with-mono=DIR}
113
114 %{__make}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT{/etc/{pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
119
120 %{__make} install \
121         DESTDIR=$RPM_BUILD_ROOT
122
123 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
124 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
125
126 # users don't need this
127 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
128 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee_logrotate
129
130 # modules dlopened by *.so
131 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
132
133 # unify manual dir
134 rm -rf html
135 mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
136
137 %clean
138 rm -rf $RPM_BUILD_ROOT
139
140 %pre
141 %groupadd -g 161 cherokee
142 %groupadd -g 51 http
143 %useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
144 %addusertogroup cherokee http
145
146 %post
147 /sbin/ldconfig
148 /sbin/chkconfig --add %{name}
149 %service %{name} restart "Cherokee webserver"
150 exit 0
151
152 %preun
153 if [ "$1" = "0" ]; then
154         %service %{name} stop
155         /sbin/chkconfig --del %{name}
156 fi
157
158 %postun
159 /sbin/ldconfig
160 if [ "$1" = "0" ]; then
161         %userremove cherokee
162         %groupremove cherokee
163         %groupremove http
164 fi
165
166 %files
167 %defattr(644,root,root,755)
168 %doc AUTHORS ChangeLog TODO html
169 %dir %attr(750,root,root) %{_sysconfdir}
170 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
171 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/icons.conf
172 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/advanced.conf
173 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
174 %dir %attr(750,root,root) %{_sysconfdir}/mods-available
175 %dir %attr(750,root,root) %{_sysconfdir}/mods-enabled
176 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mods-available/admin
177 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mods-available/ssl
178 %dir %attr(750,root,root) %{_sysconfdir}/sites-available
179 %dir %attr(750,root,root) %{_sysconfdir}/sites-enabled
180 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites-available/default
181 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites-available/example.com
182 %config(missingok) %{_sysconfdir}/sites-enabled/default
183 %dir %attr(750,root,root) %{_sysconfdir}/ssl
184
185 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
186 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
187 %attr(754,root,root) /etc/rc.d/init.d/cherokee
188
189 %attr(755,root,root) %{_bindir}/cget
190 %attr(755,root,root) %{_sbindir}/cherokee
191 %attr(755,root,root) %{_sbindir}/cherokee-panic
192 %attr(755,root,root) %{_sbindir}/cherokee_logrotate
193
194 %dir %{_libdir}/cherokee
195 %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
196 %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
197 %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
198 %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
199 %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
200 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
201 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so
202 %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
203 %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
204 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
205 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
206 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
207 %attr(755,root,root) %{_libdir}/cherokee/libplugin_nn.so
208 %attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so
209 %attr(755,root,root) %{_libdir}/cherokee/libplugin_phpcgi.so
210 %attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so
211 %attr(755,root,root) %{_libdir}/cherokee/libplugin_read_config.so
212 %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
213 %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
214 %attr(755,root,root) %{_libdir}/cherokee/libplugin_w3c.so
215 %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
216 %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
217 %attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.*
218 %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
219
220 %{_mandir}/man1/cherokee.1*
221 %{_mandir}/man1/cget.1*
222 %{_mandir}/man1/cherokee_logrotate.1*
223
224 %{_datadir}/cherokee
225
226 %dir %{_wwwhome}
227 %dir %{_wwwroot}
228 %config(missingok) %{_wwwroot}/*
229
230 %dir %attr(750,root,logs) /var/log/%{name}
231
232 %files devel
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_bindir}/cherokee-config
235
236 %{_libdir}/libcherokee-base.la
237 %{_libdir}/libcherokee-client.la
238 %{_libdir}/libcherokee-config.la
239 %{_libdir}/libcherokee-server.la
240
241 %{_includedir}/cherokee
242 %{_pkgconfigdir}/cherokee.pc
243 %{_aclocaldir}/cherokee.m4
244 %{_mandir}/man1/cherokee-config.1*
This page took 0.112229 seconds and 3 git commands to generate.