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