]> git.pld-linux.org Git - packages/apache.git/blob - apache.spec
- changed path for id to /bin.
[packages/apache.git] / apache.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        The most widely used Web server on the Internet
3 Summary(de):    Leading World Wide Web-Server
4 Summary(fr):    Le serveur web le plus utilise sur Internet
5 Summary(pl):    Serwer WWW (World Wide Web)
6 Summary(tr):    Lider WWW tarayýcý
7 Name:           apache
8 Version:        1.3.11
9 Release:        4
10 Group:          Networking/Daemons
11 Group(pl):      Sieciowe/Serwery
12 Source0:        ftp://ftp.apache.org/apache/dist/%{name}_%{version}.tar.gz
13 Source1:        apache.init
14 Source2:        apache.logrotate
15 Source3:        apache-icons.tar.gz
16 Source4:        apache.sysconfig
17 Source5:        apache-access.conf
18 Source6:        apache-httpd.conf
19 Source7:        apache-srm.conf
20 Source8:        apache-virtual-host.conf
21 Patch0:         apache-PLD.patch
22 Patch1:         apache-suexec.patch
23 Patch2:         apache-htdocs.patch
24 Patch7:         apache-errordocs.patch
25 Patch8:         apache-apxs.patch
26 Copyright:      BSD-like
27 Provides:       httpd
28 Provides:       webserver
29 Prereq:         /sbin/chkconfig
30 Prereq:         /usr/sbin/useradd
31 Prereq:         /usr/bin/getgid
32 Prereq:         /usr/id
33 Prereq:         sh-utils
34 #BuildRequires: mm-devel
35 Requires:       rc-scripts
36 Requires:       mailcap
37 Requires:       /etc/mime.types
38 URL:            http://www.apache.org/
39 BuildRoot:      /tmp/%{name}-%{version}-root
40 Obsoletes:      apache-extra
41 Obsoletes:      apache6
42
43 %define         _sysconfdir     /etc/httpd
44 %define         _includedir     %{_prefix}/include/apache
45 %define         _datadir        /home/httpd
46 %define         _libexecdir     %{_prefix}/lib/apache
47
48 %description
49 Apache is a powerful, full-featured, efficient and freely-available Web
50 server. Apache is also the most popular Web server on the Internet.
51
52 %description -l de
53 Apache ist ein voll funktionsfähiger Web-Server, der kostenlos
54 erhältlich und weit verbreitet ist.
55
56 %description -l fr
57 Apache est un serveur Web puissant, efficace, gratuit et complet. Apache est
58 aussi le serveur Web le plus populaire sur Internet.
59
60 %description -l pl
61 Apache jest serwerem WWW (World Wide Web). Instaluj±c ten pakiet bêdziesz 
62 móg³ prezentowaæ w³asne strony WWW w sieci internet.
63
64 %description -l tr
65 Apache serbest daðýtýlan ve çok kullanýlan yetenekli bir web sunucusudur.
66
67 %package suexec
68 Summary:        Apache suexec wrapper
69 Summary(pl):    Suexec wrapper do serwera www Apache
70 Group:          Networking/Development
71 Group(pl):      Sieciowe/Programowanie
72 Requires:       %{name} = %{version}
73
74 %description suexec
75 The suEXEC feature provides Apache users the ability to run CGI and SSI
76 programs under user IDs different from the user ID of the calling web-server.
77 Normally, when a CGI or SSI program executes, it runs as the same user 
78 who is running the web server. 
79
80 %description -l pl suexec
81 SuEXEC umo¿liwia serwerowi Apache uruchamianie programów CGI i SSI z innym
82 UID ni¿ wywo³uj±cy je serwer. Normalnie programy CGI i SSI s± wykonywane
83 jako taki sam u¿ytkownik jak serwer WWW.
84
85 %package devel
86 Summary:        Module development tools for the Apache web server
87 Summary(fr):    Les outils de developpement de modules pour le serveur web Apache
88 Summary(pl):    Pliki nag³ówkowe do tworzenai modu³ów rozszerzeñ do serwera www Apache
89 Group:          Networking/Development
90 Group(pl):      Sieciowe/Programowanie
91 Requires:       %{name} = %{version}
92
93 %description devel
94 The apache-devel package contains the source code for the Apache Web server
95 and the APXS binary you'll need to build Dynamic Shared Objects (DSOs) for
96 Apache.
97
98 %description -l fr devel
99 Le package apache-devel contient le code source pour le serveur Web Apache
100 et le binaire APXS dont vous aurez besoin pour construire des Objets
101 Dynamiques Partages (DSOs) pour Apache.
102
103 %description -l pl devel
104 Pliki nag³ówkowe dla serwera WWW Apache.
105
106 %package doc
107 Summary:        Apache dokumentation
108 Summary(pl):    Dokumentacja do Apache
109 Group:          Documentation
110 Group(pl):      Dokumentacja
111 Requires:       %{name} = %{version}
112 Obsoletes:      apache-manual
113
114 %description doc
115 Documentation for apache in HTML format.
116
117 %description -l pl doc
118 Dokumentacja do Apache w formacie HTML.
119
120 %prep 
121 %setup -q -n apache_%{version} -a3
122 %patch0 -p1
123 %patch1 -p1
124 %patch2 -p1
125 %patch7 -p1
126 %patch8 -p1
127
128 %build
129
130 LDFLAGS="-s"
131 export LDFLAGS
132 OPTIM="$RPM_OPT_FLAGS" \
133 ./configure \
134         --prefix=%{_prefix} \
135         --sysconfdir=%{_sysconfdir} \
136         --includedir=%{_includedir} \
137         --sbindir=%{_sbindir} \
138         --libexecdir=%{_libexecdir} \
139         --datadir=%{_datadir} \
140         --localstatedir=/var \
141         --runtimedir=/var/run \
142         --logfiledir=/var/log/httpd \
143         --with-layout=PLD \
144         --without-confadjust \
145         --enable-module=all \
146         --enable-shared=max \
147         --proxycachedir=/var/cache/www/apache \
148         --with-perl=%{_bindir}/perl \
149         --enable-suexec \
150         --suexec-caller=http \
151         --suexec-uidmin=500 \
152         --suexec-gidmin=500 \
153         --disable-rule=WANTHSREGEX
154 make
155
156 %install
157 rm -rf $RPM_BUILD_ROOT
158
159 make install-quiet root="$RPM_BUILD_ROOT"
160
161 #mv $RPM_BUILD_ROOT%{_datadir}/htdocs $RPM_BUILD_ROOT%{_datadir}/html
162
163 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
164         $RPM_BUILD_ROOT%{_datadir}/errordocs \
165         $RPM_BUILD_ROOT/var/{log/{httpd,archiv/httpd},state/apache/mm}
166
167 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apache
168 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd
169 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/apache
170
171 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*
172
173 touch $RPM_BUILD_ROOT/var/log/httpd/{access,error,agent,referer}_log
174
175 install errordocs/* $RPM_BUILD_ROOT%{_datadir}/errordocs
176
177 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/access.conf
178 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
179 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/srm.conf
180 install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/virtual-host.conf
181
182 ln -sf index.html.en $RPM_BUILD_ROOT/home/httpd/html/index.html
183
184 strip --strip-unneeded $RPM_BUILD_ROOT%{_libexecdir}/*.so
185
186 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
187         ABOUT_APACHE src/CHANGES KEYS README
188
189 %pre
190 if [ -n "`getgid http`" ]; then
191         if [ "`getgid http`" != "51" ]; then
192                 echo "Warning: group http haven't gid=51. Corect this before install apache" 1>&2
193                 exit 1
194         fi
195 else
196         /usr/sbin/groupadd -g 51 -r -f http
197         if [ -f /var/db/group.db ]; then
198                 /usr/bin/update-db 1>&2
199         fi
200 fi
201 if [ -n "`id -u http 2>/dev/null`" ]; then
202         if [ "`id -u http`" != "51" ]; then
203                 echo "Warning: user http haven't uid=51. Corect this before install apache" 1>&2
204                 exit 1
205         fi
206 else
207         /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
208         if [ -f /var/db/passwd.db ]; then
209                 /usr/bin/update-db 1>&2
210         fi
211 fi
212
213
214 %post
215 /sbin/chkconfig --add httpd
216 umask 137
217 touch /var/log/httpd/{access,error,agent,referer}_log
218 if [ -f /var/lock/subsys/httpd ]; then
219         /etc/rc.d/init.d/httpd restart 1>&2
220 fi
221
222 %preun
223 if [ "$1" = "0" ]; then
224         if [ -f /var/lock/subsys/httpd ]; then
225                 /etc/rc.d/init.d/httpd stop 1>&2
226         fi
227         /sbin/chkconfig --del httpd
228 fi
229
230 %postun
231 if [ "$1" = "0" ]; then
232         /usr/sbin/userdel http
233         if [ -f /var/db/passwd.db ]; then
234                 /usr/bin/update-db
235         fi
236         /usr/sbin/groupdel http
237         if [ -f /var/db/group.db ]; then
238                 /usr/bin/update-db
239         fi
240 fi
241
242 %clean
243 rm -rf $RPM_BUILD_ROOT
244
245 %files
246 %defattr(644,root,root,755)
247 %doc ABOUT_APACHE.gz src/CHANGES.gz KEYS.gz README.gz
248 %doc conf/mime.types
249
250 %attr(754,root,root) /etc/rc.d/init.d/httpd
251
252 %attr(750,root,root) %dir %{_sysconfdir}
253 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
254 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
255 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/*
256
257 %attr(755,root,root) %dir %{_datadir}/html
258 %config(noreplace) %{_datadir}/html/index.html
259 %lang(ca) %{_datadir}/html/index.html.ca
260 %lang(cz) %{_datadir}/html/index.html.cz
261 %lang(de) %{_datadir}/html/index.html.de
262 %lang(dk) %{_datadir}/html/index.html.dk
263 %lang(ee) %{_datadir}/html/index.html.ee
264 %lang(en) %{_datadir}/html/index.html.en
265 %lang(es) %{_datadir}/html/index.html.es
266 %lang(fr) %{_datadir}/html/index.html.fr
267 %lang(it) %{_datadir}/html/index.html.it
268 %lang(lu) %{_datadir}/html/index.html.lu
269 %lang(nl) %{_datadir}/html/index.html.nl
270 %lang(pt) %{_datadir}/html/index.html.pt
271 %lang(se) %{_datadir}/html/index.html.se
272
273 %{_datadir}/html/*.gif
274 %{_datadir}/errordocs
275 %dir %{_datadir}/icons
276 %{_datadir}/icons/*.gif
277 %dir %{_datadir}/icons/small
278 %{_datadir}/icons/small/*.gif
279 %attr(755,root,root) %{_datadir}/cgi-bin
280
281 %dir %{_libexecdir}
282 %attr(755,root,root) %{_libexecdir}/*
283
284 %attr(755,root,root) %{_bindir}/dbmmanage 
285 %attr(755,root,root) %{_bindir}/htdigest
286 %attr(755,root,root) %{_bindir}/htpasswd
287
288 %attr(755,root,root) %{_sbindir}/ab
289 %attr(755,root,root) %{_sbindir}/apachectl
290 %attr(755,root,root) %{_sbindir}/apxs
291 %attr(755,root,root) %{_sbindir}/httpd
292 %attr(755,root,root) %{_sbindir}/logresolve
293 %attr(755,root,root) %{_sbindir}/rotatelogs
294
295 %dir %attr(750,http,http) /var/cache/www/apache
296
297 %dir %attr(750,http,http) /var/state/apache
298
299 %{_mandir}/man[18]/*
300
301 %attr(750,root,root) %dir /var/log/httpd
302 %attr(750,root,root) %dir /var/log/archiv/httpd
303 %attr(640,root,root) %ghost /var/log/httpd/*
304
305 %files suexec
306 %attr(4755,root,root) %{_sbindir}/suexec
307
308 %files devel
309 %defattr(644,root,root,755) 
310
311 %{_includedir}
312
313 %files doc
314 %defattr(644,root,root,755)
315 %attr(-,root,root) %{_datadir}/html/manual
This page took 0.053945 seconds and 4 git commands to generate.