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