]> git.pld-linux.org Git - packages/apache.git/blob - apache.spec
- new IPv6 patches from KAME and Japan Linux IPv6 Users Group
[packages/apache.git] / apache.spec
1 Summary:        HTTP server daemon to provide WWW services with IPv6 support
2 Summary(de):    Leading World Wide Web-Server
3 Summary(fr):    Serveur Web leader du marché
4 Summary(pl):    Serwer WWW (World Wide Web) ze wsparciem dla IPv6
5 Summary(tr):    Lider WWW tarayýcý
6 Name:           apache
7 Version:        1.3.9
8 Release:        5
9 Group:          Networking/Daemons
10 Group(pl):      Sieciowe/Serwery
11 Source0:        ftp://ftp.apache.org/apache/dist/%{name}_%{version}.tar.gz
12 Source1:        apache.init
13 Source2:        apache.logrotate
14 Source3:        apache-extra1.tar.bz2
15 Source8:        apache.sysconfig
16 Patch0:         apache-suexec.patch
17 Patch1:         ftp://ftp.kame.net/pub/kame/misc/apache-139-v6-19991013a.diff.gz
18 Patch2:         ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/apache-139-v6-19991013a.new4.patch.gz
19 Patch3:         ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/apache-139-v6-19991013a.new4_to_4.1.patch
20 Patch4:         apache-htdocs.patch
21 Patch5:         apache-release.patch
22 Patch6:         apache-pld.patch
23 Copyright:      BSD-like
24 Provides:       httpd
25 Provides:       webserver
26 Prereq:         /sbin/chkconfig
27 Prereq:         /usr/sbin/useradd
28 Prereq:         /usr/bin/getgid
29 Prereq:         /usr/bin/id
30 Prereq:         sh-utils
31 Requires:       rc-scripts
32 URL:            http://www.apache.org/
33 BuildRoot:      /tmp/%{name}-%{version}-root
34 Obsoletes:      apache-extra
35 Obsoletes:      apache6
36
37 %define         _sysconfdir     /etc/httpd
38 %define         _includedir     %{_prefix}/include/apache
39 %define         _datadir        /home/httpd
40 %define         _libexecdir     %{_prefix}/lib/apache
41
42 %description
43 Apache is a full featured web server that is freely available, and also
44 happens to be the most widely used. This version supports IPv6.
45
46 %description -l de
47 Apache ist ein voll funktionsfähiger Web-Server, der kostenlos
48 erhältlich und weit verbreitet ist.
49
50 %description -l fr
51 Apache est un serveur Web complet, disponible librement, et se trouve être
52 aussi le plus utilisé à travers le monde.
53
54 %description -l pl
55 Apache jest serwerem WWW (World Wide Web). Instaluj±c ten pakiet bêdziesz 
56 móg³ prezentowaæ w³asne strony WWW w sieci internet. Apache umo¿liwia równie¿
57 konfigurowanie serwerów wirtualnych. Ta wersja wspiera IPv6.
58
59 %description -l tr
60 Apache serbest daðýtýlan ve çok kullanýlan yetenekli bir web sunucusudur.
61
62 %package suexec
63 Summary:        Apache suexec wrapper
64 Summary(pl):    Suexec wrapper do serwera www Apache
65 Group:          Networking/Development
66 Group(pl):      Sieciowe/Programowanie
67 Requires:       %{name} = %{version}
68
69 %description suexec
70 The suEXEC feature provides Apache users the ability to run CGI and SSI
71 programs under user IDs different from the user ID of the calling web-server.
72 Normally, when a CGI or SSI program executes, it runs as the same user 
73 who is running the web server. 
74
75 %description -l pl suexec
76 SuEXEC umo¿liwia serwerowi Apache uruchamianie programów CGI i SSI z innym
77 UID ni¿ wywo³uj±cy je serwer. Normalnie programy CGI i SSI s± wykonywane
78 jako taki sam u¿ytkownik jak serwer WWW.
79
80 %package devel
81 Summary:        Apache include files
82 Summary(pl):    Pliki nag³ówkowe do serwera www Apache
83 Group:          Networking/Development
84 Group(pl):      Sieciowe/Programowanie
85 Requires:       %{name} = %{version}
86
87 %description devel
88 Apache include files.
89
90 %description -l pl devel
91 Pliki nag³ówkowe dla serwera WWW Apache.
92
93 %package doc
94 Summary:        Apache dokumentation
95 Summary(pl):    Dokumentacja do Apache
96 Group:          Documentation
97 Group(pl):      Dokumentacja
98 Requires:       %{name} = %{version}
99
100 %description doc
101 Documentation for apache in HTML format.
102
103 %description -l pl doc
104 Dokumentacja do Apache w formacie HTML.
105
106 %prep 
107 %setup -q -n apache_%{version} -a3
108 %patch0 -p1
109 %patch1 -p1
110 %patch2 -p1
111 %patch3 -p1
112 %patch4 -p1
113 %patch5 -p1
114 %patch6 -p1
115
116 %build
117 OPTIM="$RPM_OPT_FLAGS" LDFLAGS="-s" \
118 ./configure \
119         --prefix=%{_prefix} \
120         --sysconfdir=%{_sysconfdir} \
121         --includedir=%{_includedir} \
122         --sbindir=%{_sbindir} \
123         --libexecdir=%{_libexecdir} \
124         --datadir=%{_datadir} \
125         --localstatedir=/var \
126         --runtimedir=/var/run \
127         --logfiledir=/var/log/httpd \
128         --with-layout=PLD \
129         --without-confadjust \
130         --enable-module=all \
131         --enable-shared=max \
132         --proxycachedir=/var/cache/www/apache \
133         --with-perl=%{_bindir}/perl \
134         --enable-suexec \
135         --suexec-caller=http \
136         --suexec-uidmin=500 \
137         --suexec-gidmin=500 \
138         --enable-rule=INET6 \
139         --disable-rule=WANTHSREGEX
140 make
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144
145 make install-quiet root="$RPM_BUILD_ROOT"
146
147 #mv $RPM_BUILD_ROOT%{_datadir}/htdocs $RPM_BUILD_ROOT%{_datadir}/html
148
149 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
150         $RPM_BUILD_ROOT/var/log/httpd
151
152 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apache
153 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd
154 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/apache
155
156 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*
157
158 touch $RPM_BUILD_ROOT/var/log/httpd/{access,error,agent,referer}_log
159
160 cp -a apache-extra/errordocs    $RPM_BUILD_ROOT%{_datadir}/
161 cp -a apache-extra/icons/*      $RPM_BUILD_ROOT%{_datadir}/icons
162 cp -a apache-extra/*.conf       $RPM_BUILD_ROOT%{_sysconfdir}
163 cp -a apache-extra/m*           $RPM_BUILD_ROOT%{_sysconfdir}
164
165 strip $RPM_BUILD_ROOT%{_libexecdir}/* || :
166
167 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
168         ABOUT_APACHE src/CHANGES KEYS README README.v6
169
170 %pre
171 if [ -n "`getgid http`" ]; then
172         if [ "`getgid http`" != "51" ]; then
173                 echo "Warning: group http haven't gid=51. Corect this before install apache" 1>&2
174                 exit 1
175         fi
176 else
177         /usr/sbin/groupadd -g 51 -r -f http
178         if [ -f /var/db/group.db ]; then
179                 /usr/bin/update-db 1>&2
180         fi
181 fi
182 if [ -n "`id -u http 2>/dev/null`" ]; then
183         if [ "`id -u http`" != "51" ]; then
184                 echo "Warning: user http haven't uid=51. Corect this before install apache" 1>&2
185                 exit 1
186         fi
187 else
188         /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
189         if [ -f /var/db/passwd.db ]; then
190                 /usr/bin/update-db 1>&2
191         fi
192 fi
193
194
195 %post
196 /sbin/chkconfig --add httpd
197 umask 137
198 touch /var/log/httpd/{access,error,agent,referer}_log
199 if [ -f /var/lock/subsys/httpd ]; then
200         /etc/rc.d/init.d/httpd restart 1>&2
201 fi
202
203 %preun
204 if [ "$1" = "0" ]; then
205         if [ -f /var/lock/subsys/httpd ]; then
206                 /etc/rc.d/init.d/httpd stop 1>&2
207         fi
208         /sbin/chkconfig --del httpd
209 fi
210
211 %postun
212 if [ "$1" = "0" ]; then
213         /usr/sbin/userdel http
214         if [ -f /var/db/passwd.db ]; then
215                 /usr/bin/update-db
216         fi
217         /usr/sbin/groupdel http
218         if [ -f /var/db/group.db ]; then
219                 /usr/bin/update-db
220         fi
221 fi
222
223 %clean
224 rm -rf $RPM_BUILD_ROOT
225
226 %files
227 %defattr(644,root,root,755)
228 %doc ABOUT_APACHE.gz src/CHANGES.gz KEYS.gz README.gz
229 %doc conf/mime.types README.v6.gz
230
231 %attr(754,root,root) /etc/rc.d/init.d/*
232
233 %attr(751,root,root) %dir %{_sysconfdir}
234 %attr(640,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/*
235 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/*
236 %attr(640,root,root) %config /etc/logrotate.d/*
237
238 %attr(755,root,root) %dir %{_datadir}/html
239 %config(noreplace) %{_datadir}/html/index.html
240 %{_datadir}/html/*.gif
241 %{_datadir}/errordocs
242 %dir %{_datadir}/icons
243 %{_datadir}/icons/*.gif
244 %attr(755,root,root) %{_datadir}/cgi-bin
245
246 %dir %{_libexecdir}
247 %attr(755,root,root) %{_libexecdir}/*
248
249 %attr(755,root,root) %{_bindir}/dbmmanage 
250 %attr(755,root,root) %{_bindir}/htdigest
251 %attr(755,root,root) %{_bindir}/htpasswd
252
253 %attr(755,root,root) %{_sbindir}/ab
254 %attr(755,root,root) %{_sbindir}/apachectl
255 %attr(755,root,root) %{_sbindir}/apxs
256 %attr(755,root,root) %{_sbindir}/httpd
257 %attr(755,root,root) %{_sbindir}/logresolve
258 %attr(755,root,root) %{_sbindir}/rotatelogs
259
260 %dir %attr(750,http,http) /var/cache/www/apache
261
262 %{_mandir}/man[18]/*
263
264 %attr(750,root,root) %dir /var/log/httpd
265 %attr(640,root,root) %ghost /var/log/httpd/*
266
267 %files suexec
268 %attr(4755,root,root) %{_sbindir}/suexec
269
270 %files devel
271 %defattr(644,root,root,755) 
272
273 %{_includedir}
274
275 %files doc
276 %defattr(644,root,root,755)
277 %attr(-,root,root) %{_datadir}/html/manual
This page took 0.043693 seconds and 3 git commands to generate.