apache.spec 19 KB

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