apache.spec 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. ##
  2. ## apache.spec -- RPM Specification for Apache
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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. %define php_db no
  45. %define php_pdflib no
  46. %define php_zlib no
  47. %define php_bzip2 no
  48. %define php_openssl no
  49. %define php_openldap no
  50. %define php_mm no
  51. %define php_pcre no
  52. %define php_ftp no
  53. %define php_java no
  54. %define php_oci8 no
  55. # the software versions
  56. %define V_apache 1.3.23
  57. %define V_mod_ssl 2.8.6
  58. %define V_mod_perl 1.26
  59. %define V_mod_php 4.1.1
  60. %define V_mod_dav 1.0.2-1.3.6
  61. %define V_mod_layout 3.0.4
  62. %define V_mod_macro 1.1.1
  63. %define V_mod_auth_pam 1.0a
  64. %define V_mod_gzip 1.3.19.1a
  65. %define V_mod_zmod 2_3
  66. %define V_mod_fastcgi 2.2.10
  67. %define V_mod_throttle 312
  68. %define V_mod_access_referer 1.0.2
  69. %define V_mod_roaming 1.0.2
  70. %define V_mod_relocate 1.0
  71. # package information
  72. Name: apache
  73. Summary: Apache HTTP Server
  74. URL: http://httpd.apache.org/
  75. Vendor: Apache Software Foundation
  76. Packager: The OpenPKG Project
  77. Distribution: OpenPKG [REL]
  78. Group: Web
  79. License: BSD-style
  80. Version: %{V_apache}
  81. Release: 20020215
  82. # list of sources
  83. Source0: http://httpd.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
  84. # %if "%{mod_ssl}" == "yes"
  85. Source1: http://www.modssl.org/source/mod_ssl-%{V_mod_ssl}-%{V_apache}.tar.gz
  86. # %endif
  87. # %if "%{mod_perl}" == "yes"
  88. Source2: http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz
  89. # %endif
  90. # %if "%{mod_php}" == "yes"
  91. Source3: http://www.php.net/distributions/php-%{V_mod_php}.tar.gz
  92. # %endif
  93. # %if "%{mod_dav}" == "yes"
  94. Source4: http://www.webdav.org/mod_dav/mod_dav-%{V_mod_dav}.tar.gz
  95. # %endif
  96. # %if "%{mod_layout}" == "yes"
  97. Source5: ftp://ftp.tangent.org/pub/apache/mod_layout-%{V_mod_layout}.tar.gz
  98. # %endif
  99. # %if "%{mod_macro}" == "yes"
  100. Source6: http://www.cri.ensmp.fr/~coelho/mod_macro/mod_macro-%{V_mod_macro}.tar.gz
  101. # %endif
  102. # %if "%{mod_auth_pam}" == "yes"
  103. Source7: http://pam.sourceforge.net/mod_auth_pam/mod_auth_pam.tar.gz
  104. # %endif
  105. # %if "%{mod_gzip}" == "yes"
  106. Source8: http://www.remotecommunications.com/apache/mod_gzip/src/%{V_mod_gzip}/mod_gzip.c
  107. # %endif
  108. # %if "%{mod_zmod}" == "yes"
  109. Source9: http://www.ivw.de/???/src.apapi.FIN%{V_mod_zmod}.tar.gz
  110. # %endif
  111. # %if "%{mod_fastcgi}" == "yes"
  112. Source10: http://www.fastcgi.com/dist/mod_fastcgi_%{V_mod_fastcgi}.tar.gz
  113. # %endif
  114. # %if "%{mod_throttle}" == "yes"
  115. Source11: http://www.snert.com/Software/mod_throttle/mod_throttle%{V_mod_throttle}.tgz
  116. # %endif
  117. # %if "%{mod_access_referer}" == "yes"
  118. Source12: http://download.sourceforge.net/accessreferer/mod_access_referer-%{V_mod_access_referer}.tar.gz
  119. # %endif
  120. # %if "%{mod_roaming}" == "yes"
  121. Source13: http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.gz
  122. # %endif
  123. # %if "%{mod_relocate}" == "yes"
  124. Source14: http://www.tangent.org/mod_relocate/mod_relocate-%{V_mod_relocate}.tar.gz
  125. # %endif
  126. Source20: apache.conf
  127. Source21: apache.base
  128. Source22: apache.vhost
  129. Source23: rc.apache
  130. # build information
  131. Prefix: %{l_prefix}
  132. BuildRoot: %{l_buildroot}
  133. BuildPreReq: openpkg >= 20020206
  134. PreReq: openpkg >= 20020206
  135. %if "%{mod_ssl}" == "yes"
  136. BuildPreReq: openssl, mm
  137. %endif
  138. %if "%{mod_perl}" == "yes"
  139. BuildPreReq: perl
  140. PreReq: perl
  141. %endif
  142. %if "%{mod_php}" == "yes"
  143. BuildPreReq: make
  144. %if "%{php_mysql}" == "yes"
  145. BuildPreReq: mysql
  146. %endif
  147. %if "%{php_gd}" == "yes"
  148. BuildPreReq: gd
  149. %endif
  150. %if "%{php_db}" == "yes"
  151. BuildPreReq: db
  152. %endif
  153. %if "%{php_pdflib}" == "yes"
  154. BuildPreReq: pdflib, zlib
  155. %endif
  156. %if "%{php_zlib}" == "yes"
  157. BuildPreReq: zlib
  158. %endif
  159. %if "%{php_bzip2}" == "yes"
  160. BuildPreReq: bzip2
  161. %endif
  162. %if "%{php_openssl}" == "yes"
  163. BuildPreReq: openssl
  164. %endif
  165. %if "%{php_openldap}" == "yes"
  166. BuildPreReq: openldap, openssl
  167. %endif
  168. %if "%{php_mm}" == "yes"
  169. BuildPreReq: mm
  170. %endif
  171. %if "%{php_pcre}" == "yes"
  172. BuildPreReq: pcre
  173. %endif
  174. %if "%{php_java}" == "yes"
  175. BuildPreReq: jdk-sun
  176. %endif
  177. %endif
  178. AutoReq: no
  179. AutoReqProv: no
  180. %description
  181. The Apache Project is a collaborative software development effort
  182. aimed at creating a robust, commercial-grade, featureful, and
  183. freely-available source code implementation of an HTTP (Web) server.
  184. The project is jointly managed by a group of volunteers located
  185. around the world, using the Internet and the Web to communicate,
  186. plan, and develop the server and its related documentation. These
  187. volunteers are known as the Apache Group. In addition, hundreds
  188. of users have contributed ideas, code, and documentation to the
  189. project.
  190. This Apache %{V_apache} package optionally can include:
  191. - mod_ssl %{V_mod_ssl} for HTTPS support.
  192. - mod_perl %{V_mod_perl} for dynamic Perl scripting.
  193. - mod_php %{V_mod_php} for dynamic PHP scripting.
  194. - mod_dav %{V_mod_dav} for WebDAV support.
  195. - mod_layout %{V_mod_layout} for header/footer support.
  196. - mod_macro %{V_mod_macro} for macro support in config files.
  197. - mod_auth_pam %{V_mod_auth_pam} for PAM-based authentication.
  198. - mod_gzip %{V_mod_gzip} for on-the-fly GZIP-based data compression.
  199. - mod_zmod %{V_mod_zmod} for IVW-compliant logfile writing.
  200. - mod_fastcgi %{V_mod_fastcgi} for FastCGI support.
  201. - mod_access_referer %{V_mod_access_referer} for access control via HTTP Referer.
  202. - mod_roaming %{V_mod_roaming} for Netscape Communicator roaming support.
  203. - mod_relocate %{V_mod_relocate} for external URL redirection with logging.
  204. %prep
  205. %setup0 -q -c
  206. %if "%{mod_ssl}" == "yes"
  207. %setup1 -q -T -D -a 1
  208. %endif
  209. %if "%{mod_perl}" == "yes"
  210. %setup2 -q -T -D -a 2
  211. %endif
  212. %if "%{mod_php}" == "yes"
  213. %setup3 -q -T -D -a 3
  214. %endif
  215. %if "%{mod_dav}" == "yes"
  216. %setup4 -q -T -D -a 4
  217. %endif
  218. %if "%{mod_layout}" == "yes"
  219. %setup5 -q -T -D -a 5
  220. %endif
  221. %if "%{mod_macro}" == "yes"
  222. %setup6 -q -T -D -a 6
  223. %endif
  224. %if "%{mod_auth_pam}" == "yes"
  225. %setup7 -q -T -D -a 7
  226. %endif
  227. %if "%{mod_zmod}" == "yes"
  228. %setup9 -q -T -D -a 9
  229. %endif
  230. %if "%{mod_fastcgi}" == "yes"
  231. %setup10 -q -T -D -a 10
  232. %endif
  233. %if "%{mod_throttle}" == "yes"
  234. %setup11 -q -T -D -a 11
  235. %endif
  236. %if "%{mod_access_referer}" == "yes"
  237. %setup12 -q -T -D -a 12
  238. %endif
  239. %if "%{mod_roaming}" == "yes"
  240. %setup13 -q -T -D -a 13
  241. %endif
  242. %if "%{mod_relocate}" == "yes"
  243. %setup14 -q -T -D -a 14
  244. %endif
  245. %build
  246. PATH="%{l_prefix}/bin:%{l_prefix}/sbin:$PATH"; export PATH
  247. rm -rf $RPM_BUILD_ROOT
  248. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  249. %if "%{mod_ssl}" == "yes"
  250. ( cd mod_ssl-%{V_mod_ssl}-%{V_apache}
  251. ./configure \
  252. --with-apache=../apache_%{V_apache} \
  253. --expert
  254. )
  255. %endif
  256. %if "%{mod_php}" == "yes" || "%{mod_dav}" == "yes"
  257. ( cd apache_%{V_apache}
  258. CC="%{l_cc}" \
  259. CFLAGS="%{l_cflags -O}" \
  260. ./configure \
  261. %if "%{mod_ssl}" == "yes"
  262. --enable-rule=EAPI \
  263. %endif
  264. --target=apache \
  265. --with-layout=GNU \
  266. --prefix=%{l_prefix} \
  267. --sbindir=%{l_prefix}/sbin \
  268. --sysconfdir=%{l_prefix}/etc/apache \
  269. --libexecdir=%{l_prefix}/lib/apache \
  270. --datadir=%{l_prefix}/share/apache \
  271. --localstatedir=%{l_prefix}/var/apache
  272. )
  273. %endif
  274. %if "%{mod_perl}" == "yes"
  275. ( cd mod_perl-%{V_mod_perl}
  276. eval `%{l_prefix}/bin/perl -V:archname`
  277. eval `%{l_prefix}/bin/perl -V:version`
  278. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  279. perl=$RPM_BUILD_ROOT%{l_prefix}/bin/perl
  280. echo "#!/bin/sh" >$perl
  281. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  282. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  283. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  284. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  285. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  286. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  287. echo " \"\$@\"" >>$perl
  288. chmod a+x $perl
  289. $perl Makefile.PL \
  290. PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
  291. APACHE_SRC=../apache_%{V_apache}/src \
  292. DO_HTTPD=1 \
  293. USE_APACI=1 \
  294. PREP_HTTPD=1 \
  295. EVERYTHING=1 \
  296. PERL_TIE_TABLES=1 \
  297. PERL_DIRECTIVE_HANDLERS=1
  298. %{l_make} %{l_mflags}
  299. %{l_make} %{l_mflags} install
  300. mkdir $RPM_BUILD_ROOT%{l_prefix}/perl5
  301. mv $RPM_BUILD_ROOT%{l_prefix}/lib/* $RPM_BUILD_ROOT%{l_prefix}/perl5/
  302. mv $RPM_BUILD_ROOT%{l_prefix}/perl5 $RPM_BUILD_ROOT%{l_prefix}/lib/
  303. %{l_shtool} subst -e "s;^\\(PERL = \\).*;\\1 $perl;" \
  304. ../apache_%{V_apache}/src/modules/perl/mod_perl.config
  305. )
  306. %endif
  307. %if "%{mod_php}" == "yes"
  308. ( cd php-%{V_mod_php}
  309. CC="%{l_cc}" \
  310. %if "%{mod_ssl}" == "yes"
  311. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -DEAPI" \
  312. %else
  313. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  314. %endif
  315. CPPFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  316. LDFLAGS="%{l_cflags -O} -L%{l_prefix}/lib" \
  317. %if "%{php_gd}" == "yes"
  318. LIBS="-lpng -lz" \
  319. %endif
  320. ./configure \
  321. --prefix=%{l_prefix} \
  322. --with-apache=../apache_%{V_apache} \
  323. --with-config-file-path=%{l_prefix}/etc/apache \
  324. %if "%{php_mysql}" == "yes"
  325. --with-mysql=%{l_prefix} \
  326. %endif
  327. %if "%{php_gd}" == "yes"
  328. --with-gd=%{l_prefix} \
  329. %endif
  330. %if "%{php_db}" == "yes"
  331. --with-db3=%{l_prefix} \
  332. %endif
  333. %if "%{php_zlib}" == "yes" || "%{php_pdflib}" == "yes"
  334. --with-zlib=%{l_prefix} \
  335. %endif
  336. %if "%{php_bzip2}" == "yes"
  337. --with-bz2=%{l_prefix} \
  338. %endif
  339. %if "%{php_pdflib}" == "yes"
  340. --with-pdflib=%{l_prefix} \
  341. %endif
  342. %if "%{php_openssl}" == "yes" || "%{php_openldap}" == "yes"
  343. --with-openssl=%{l_prefix} \
  344. %endif
  345. %if "%{php_openldap}" == "yes"
  346. --with-ldap=%{l_prefix} \
  347. %endif
  348. %if "%{php_mm}" == "yes"
  349. --with-mm=%{l_prefix} \
  350. --enable-session \
  351. %endif
  352. %if "%{php_pcre}" == "yes"
  353. --with-pcre=%{l_prefix} \
  354. %endif
  355. %if "%{php_ftp}" == "yes"
  356. --enable-ftp \
  357. %endif
  358. %if "%{php_java}" == "yes"
  359. --with-java=%{l_prefix}/libexec/jdk-sun \
  360. %endif
  361. %if "%{php_oci8}" == "yes"
  362. --with-oci8 \
  363. %endif
  364. --disable-shared \
  365. --enable-track-vars
  366. %{l_make} %{l_mflags}
  367. %{l_shtool} subst \
  368. -e "s;^\\(EXTENSION_DIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
  369. -e "s;^\\(PEAR_INSTALLDIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
  370. config_vars.mk
  371. %{l_make} %{l_mflags} install \
  372. prefix=$RPM_BUILD_ROOT%{l_prefix}
  373. )
  374. %endif
  375. %if "%{mod_dav}" == "yes"
  376. ( cd mod_dav-%{V_mod_dav}
  377. CC="%{l_cc}" \
  378. %if "%{mod_ssl}" == "yes"
  379. CFLAGS="%{l_cflags -O}" \
  380. %else
  381. CFLAGS="%{l_cflags -O} -DEAPI" \
  382. %endif
  383. LDFLAGS="%{l_cflags -O}" \
  384. ./configure \
  385. --with-apache=../apache_%{V_apache}
  386. %{l_make} %{l_mflags}
  387. %{l_make} %{l_mflags} install
  388. )
  389. %endif
  390. %if "%{mod_layout}" == "yes"
  391. ( cd mod_layout-%{V_mod_layout}
  392. mkdir ../apache_%{V_apache}/src/modules/layout
  393. cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
  394. chmod -R u+w ../apache_%{V_apache}/src/modules/layout
  395. )
  396. %endif
  397. %if "%{mod_macro}" == "yes"
  398. ( cd mod_macro-%{V_mod_macro}
  399. cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
  400. )
  401. %endif
  402. %if "%{mod_auth_pam}" == "yes"
  403. ( cd mod_auth_pam-%{V_mod_auth_pam}
  404. cp mod_auth_pam.c ../apache_%{V_apache}/src/modules/extra/
  405. )
  406. %endif
  407. %if "%{mod_gzip}" == "yes"
  408. cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
  409. %endif
  410. %if "%{mod_zmod}" == "yes"
  411. ( cd src
  412. mkdir ../apache_%{V_apache}/src/modules/zmod
  413. %{l_shtool} subst -e 's;"compat.h";"ap_compat.h";' modules/zmod/mod_zmod.c
  414. cp modules/zmod/* ../apache_%{V_apache}/src/modules/zmod/
  415. )
  416. %endif
  417. %if "%{mod_fastcgi}" == "yes"
  418. ( cd mod_fastcgi_%{V_mod_fastcgi}
  419. mkdir ../apache_%{V_apache}/src/modules/fastcgi
  420. cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
  421. )
  422. %endif
  423. %if "%{mod_throttle}" == "yes"
  424. ( cd mod_throttle-*
  425. cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
  426. )
  427. %endif
  428. %if "%{mod_access_referer}" == "yes"
  429. ( cd mod_access_referer-%{V_mod_access_referer}
  430. cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
  431. )
  432. %endif
  433. %if "%{mod_roaming}" == "yes"
  434. ( cd mod_roaming-%{V_mod_roaming}
  435. cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
  436. )
  437. %endif
  438. %if "%{mod_relocate}" == "yes"
  439. ( cd mod_relocate-%{V_mod_relocate}
  440. cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
  441. )
  442. %endif
  443. ( cd apache_%{V_apache}
  444. CC="%{l_cc}" \
  445. CFLAGS="%{l_cflags -O}" \
  446. %if "%{mod_ssl}" == "yes"
  447. EAPI_MM="%{l_prefix}" \
  448. SSL_BASE="%{l_prefix}" \
  449. %endif
  450. %if "%{mod_auth_pam}" == "yes"
  451. LIBS="$LIBS -lpam" \
  452. %endif
  453. ./configure \
  454. --target=apache \
  455. --with-layout=GNU \
  456. --prefix=%{l_prefix} \
  457. --sbindir=%{l_prefix}/sbin \
  458. --sysconfdir=%{l_prefix}/etc/apache \
  459. --libexecdir=%{l_prefix}/lib/apache \
  460. --datadir=%{l_prefix}/share/apache \
  461. --localstatedir=%{l_prefix}/var/apache \
  462. --enable-suexec \
  463. --suexec-caller=%{l_musr} \
  464. --suexec-userdir=.www \
  465. --enable-module=most \
  466. --with-perl=%{l_prefix}/bin/perl \
  467. %if "%{mod_ssl}" == "yes"
  468. --enable-rule=EAPI \
  469. --enable-module=ssl \
  470. %endif
  471. %if "%{mod_perl}" == "yes"
  472. --activate-module=src/modules/perl/libperl.a \
  473. %endif
  474. %if "%{mod_php}" == "yes"
  475. --activate-module=src/modules/php4/libphp4.a \
  476. %endif
  477. %if "%{mod_dav}" == "yes"
  478. --activate-module=src/modules/dav/libdav.a \
  479. %endif
  480. %if "%{mod_layout}" == "yes"
  481. --activate-module=src/modules/layout/liblayout.a \
  482. %endif
  483. %if "%{mod_macro}" == "yes"
  484. --activate-module=src/modules/extra/mod_macro.o \
  485. %endif
  486. %if "%{mod_auth_pam}" == "yes"
  487. --activate-module=src/modules/extra/mod_auth_pam.o \
  488. %endif
  489. %if "%{mod_gzip}" == "yes"
  490. --activate-module=src/modules/extra/mod_gzip.o \
  491. %endif
  492. %if "%{mod_zmod}" == "yes"
  493. --activate-module=src/modules/zmod/libzmod.a \
  494. %endif
  495. %if "%{mod_fastcgi}" == "yes"
  496. --activate-module=src/modules/fastcgi/libfastcgi.a \
  497. %endif
  498. %if "%{mod_throttle}" == "yes"
  499. --activate-module=src/modules/extra/mod_throttle.o \
  500. %endif
  501. %if "%{mod_access_referer}" == "yes"
  502. --activate-module=src/modules/extra/mod_access_referer.o \
  503. %endif
  504. %if "%{mod_roaming}" == "yes"
  505. --activate-module=src/modules/extra/mod_roaming.o \
  506. %endif
  507. %if "%{mod_relocate}" == "yes"
  508. --activate-module=src/modules/extra/mod_relocate.o \
  509. %endif
  510. --enable-module=so
  511. %{l_make} %{l_mflags -O} build-quiet
  512. )
  513. %install
  514. ( cd apache_%{V_apache}
  515. %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
  516. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
  517. $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
  518. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
  519. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/README*
  520. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/*.default
  521. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/srm.conf
  522. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/access.conf
  523. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.en \
  524. $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html
  525. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.*
  526. chmod a+rx $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin/*
  527. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin \
  528. $RPM_BUILD_ROOT%{l_prefix}/cgi/
  529. rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
  530. )
  531. %if "%{mod_perl}" == "yes"
  532. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
  533. %endif
  534. l_hostname=`%{l_shtool} echo -e %h`
  535. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  536. %{l_shtool} install -c -m 644 \
  537. -e 's;@l_prefix@;%{l_prefix};g' \
  538. -e "s;@l_hostname@;$l_hostname;g" \
  539. -e "s;@l_domainname@;$l_domainname;g" \
  540. -e 's;@l_nusr@;%{l_nusr};g' \
  541. -e 's;@l_ngrp@;%{l_ngrp};g' \
  542. %{SOURCE apache.base} \
  543. %{SOURCE apache.conf} \
  544. %{SOURCE apache.vhost} \
  545. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  546. mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
  547. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  548. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  549. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  550. -e 's;@l_musr@;%{l_musr};g' -e 's;@l_mgrp@;%{l_mgrp};g' \
  551. %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  552. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true
  553. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2> /dev/null || true
  554. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  555. %{l_files_std} \
  556. '%attr(4755,root,%{l_mgrp}) %{l_prefix}/sbin/suexec' \
  557. '%config %{l_prefix}/etc/apache/*' \
  558. '%config %attr(444,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/apache/apache.base'
  559. %files -f files
  560. %clean
  561. rm -rf $RPM_BUILD_ROOT