apache.spec 19 KB

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