apache.spec 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. ##
  2. ## apache.spec -- RPM Specification for Apache
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # the additionally used Apache modules
  24. %define mod_ssl yes
  25. %define mod_perl yes
  26. %define mod_php yes
  27. %define mod_dav no
  28. %define mod_layout no
  29. %define mod_macro no
  30. %define mod_auth_pam no
  31. %define mod_gzip yes
  32. %define mod_zmod no
  33. %define mod_fastcgi no
  34. %define mod_throttle no
  35. %define mod_access_referer no
  36. %define mod_roaming no
  37. %define mod_relocate no
  38. # more optional settings
  39. # (requires mod_php set to "yes" above)
  40. %define php_mysql no
  41. %define php_gd yes
  42. # the software versions
  43. %define V_apache 1.3.20
  44. %define V_mod_ssl 2.8.4
  45. %define V_mod_perl 1.26
  46. %define V_mod_php 4.0.6
  47. %define V_mod_dav 1.0.2-1.3.6
  48. %define V_mod_layout 3.0
  49. %define V_mod_macro 1.1.1
  50. %define V_mod_auth_pam 1.0a
  51. %define V_mod_gzip 1.3.19.1a
  52. %define V_mod_zmod 2_3
  53. %define V_mod_fastcgi 2.2.10
  54. %define V_mod_throttle 312
  55. %define V_mod_access_referer 1.0.2
  56. %define V_mod_roaming 1.0.2
  57. %define V_mod_relocate 1.0
  58. # package information
  59. Name: apache
  60. Summary: Apache HTTP Server
  61. URL: http://httpd.apache.org/
  62. Vendor: Apache Software Foundation
  63. Packager: The OpenPKG Project
  64. Distribution: OpenPKG [EXP]
  65. Group: Web
  66. License: BSD-style
  67. Version: %{V_apache}
  68. Release: 22
  69. # list of sources
  70. Source0: http://httpd.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
  71. # %if "%{mod_ssl}" == "yes"
  72. Source1: http://www.modssl.org/source/mod_ssl-%{V_mod_ssl}-%{V_apache}.tar.gz
  73. # %endif
  74. # %if "%{mod_perl}" == "yes"
  75. Source2: http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz
  76. # %endif
  77. # %if "%{mod_php}" == "yes"
  78. Source3: http://www.php.net/distributions/php-%{V_mod_php}.tar.gz
  79. Patch0: ftp://ftp.openpkg.org/DST/php/php-%{V_mod_php}.patch
  80. # %endif
  81. # %if "%{mod_dav}" == "yes"
  82. Source4: http://www.webdav.org/mod_dav/mod_dav-%{V_mod_dav}.tar.gz
  83. # %endif
  84. # %if "%{mod_layout}" == "yes"
  85. Source5: ftp://ftp.tangent.org/pub/apache/mod_layout-%{V_mod_layout}.tar.gz
  86. # %endif
  87. # %if "%{mod_macro}" == "yes"
  88. Source6: http://www.cri.ensmp.fr/~coelho/mod_macro/mod_macro-%{V_mod_macro}.tar.gz
  89. # %endif
  90. # %if "%{mod_auth_pam}" == "yes"
  91. Source7: http://pam.sourceforge.net/mod_auth_pam/mod_auth_pam.tar.gz
  92. # %endif
  93. # %if "%{mod_gzip}" == "yes"
  94. Source8: http://www.remotecommunications.com/apache/mod_gzip/src/%{V_mod_gzip}/mod_gzip.c
  95. # %endif
  96. # %if "%{mod_zmod}" == "yes"
  97. Source9: http://www.ivw.de/???/src.apapi.FIN%{V_mod_zmod}.tar.gz
  98. # %endif
  99. # %if "%{mod_fastcgi}" == "yes"
  100. Source10: http://www.fastcgi.com/dist/mod_fastcgi_%{V_mod_fastcgi}.tar.gz
  101. # %endif
  102. # %if "%{mod_throttle}" == "yes"
  103. Source11: http://www.snert.com/Software/mod_throttle/mod_throttle%{V_mod_throttle}.tgz
  104. # %endif
  105. # %if "%{mod_access_referer}" == "yes"
  106. Source12: http://download.sourceforge.net/accessreferer/mod_access_referer-%{V_mod_access_referer}.tar.gz
  107. # %endif
  108. # %if "%{mod_roaming}" == "yes"
  109. Source13: http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.gz
  110. # %endif
  111. # %if "%{mod_relocate}" == "yes"
  112. Source14: http://www.tangent.org/mod_relocate/mod_relocate-%{V_mod_relocate}.tar.gz
  113. # %endif
  114. Source20: apache.conf
  115. Source21: apache.base
  116. Source22: apache.vhost
  117. Source23: rc.apache
  118. # build information
  119. Prefix: %{l_prefix}
  120. BuildRoot: %{l_buildroot}
  121. BuildPreReq: openpkg >= 0.9-22
  122. PreReq: openpkg >= 0.9-22
  123. %if "%{mod_ssl}" == "yes"
  124. BuildPreReq: openssl, mm
  125. %endif
  126. %if "%{mod_perl}" == "yes"
  127. BuildPreReq: perl
  128. PreReq: perl
  129. %endif
  130. %if "%{mod_php}" == "yes"
  131. BuildPreReq: make
  132. %if "%{php_mysql}" == "yes"
  133. BuildPreReq: mysql
  134. %endif
  135. %if "%{php_gd}" == "yes"
  136. BuildPreReq: gd
  137. %endif
  138. %endif
  139. AutoReq: no
  140. AutoReqProv: no
  141. %description
  142. The Apache Project is a collaborative software development effort
  143. aimed at creating a robust, commercial-grade, featureful, and
  144. freely-available source code implementation of an HTTP (Web) server.
  145. The project is jointly managed by a group of volunteers located
  146. around the world, using the Internet and the Web to communicate,
  147. plan, and develop the server and its related documentation. These
  148. volunteers are known as the Apache Group. In addition, hundreds
  149. of users have contributed ideas, code, and documentation to the
  150. project.
  151. This Apache %{V_apache} package optionally can include:
  152. - mod_ssl %{V_mod_ssl} for HTTPS support.
  153. - mod_perl %{V_mod_perl} for dynamic Perl scripting.
  154. - mod_php %{V_mod_php} for dynamic PHP scripting.
  155. - mod_dav %{V_mod_dav} for WebDAV support.
  156. - mod_layout %{V_mod_layout} for header/footer support.
  157. - mod_macro %{V_mod_macro} for macro support in config files.
  158. - mod_auth_pam %{V_mod_auth_pam} for PAM-based authentication.
  159. - mod_gzip %{V_mod_gzip} for on-the-fly GZIP-based data compression.
  160. - mod_zmod %{V_mod_zmod} for IVW-compliant logfile writing.
  161. - mod_fastcgi %{V_mod_fastcgi} for FastCGI support.
  162. - mod_access_referer %{V_mod_access_referer} for access control via HTTP Referer.
  163. - mod_roaming %{V_mod_roaming} for Netscape Communicator roaming support.
  164. - mod_relocate %{V_mod_relocate} for external URL redirection with logging.
  165. %prep
  166. %setup0 -q -c
  167. %if "%{mod_ssl}" == "yes"
  168. %setup1 -q -T -D -a 1
  169. %endif
  170. %if "%{mod_perl}" == "yes"
  171. %setup2 -q -T -D -a 2
  172. %endif
  173. %if "%{mod_php}" == "yes"
  174. %setup3 -q -T -D -a 3
  175. %patch0 -p0
  176. %endif
  177. %if "%{mod_dav}" == "yes"
  178. %setup4 -q -T -D -a 4
  179. %endif
  180. %if "%{mod_layout}" == "yes"
  181. %setup5 -q -T -D -a 5
  182. %endif
  183. %if "%{mod_macro}" == "yes"
  184. %setup6 -q -T -D -a 6
  185. %endif
  186. %if "%{mod_auth_pam}" == "yes"
  187. %setup7 -q -T -D -a 7
  188. %endif
  189. %if "%{mod_zmod}" == "yes"
  190. %setup9 -q -T -D -a 9
  191. %endif
  192. %if "%{mod_fastcgi}" == "yes"
  193. %setup10 -q -T -D -a 10
  194. %endif
  195. %if "%{mod_throttle}" == "yes"
  196. %setup11 -q -T -D -a 11
  197. %endif
  198. %if "%{mod_access_referer}" == "yes"
  199. %setup12 -q -T -D -a 12
  200. %endif
  201. %if "%{mod_roaming}" == "yes"
  202. %setup13 -q -T -D -a 13
  203. %endif
  204. %if "%{mod_relocate}" == "yes"
  205. %setup14 -q -T -D -a 14
  206. %endif
  207. %build
  208. PATH="%{l_prefix}/bin:%{l_prefix}/sbin:$PATH"; export PATH
  209. rm -rf $RPM_BUILD_ROOT
  210. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  211. %if "%{mod_ssl}" == "yes"
  212. ( cd mod_ssl-%{V_mod_ssl}-%{V_apache}
  213. ./configure \
  214. --with-apache=../apache_%{V_apache} \
  215. --expert
  216. )
  217. %endif
  218. %if "%{mod_php}" == "yes" || "%{mod_dav}" == "yes"
  219. ( cd apache_%{V_apache}
  220. CC="%{l_cc}" \
  221. CFLAGS="%{l_cflags -O}" \
  222. ./configure \
  223. %if "%{mod_ssl}" == "yes"
  224. --enable-rule=EAPI \
  225. %endif
  226. --target=apache \
  227. --with-layout=GNU \
  228. --prefix=%{l_prefix} \
  229. --sbindir=%{l_prefix}/sbin \
  230. --sysconfdir=%{l_prefix}/etc/apache \
  231. --libexecdir=%{l_prefix}/lib/apache \
  232. --datadir=%{l_prefix}/share/apache \
  233. --localstatedir=%{l_prefix}/var/apache \
  234. --without-confadjust
  235. )
  236. %endif
  237. %if "%{mod_perl}" == "yes"
  238. ( cd mod_perl-%{V_mod_perl}
  239. eval `%{l_prefix}/bin/perl -V:archname`
  240. eval `%{l_prefix}/bin/perl -V:version`
  241. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  242. perl=$RPM_BUILD_ROOT%{l_prefix}/bin/perl
  243. echo "#!/bin/sh" >$perl
  244. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  245. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  246. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  247. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  248. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  249. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  250. echo " \"\$@\"" >>$perl
  251. chmod a+x $perl
  252. $perl Makefile.PL \
  253. PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
  254. APACHE_SRC=../apache_%{V_apache}/src \
  255. DO_HTTPD=1 \
  256. USE_APACI=1 \
  257. PREP_HTTPD=1 \
  258. EVERYTHING=1 \
  259. PERL_TIE_TABLES=1 \
  260. PERL_DIRECTIVE_HANDLERS=1
  261. %{l_make} %{l_mflags}
  262. %{l_make} %{l_mflags} install
  263. mkdir $RPM_BUILD_ROOT%{l_prefix}/perl5
  264. mv $RPM_BUILD_ROOT%{l_prefix}/lib/* $RPM_BUILD_ROOT%{l_prefix}/perl5/
  265. mv $RPM_BUILD_ROOT%{l_prefix}/perl5 $RPM_BUILD_ROOT%{l_prefix}/lib/
  266. %{l_rpmtool} subst "s;^\\(PERL = \\).*;\\1 $perl;" \
  267. -- ../apache_%{V_apache}/src/modules/perl/mod_perl.config
  268. )
  269. %endif
  270. %if "%{mod_php}" == "yes"
  271. ( cd php-%{V_mod_php}
  272. CC="%{l_cc}" \
  273. %if "%{mod_ssl}" == "yes"
  274. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -DEAPI" \
  275. %else
  276. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  277. %endif
  278. CPPFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  279. LDFLAGS="%{l_cflags -O} -L%{l_prefix}/lib" \
  280. %if "%{php_gd}" == "yes"
  281. LIBS="-lpng -lz" \
  282. %endif
  283. ./configure \
  284. --prefix=%{l_prefix} \
  285. --with-apache=../apache_%{V_apache} \
  286. --with-config-file-path=%{l_prefix}/etc/apache \
  287. %if "%{php_mysql}" == "yes"
  288. --with-mysql=%{l_prefix} \
  289. %endif
  290. %if "%{php_gd}" == "yes"
  291. --with-gd=%{l_prefix} \
  292. %endif
  293. --disable-shared \
  294. --enable-track-vars
  295. %{l_make} %{l_mflags}
  296. %{l_rpmtool} subst \
  297. "s;^\\(EXTENSION_DIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
  298. "s;^\\(PEAR_INSTALLDIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
  299. -- config_vars.mk
  300. %{l_make} %{l_mflags} install \
  301. prefix=$RPM_BUILD_ROOT%{l_prefix}
  302. )
  303. %endif
  304. %if "%{mod_dav}" == "yes"
  305. ( cd mod_dav-%{V_mod_dav}
  306. CC="%{l_cc}" \
  307. %if "%{mod_ssl}" == "yes"
  308. CFLAGS="%{l_cflags -O}" \
  309. %else
  310. CFLAGS="%{l_cflags -O} -DEAPI" \
  311. %endif
  312. LDFLAGS="%{l_cflags -O}" \
  313. ./configure \
  314. --with-apache=../apache_%{V_apache}
  315. %{l_make} %{l_mflags}
  316. %{l_make} %{l_mflags} install
  317. )
  318. %endif
  319. %if "%{mod_layout}" == "yes"
  320. ( cd mod_layout-%{V_mod_layout}
  321. mkdir ../apache_%{V_apache}/src/modules/layout
  322. cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
  323. chmod -R u+w ../apache_%{V_apache}/src/modules/layout
  324. )
  325. %endif
  326. %if "%{mod_macro}" == "yes"
  327. ( cd mod_macro-%{V_mod_macro}
  328. cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
  329. )
  330. %endif
  331. %if "%{mod_auth_pam}" == "yes"
  332. ( cd mod_auth_pam-%{V_mod_auth_pam}
  333. cp mod_auth_pam.c ../apache_%{V_apache}/src/modules/extra/
  334. )
  335. %endif
  336. %if "%{mod_gzip}" == "yes"
  337. cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
  338. %endif
  339. %if "%{mod_zmod}" == "yes"
  340. ( cd src
  341. mkdir ../apache_%{V_apache}/src/modules/zmod
  342. %{l_rpmtool} subst 's;"compat.h";"ap_compat.h";' -- modules/zmod/mod_zmod.c
  343. cp modules/zmod/* ../apache_%{V_apache}/src/modules/zmod/
  344. )
  345. %endif
  346. %if "%{mod_fastcgi}" == "yes"
  347. ( cd mod_fastcgi_%{V_mod_fastcgi}
  348. mkdir ../apache_%{V_apache}/src/modules/fastcgi
  349. cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
  350. )
  351. %endif
  352. %if "%{mod_throttle}" == "yes"
  353. ( cd mod_throttle-*
  354. cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
  355. )
  356. %endif
  357. %if "%{mod_access_referer}" == "yes"
  358. ( cd mod_access_referer-%{V_mod_access_referer}
  359. cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
  360. )
  361. %endif
  362. %if "%{mod_roaming}" == "yes"
  363. ( cd mod_roaming-%{V_mod_roaming}
  364. cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
  365. )
  366. %endif
  367. %if "%{mod_relocate}" == "yes"
  368. ( cd mod_relocate-%{V_mod_relocate}
  369. cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
  370. )
  371. %endif
  372. ( cd apache_%{V_apache}
  373. CC="%{l_cc}" \
  374. CFLAGS="%{l_cflags -O}" \
  375. %if "%{mod_ssl}" == "yes"
  376. EAPI_MM="%{l_prefix}" \
  377. SSL_BASE="%{l_prefix}" \
  378. %endif
  379. %if "%{mod_auth_pam}" == "yes"
  380. LIBS="$LIBS -lpam" \
  381. %endif
  382. ./configure \
  383. --target=apache \
  384. --with-layout=GNU \
  385. --prefix=%{l_prefix} \
  386. --sbindir=%{l_prefix}/sbin \
  387. --sysconfdir=%{l_prefix}/etc/apache \
  388. --libexecdir=%{l_prefix}/lib/apache \
  389. --datadir=%{l_prefix}/share/apache \
  390. --localstatedir=%{l_prefix}/var/apache \
  391. --without-confadjust \
  392. --enable-suexec \
  393. --suexec-caller=%{l_fsusr} \
  394. --suexec-userdir=.www \
  395. --enable-module=most \
  396. --with-perl=%{l_prefix}/bin/perl \
  397. %if "%{mod_ssl}" == "yes"
  398. --enable-rule=EAPI \
  399. --enable-module=ssl \
  400. %endif
  401. %if "%{mod_perl}" == "yes"
  402. --activate-module=src/modules/perl/libperl.a \
  403. %endif
  404. %if "%{mod_php}" == "yes"
  405. --activate-module=src/modules/php4/libphp4.a \
  406. %endif
  407. %if "%{mod_dav}" == "yes"
  408. --activate-module=src/modules/dav/libdav.a \
  409. %endif
  410. %if "%{mod_layout}" == "yes"
  411. --activate-module=src/modules/layout/liblayout.a \
  412. %endif
  413. %if "%{mod_macro}" == "yes"
  414. --activate-module=src/modules/extra/mod_macro.o \
  415. %endif
  416. %if "%{mod_auth_pam}" == "yes"
  417. --activate-module=src/modules/extra/mod_auth_pam.o \
  418. %endif
  419. %if "%{mod_gzip}" == "yes"
  420. --activate-module=src/modules/extra/mod_gzip.o \
  421. %endif
  422. %if "%{mod_zmod}" == "yes"
  423. --activate-module=src/modules/zmod/libzmod.a \
  424. %endif
  425. %if "%{mod_fastcgi}" == "yes"
  426. --activate-module=src/modules/fastcgi/libfastcgi.a \
  427. %endif
  428. %if "%{mod_throttle}" == "yes"
  429. --activate-module=src/modules/extra/mod_throttle.o \
  430. %endif
  431. %if "%{mod_access_referer}" == "yes"
  432. --activate-module=src/modules/extra/mod_access_referer.o \
  433. %endif
  434. %if "%{mod_roaming}" == "yes"
  435. --activate-module=src/modules/extra/mod_roaming.o \
  436. %endif
  437. %if "%{mod_relocate}" == "yes"
  438. --activate-module=src/modules/extra/mod_relocate.o \
  439. %endif
  440. --enable-module=so
  441. %{l_make} %{l_mflags -O} build-quiet
  442. )
  443. %install
  444. ( cd apache_%{V_apache}
  445. %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
  446. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
  447. $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
  448. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
  449. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/README*
  450. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/*.default
  451. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/srm.conf
  452. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/access.conf
  453. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.en \
  454. $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html
  455. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.*
  456. chmod a+rx $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin/*
  457. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin \
  458. $RPM_BUILD_ROOT%{l_prefix}/cgi/
  459. rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
  460. )
  461. %if "%{mod_perl}" == "yes"
  462. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
  463. %endif
  464. l_hostname=`%{l_shtool} echo -e %h`
  465. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  466. %{l_shtool} install -c -m 644 \
  467. -e "s;@l_prefix@;%{l_prefix};g" \
  468. -e "s;@l_hostname@;$l_hostname;g" \
  469. -e "s;@l_domainname@;$l_domainname;g" \
  470. -e "s;@l_npusr@;%{l_npusr};g" \
  471. -e "s;@l_npgrp@;%{l_npgrp};g" \
  472. %{SOURCE apache.base} \
  473. %{SOURCE apache.conf} \
  474. %{SOURCE apache.vhost} \
  475. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  476. mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
  477. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  478. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  479. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  480. -e 's;@l_fsusr@;%{l_fsusr};g' -e 's;@l_fsgrp@;%{l_fsgrp};g' \
  481. %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  482. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  483. %{l_files_std} \
  484. '%attr(4755,root,%{l_fsgrp}) %{l_prefix}/sbin/suexec' \
  485. '%config %{l_prefix}/etc/apache/*' \
  486. '%config %attr(444,%{l_fsusr},%{l_fsgrp}) %{l_prefix}/etc/apache/apache.base'
  487. %files -f files
  488. %clean
  489. rm -rf $RPM_BUILD_ROOT