apache.spec 19 KB

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