apache.spec 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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 no
  25. %define mod_perl no
  26. %define mod_php no
  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 no
  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 no
  42. # the software versions
  43. %define V_apache 1.3.22
  44. %define V_mod_ssl 2.8.5
  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.1
  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: %{l_branch}.0
  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-20011022.0
  122. PreReq: openpkg >= 0.9-20011022.0
  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. )
  235. %endif
  236. %if "%{mod_perl}" == "yes"
  237. ( cd mod_perl-%{V_mod_perl}
  238. eval `%{l_prefix}/bin/perl -V:archname`
  239. eval `%{l_prefix}/bin/perl -V:version`
  240. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  241. perl=$RPM_BUILD_ROOT%{l_prefix}/bin/perl
  242. echo "#!/bin/sh" >$perl
  243. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  244. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  245. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  246. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  247. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  248. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  249. echo " \"\$@\"" >>$perl
  250. chmod a+x $perl
  251. $perl Makefile.PL \
  252. PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
  253. APACHE_SRC=../apache_%{V_apache}/src \
  254. DO_HTTPD=1 \
  255. USE_APACI=1 \
  256. PREP_HTTPD=1 \
  257. EVERYTHING=1 \
  258. PERL_TIE_TABLES=1 \
  259. PERL_DIRECTIVE_HANDLERS=1
  260. %{l_make} %{l_mflags}
  261. %{l_make} %{l_mflags} install
  262. mkdir $RPM_BUILD_ROOT%{l_prefix}/perl5
  263. mv $RPM_BUILD_ROOT%{l_prefix}/lib/* $RPM_BUILD_ROOT%{l_prefix}/perl5/
  264. mv $RPM_BUILD_ROOT%{l_prefix}/perl5 $RPM_BUILD_ROOT%{l_prefix}/lib/
  265. %{l_rpmtool} subst "s;^\\(PERL = \\).*;\\1 $perl;" \
  266. -- ../apache_%{V_apache}/src/modules/perl/mod_perl.config
  267. )
  268. %endif
  269. %if "%{mod_php}" == "yes"
  270. ( cd php-%{V_mod_php}
  271. CC="%{l_cc}" \
  272. %if "%{mod_ssl}" == "yes"
  273. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -DEAPI" \
  274. %else
  275. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  276. %endif
  277. CPPFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  278. LDFLAGS="%{l_cflags -O} -L%{l_prefix}/lib" \
  279. %if "%{php_gd}" == "yes"
  280. LIBS="-lpng -lz" \
  281. %endif
  282. ./configure \
  283. --prefix=%{l_prefix} \
  284. --with-apache=../apache_%{V_apache} \
  285. --with-config-file-path=%{l_prefix}/etc/apache \
  286. %if "%{php_mysql}" == "yes"
  287. --with-mysql=%{l_prefix} \
  288. %endif
  289. %if "%{php_gd}" == "yes"
  290. --with-gd=%{l_prefix} \
  291. %endif
  292. --disable-shared \
  293. --enable-track-vars
  294. %{l_make} %{l_mflags}
  295. %{l_rpmtool} subst \
  296. "s;^\\(EXTENSION_DIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
  297. "s;^\\(PEAR_INSTALLDIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
  298. -- config_vars.mk
  299. %{l_make} %{l_mflags} install \
  300. prefix=$RPM_BUILD_ROOT%{l_prefix}
  301. )
  302. %endif
  303. %if "%{mod_dav}" == "yes"
  304. ( cd mod_dav-%{V_mod_dav}
  305. CC="%{l_cc}" \
  306. %if "%{mod_ssl}" == "yes"
  307. CFLAGS="%{l_cflags -O}" \
  308. %else
  309. CFLAGS="%{l_cflags -O} -DEAPI" \
  310. %endif
  311. LDFLAGS="%{l_cflags -O}" \
  312. ./configure \
  313. --with-apache=../apache_%{V_apache}
  314. %{l_make} %{l_mflags}
  315. %{l_make} %{l_mflags} install
  316. )
  317. %endif
  318. %if "%{mod_layout}" == "yes"
  319. ( cd mod_layout-%{V_mod_layout}
  320. mkdir ../apache_%{V_apache}/src/modules/layout
  321. cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
  322. chmod -R u+w ../apache_%{V_apache}/src/modules/layout
  323. )
  324. %endif
  325. %if "%{mod_macro}" == "yes"
  326. ( cd mod_macro-%{V_mod_macro}
  327. cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
  328. )
  329. %endif
  330. %if "%{mod_auth_pam}" == "yes"
  331. ( cd mod_auth_pam-%{V_mod_auth_pam}
  332. cp mod_auth_pam.c ../apache_%{V_apache}/src/modules/extra/
  333. )
  334. %endif
  335. %if "%{mod_gzip}" == "yes"
  336. cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
  337. %endif
  338. %if "%{mod_zmod}" == "yes"
  339. ( cd src
  340. mkdir ../apache_%{V_apache}/src/modules/zmod
  341. %{l_rpmtool} subst 's;"compat.h";"ap_compat.h";' -- modules/zmod/mod_zmod.c
  342. cp modules/zmod/* ../apache_%{V_apache}/src/modules/zmod/
  343. )
  344. %endif
  345. %if "%{mod_fastcgi}" == "yes"
  346. ( cd mod_fastcgi_%{V_mod_fastcgi}
  347. mkdir ../apache_%{V_apache}/src/modules/fastcgi
  348. cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
  349. )
  350. %endif
  351. %if "%{mod_throttle}" == "yes"
  352. ( cd mod_throttle-*
  353. cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
  354. )
  355. %endif
  356. %if "%{mod_access_referer}" == "yes"
  357. ( cd mod_access_referer-%{V_mod_access_referer}
  358. cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
  359. )
  360. %endif
  361. %if "%{mod_roaming}" == "yes"
  362. ( cd mod_roaming-%{V_mod_roaming}
  363. cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
  364. )
  365. %endif
  366. %if "%{mod_relocate}" == "yes"
  367. ( cd mod_relocate-%{V_mod_relocate}
  368. cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
  369. )
  370. %endif
  371. ( cd apache_%{V_apache}
  372. CC="%{l_cc}" \
  373. CFLAGS="%{l_cflags -O}" \
  374. %if "%{mod_ssl}" == "yes"
  375. EAPI_MM="%{l_prefix}" \
  376. SSL_BASE="%{l_prefix}" \
  377. %endif
  378. %if "%{mod_auth_pam}" == "yes"
  379. LIBS="$LIBS -lpam" \
  380. %endif
  381. ./configure \
  382. --target=apache \
  383. --with-layout=GNU \
  384. --prefix=%{l_prefix} \
  385. --sbindir=%{l_prefix}/sbin \
  386. --sysconfdir=%{l_prefix}/etc/apache \
  387. --libexecdir=%{l_prefix}/lib/apache \
  388. --datadir=%{l_prefix}/share/apache \
  389. --localstatedir=%{l_prefix}/var/apache \
  390. --enable-suexec \
  391. --suexec-caller=%{l_fsusr} \
  392. --suexec-userdir=.www \
  393. --enable-module=most \
  394. --with-perl=%{l_prefix}/bin/perl \
  395. %if "%{mod_ssl}" == "yes"
  396. --enable-rule=EAPI \
  397. --enable-module=ssl \
  398. %endif
  399. %if "%{mod_perl}" == "yes"
  400. --activate-module=src/modules/perl/libperl.a \
  401. %endif
  402. %if "%{mod_php}" == "yes"
  403. --activate-module=src/modules/php4/libphp4.a \
  404. %endif
  405. %if "%{mod_dav}" == "yes"
  406. --activate-module=src/modules/dav/libdav.a \
  407. %endif
  408. %if "%{mod_layout}" == "yes"
  409. --activate-module=src/modules/layout/liblayout.a \
  410. %endif
  411. %if "%{mod_macro}" == "yes"
  412. --activate-module=src/modules/extra/mod_macro.o \
  413. %endif
  414. %if "%{mod_auth_pam}" == "yes"
  415. --activate-module=src/modules/extra/mod_auth_pam.o \
  416. %endif
  417. %if "%{mod_gzip}" == "yes"
  418. --activate-module=src/modules/extra/mod_gzip.o \
  419. %endif
  420. %if "%{mod_zmod}" == "yes"
  421. --activate-module=src/modules/zmod/libzmod.a \
  422. %endif
  423. %if "%{mod_fastcgi}" == "yes"
  424. --activate-module=src/modules/fastcgi/libfastcgi.a \
  425. %endif
  426. %if "%{mod_throttle}" == "yes"
  427. --activate-module=src/modules/extra/mod_throttle.o \
  428. %endif
  429. %if "%{mod_access_referer}" == "yes"
  430. --activate-module=src/modules/extra/mod_access_referer.o \
  431. %endif
  432. %if "%{mod_roaming}" == "yes"
  433. --activate-module=src/modules/extra/mod_roaming.o \
  434. %endif
  435. %if "%{mod_relocate}" == "yes"
  436. --activate-module=src/modules/extra/mod_relocate.o \
  437. %endif
  438. --enable-module=so
  439. %{l_make} %{l_mflags -O} build-quiet
  440. )
  441. %install
  442. ( cd apache_%{V_apache}
  443. %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
  444. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
  445. $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
  446. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
  447. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/README*
  448. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/*.default
  449. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/srm.conf
  450. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/access.conf
  451. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.en \
  452. $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html
  453. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.*
  454. chmod a+rx $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin/*
  455. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin \
  456. $RPM_BUILD_ROOT%{l_prefix}/cgi/
  457. rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
  458. )
  459. %if "%{mod_perl}" == "yes"
  460. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
  461. %endif
  462. l_hostname=`%{l_shtool} echo -e %h`
  463. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  464. %{l_shtool} install -c -m 644 \
  465. -e "s;@l_prefix@;%{l_prefix};g" \
  466. -e "s;@l_hostname@;$l_hostname;g" \
  467. -e "s;@l_domainname@;$l_domainname;g" \
  468. -e "s;@l_npusr@;%{l_npusr};g" \
  469. -e "s;@l_npgrp@;%{l_npgrp};g" \
  470. %{SOURCE apache.base} \
  471. %{SOURCE apache.conf} \
  472. %{SOURCE apache.vhost} \
  473. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  474. mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
  475. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  476. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  477. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  478. -e 's;@l_fsusr@;%{l_fsusr};g' -e 's;@l_fsgrp@;%{l_fsgrp};g' \
  479. %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  480. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  481. %{l_files_std} \
  482. '%attr(4755,root,%{l_fsgrp}) %{l_prefix}/sbin/suexec' \
  483. '%config %{l_prefix}/etc/apache/*' \
  484. '%config %attr(444,%{l_fsusr},%{l_fsgrp}) %{l_prefix}/etc/apache/apache.base'
  485. %files -f files
  486. %clean
  487. rm -rf $RPM_BUILD_ROOT