apache.spec 17 KB

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