apache-php4.spec 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459
  1. ##
  2. ## apache-php4.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. ## ATTENTION: This package specification is a cruel one. It allows
  25. ## one to build an Apache package in hundreds of variants with just
  26. ## a single specification through the use of lots of condition
  27. ## variables. The reason for this attempt is that it was born out of
  28. ## the needs from the daily practice at an ISP. So do not treat this
  29. ## specification as a reference example of any kind, except perhaps as
  30. ## a example of what is maximum possible with RPM and how far one can
  31. ## go with the macro mechanism. But do not try to repeat this!
  32. # package component versions
  33. %define V_apache 1.3.37
  34. %define V_mod_access_referer 1.0.2
  35. %define V_mod_auth_kerb 5.3
  36. %define V_mod_auth_ldap 2.4.2
  37. %define V_mod_auth_mysql 3.0.0
  38. %define V_mod_auth_pam 1.1.1
  39. %define V_mod_auth_radius 1.5.7
  40. %define V_mod_dav 1.0.3-1.3.6
  41. %define V_mod_evasive 1.10.1
  42. %define V_mod_fastcgi 2.4.2
  43. %define V_mod_gzip 1.3.26.1a
  44. %define V_mod_layout 3.2.1
  45. %define V_mod_macro 1.1.2
  46. %define V_mod_perl 1.29
  47. %define V_mod_php 4.4.6
  48. %define V_mod_php_hardened 4.4.4-0.4.15
  49. %define V_mod_php_suhosin_e 0.9.16
  50. %define V_mod_php_suhosin_p 4.4.6-0.9.6
  51. %define V_mod_relocate 1.0
  52. %define V_mod_roaming 1.0.2
  53. %define V_mod_security 1.9.4
  54. %define V_mod_ssl 2.8.28-1.3.37
  55. %define V_mod_throttle 312
  56. %define V_suphp 0.6.2
  57. # package information
  58. Name: apache-php4
  59. Summary: Apache HTTP Server providing optional PHP4 support (legacy)
  60. URL: http://httpd.apache.org/
  61. Vendor: Apache Software Foundation
  62. Packager: OpenPKG Foundation e.V.
  63. Distribution: OpenPKG Community
  64. Class: PLUS
  65. Group: Web
  66. License: ASF
  67. Version: %{V_apache}
  68. Release: 20070304
  69. # package options (suexec related)
  70. %option with_suexec yes
  71. %option with_suexec_caller %{l_nusr}
  72. %option with_suexec_userdir public_html
  73. # package options (suphp related)
  74. %option with_suphp no
  75. %option with_suphp_caller %{l_nusr}
  76. %option with_suphp_phpcgi %{l_prefix}/cgi/php
  77. %option with_suphp_ugid_mode paranoid
  78. %option with_suphp_ugid_check yes
  79. # package options (additionally used Apache modules; can be enabled without thinking)
  80. %option with_mod_dav no
  81. %option with_mod_define no
  82. %option with_mod_layout no
  83. %option with_mod_macro no
  84. %option with_mod_perl no
  85. %option with_mod_php no
  86. %option with_mod_ssl no
  87. # package options (additionally used Apache modules; you have to know what you do)
  88. %option with_mod_access_referer no
  89. %option with_mod_auth_kerb no
  90. %option with_mod_auth_ldap no
  91. %option with_mod_auth_mysql no
  92. %option with_mod_auth_pam no
  93. %option with_mod_auth_radius no
  94. %option with_mod_evasive no
  95. %option with_mod_fastcgi no
  96. %option with_mod_gzip no
  97. %option with_mod_owa no
  98. %option with_mod_relocate no
  99. %option with_mod_roaming no
  100. %option with_mod_security no
  101. %option with_mod_throttle no
  102. # package options (optional PHP4 specific settings; requires "with_mod_php")
  103. # please note the lack of an PEAR option since PEAR is provided by the 'php' package
  104. %option with_mod_php_bc no
  105. %option with_mod_php_bdb no
  106. %option with_mod_php_bzip2 no
  107. %option with_mod_php_calendar no
  108. %option with_mod_php_crack no
  109. %option with_mod_php_curl no
  110. %option with_mod_php_debug no
  111. %option with_mod_php_dom no
  112. %option with_mod_php_exif no
  113. %option with_mod_php_freetype no
  114. %option with_mod_php_ftp no
  115. %option with_mod_php_gd no
  116. %option with_mod_php_gdbm no
  117. %option with_mod_php_gettext no
  118. %option with_mod_php_hardened no
  119. %option with_mod_php_iconv no
  120. %option with_mod_php_imap no
  121. %option with_mod_php_java no
  122. %option with_mod_php_mbregex no
  123. %option with_mod_php_mbstring no
  124. %option with_mod_php_mcrypt no
  125. %option with_mod_php_mhash no
  126. %option with_mod_php_mm no
  127. %option with_mod_php_mssql no
  128. %option with_mod_php_mysql no
  129. %option with_mod_php_oci7 no
  130. %option with_mod_php_oci8 no
  131. %option with_mod_php_odbc no
  132. %option with_mod_php_openldap no
  133. %option with_mod_php_openldapsasl no
  134. %option with_mod_php_pcre no
  135. %option with_mod_php_pdflib no
  136. %option with_mod_php_pgsql no
  137. %option with_mod_php_sendmail no
  138. %option with_mod_php_snmp no
  139. %option with_mod_php_ssl no
  140. %option with_mod_php_suhosin no
  141. %option with_mod_php_t1lib no
  142. %option with_mod_php_transsid no
  143. %option with_mod_php_versioning no
  144. %option with_mod_php_wddx no
  145. %option with_mod_php_xml no
  146. %option with_mod_php_xslt no
  147. %option with_mod_php_zlib no
  148. # package options (braindead ones only)
  149. %option with_gdbm_ndbm yes
  150. %option with_shared_core no
  151. %option with_shared_chain no
  152. # package options (debugging)
  153. %option with_debug no
  154. # fixing implicit inter-module dependencies and correlations
  155. %if "%{with_mod_php}" == "yes"
  156. %if "%{with_mod_php_freetype}" == "yes"
  157. %undefine with_mod_php_gd
  158. %define with_mod_php_gd yes
  159. %endif
  160. %if "%{with_mod_php_gdbm}" == "yes"
  161. %undefine with_gdbm_ndbm
  162. %define with_gdbm_ndbm yes
  163. %endif
  164. %if "%{with_mod_php_mysql}" == "yes" || "%{with_mod_php_pdflib}" == "yes" || "%{with_mod_php_gd}" == "yes" || "%{with_mod_php_dom}" == "yes"
  165. %undefine with_mod_php_zlib
  166. %define with_mod_php_zlib yes
  167. %endif
  168. %if "%{with_mod_php_pgsql}" == "yes"
  169. %undefine with_mod_php_ssl
  170. %define with_mod_php_ssl yes
  171. %endif
  172. %if "%{with_mod_ssl}" == "yes"
  173. %undefine with_mod_php_ssl
  174. %undefine with_mod_php_mm
  175. %define with_mod_php_ssl yes
  176. %define with_mod_php_mm yes
  177. %endif
  178. %if "%{with_mod_php_suhosin}" == "yes" && "%{with_mod_php_hardened}" == "yes"
  179. %undefine with_mod_php_hardened
  180. %define with_mod_php_hardened no
  181. %endif
  182. %endif
  183. %if "%{with_mod_ssl}" == "yes"
  184. %undefine with_mod_define
  185. %define with_mod_define yes
  186. %endif
  187. # list of sources
  188. Source0: http://www.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
  189. Source1: http://www.modssl.org/source/mod_ssl-%{V_mod_ssl}.tar.gz
  190. Source2: http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz
  191. Source3: http://static.php.net/www.php.net/distributions/php-%{V_mod_php}.tar.gz
  192. Source4: http://www.webdav.org/mod_dav/mod_dav-%{V_mod_dav}.tar.gz
  193. Source5: http://download.tangent.org/mod_layout-%{V_mod_layout}.tar.gz
  194. Source6: http://www.cri.ensmp.fr/~coelho/mod_macro/mod_macro-%{V_mod_macro}.tar.gz
  195. Source7: http://pam.sourceforge.net/mod_auth_pam/dist/mod_auth_pam.tar.gz
  196. Source8: http://switch.dl.sourceforge.net/sourceforge/mod-gzip/mod_gzip-%{V_mod_gzip}.tgz
  197. Source9: http://www.fastcgi.com/dist/mod_fastcgi-%{V_mod_fastcgi}.tar.gz
  198. Source10: http://www.snert.com/Software/mod_throttle/mod_throttle%{V_mod_throttle}.tgz
  199. Source11: http://switch.dl.sourceforge.net/accessreferer/mod_access_referer-%{V_mod_access_referer}.tar.gz
  200. Source12: http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.gz
  201. Source13: http://software.tangent.org/download/mod_relocate-%{V_mod_relocate}.tar.gz
  202. Source14: http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.tar.gz
  203. Source15: ftp://ftp.freeradius.org/pub/radius/mod_auth_radius-%{V_mod_auth_radius}.tar
  204. Source16: http://switch.dl.sourceforge.net/modauthmysql/mod_auth_mysql-%{V_mod_auth_mysql}.tar.gz
  205. Source17: http://www.suphp.org/download/suphp-%{V_suphp}.tar.gz
  206. Source18: http://www.modsecurity.org/download/modsecurity-apache_%{V_mod_security}.tar.gz
  207. Source19: http://www.zdziarski.com/projects/mod_evasive/mod_evasive_%{V_mod_evasive}.tar.gz
  208. Source20: http://www.sharemation.com/~dmcmahon/unix_all.tgz
  209. Source21: http://www.hardened-php.net/suhosin/_media/suhosin-%{V_mod_php_suhosin_e}.tgz
  210. Source22: http://switch.dl.sourceforge.net/modauthkerb/mod_auth_kerb-%{V_mod_auth_kerb}.tar.gz
  211. Source23: apache.conf
  212. Source24: apache.base
  213. Source25: apache.pl
  214. Source26: rc.apache
  215. Source27: apache.sh
  216. Source28: php.ini
  217. Patch0: apache-php4.patch
  218. Patch1: apache-php4.patch.modowa
  219. Patch2: http://www.hardened-php.net/hardening-patch-%{V_mod_php_hardened}.patch.gz
  220. Patch3: http://www.hardened-php.net/suhosin/_media/suhosin-patch-%{V_mod_php_suhosin_p}.patch.gz
  221. Patch4: apache-php4.patch.suphp
  222. Patch5: apache-php4.patch.php
  223. Patch6: apache-php4.patch.modauthkerb
  224. Patch7: apache-php4.patch.modauthradius
  225. # build information
  226. Prefix: %{l_prefix}
  227. BuildRoot: %{l_buildroot}
  228. BuildPreReq: OpenPKG, openpkg >= 20060823
  229. PreReq: OpenPKG, openpkg >= 20060823
  230. %if "%{with_gdbm_ndbm}" == "yes"
  231. BuildPreReq: gdbm, gdbm::with_ndbm = yes
  232. PreReq: gdbm, gdbm::with_ndbm = yes
  233. %endif
  234. %if "%{with_mod_auth_kerb}" == "yes"
  235. BuildPreReq: kerberos
  236. PreReq: kerberos
  237. %endif
  238. %if "%{with_mod_auth_ldap}" == "yes"
  239. BuildPreReq: openldap, openssl
  240. PreReq: openldap, openssl
  241. %endif
  242. %if "%{with_mod_auth_mysql}" == "yes"
  243. BuildPreReq: mysql
  244. PreReq: mysql
  245. %endif
  246. %if "%{with_mod_auth_pam}" == "yes"
  247. BuildPreReq: PAM
  248. PreReq: PAM
  249. %endif
  250. %if "%{with_mod_dav}" == "yes"
  251. BuildPreReq: expat
  252. PreReq: expat
  253. %endif
  254. %if "%{with_mod_owa}" == "yes"
  255. BuildPreReq: oracle
  256. PreReq: oracle
  257. %endif
  258. %if "%{with_mod_perl}" == "yes"
  259. BuildPreReq: perl
  260. PreReq: perl
  261. %endif
  262. %if "%{with_mod_php}" == "yes"
  263. BuildPreReq: gcc, sed, flex, bison
  264. %if "%{with_mod_php_bdb}" == "yes"
  265. BuildPreReq: db
  266. PreReq: db
  267. %endif
  268. %if "%{with_mod_php_bzip2}" == "yes"
  269. BuildPreReq: bzip2
  270. PreReq: bzip2
  271. %endif
  272. %if "%{with_mod_php_crack}" == "yes"
  273. BuildPreReq: cracklib
  274. PreReq: cracklib
  275. %endif
  276. %if "%{with_mod_php_curl}" == "yes"
  277. BuildPreReq: curl
  278. PreReq: curl
  279. %endif
  280. %if "%{with_mod_php_xml}" == "yes"
  281. BuildPreReq: expat
  282. PreReq: expat
  283. %endif
  284. %if "%{with_mod_php_dom}" == "yes"
  285. BuildPreReq: libxml, libxslt
  286. PreReq: libxml, libxslt
  287. %endif
  288. %if "%{with_mod_php_freetype}" == "yes"
  289. BuildPreReq: freetype
  290. PreReq: freetype
  291. %endif
  292. %if "%{with_mod_php_gd}" == "yes"
  293. BuildPreReq: gd >= 2.0.20, jpeg, png
  294. PreReq: gd >= 2.0.20, jpeg, png
  295. %endif
  296. %if "%{with_mod_php_gdbm}" == "yes"
  297. BuildPreReq: gdbm
  298. PreReq: gdbm
  299. %endif
  300. %if "%{with_mod_php_gettext}" == "yes"
  301. BuildPreReq: gettext, libiconv
  302. PreReq: gettext, libiconv
  303. %endif
  304. %if "%{with_mod_php_iconv}" == "yes"
  305. BuildPreReq: libiconv
  306. PreReq: libiconv
  307. %endif
  308. %if "%{with_mod_php_imap}" == "yes"
  309. BuildPreReq: imap, openssl
  310. PreReq: imap, openssl
  311. %endif
  312. %if "%{with_mod_php_java}" == "yes"
  313. BuildPreReq: j2se
  314. PreReq: j2se
  315. %endif
  316. %if "%{with_mod_php_mcrypt}" == "yes"
  317. BuildPreReq: libmcrypt
  318. PreReq: libmcrypt
  319. %endif
  320. %if "%{with_mod_php_mhash}" == "yes"
  321. BuildPreReq: mhash
  322. PreReq: mhash
  323. %endif
  324. %if "%{with_mod_php_mm}" == "yes"
  325. BuildPreReq: mm
  326. PreReq: mm
  327. %endif
  328. %if "%{with_mod_php_mssql}" == "yes"
  329. BuildPreReq: freetds, libiconv
  330. PreReq: freetds, libiconv
  331. %endif
  332. %if "%{with_mod_php_mysql}" == "yes"
  333. BuildPreReq: mysql
  334. PreReq: mysql
  335. %endif
  336. %if "%{with_mod_php_oci7}" == "yes" || "%{with_mod_php_oci8}" == "yes"
  337. BuildPreReq: oracle
  338. PreReq: oracle
  339. %endif
  340. %if "%{with_mod_php_odbc}" == "yes"
  341. BuildPreReq: unixodbc
  342. PreReq: unixodbc
  343. %endif
  344. %if "%{with_mod_php_openldap}" == "yes"
  345. BuildPreReq: openldap, openssl
  346. PreReq: openldap, openssl
  347. %if "%{with_mod_php_openldapsasl}" == "yes"
  348. BuildPreReq: openldap::with_sasl = yes
  349. PreReq: openldap::with_sasl = yes
  350. %else
  351. BuildPreReq: openldap::with_sasl = no
  352. PreReq: openldap::with_sasl = no
  353. %endif
  354. %endif
  355. %if "%{with_mod_php_pcre}" == "yes"
  356. BuildPreReq: pcre
  357. PreReq: pcre
  358. %endif
  359. %if "%{with_mod_php_pdflib}" == "yes"
  360. BuildPreReq: pdflib, jpeg, png
  361. PreReq: pdflib, jpeg, png
  362. %endif
  363. %if "%{with_mod_php_pgsql}" == "yes"
  364. BuildPreReq: postgresql, openssl
  365. PreReq: postgresql, openssl
  366. %endif
  367. %if "%{with_mod_php_sendmail}" == "yes"
  368. BuildPreReq: MTA
  369. PreReq: MTA
  370. %endif
  371. %if "%{with_mod_php_snmp}" == "yes"
  372. BuildPreReq: snmp
  373. PreReq: snmp
  374. %endif
  375. %if "%{with_mod_php_ssl}" == "yes"
  376. BuildPreReq: openssl
  377. PreReq: openssl
  378. %endif
  379. %if "%{with_mod_php_suhosin}" == "yes"
  380. BuildPreReq: autoconf
  381. %endif
  382. %if "%{with_mod_php_t1lib}" == "yes"
  383. BuildPreReq: t1lib
  384. PreReq: t1lib
  385. %endif
  386. %if "%{with_mod_php_xslt}" == "yes"
  387. BuildPreReq: sablotron, expat, libiconv, gcc::with_cxx = yes
  388. PreReq: sablotron, expat, libiconv
  389. %endif
  390. %if "%{with_mod_php_zlib}" == "yes"
  391. BuildPreReq: zlib
  392. PreReq: zlib
  393. %endif
  394. %endif
  395. %if "%{with_mod_ssl}" == "yes"
  396. BuildPreReq: openssl, mm
  397. PreReq: openssl, mm
  398. %endif
  399. %if "%{with_suphp}" == "yes"
  400. BuildPreReq: php, gcc, gcc::with_cxx = yes
  401. PreReq: php
  402. %endif
  403. AutoReq: no
  404. AutoReqProv: no
  405. Provides: apache = %{version}-%{release}
  406. %description
  407. The Apache Project is a collaborative software development effort
  408. aimed at creating a robust, commercial-grade, featureful, and
  409. freely-available source code implementation of an HTTP (Web) server.
  410. The project is jointly managed by a group of volunteers located
  411. around the world, using the Internet and the Web to communicate,
  412. plan, and develop the server and its related documentation. These
  413. volunteers are known as the Apache Group. In addition, hundreds
  414. of users have contributed ideas, code, and documentation to the
  415. project.
  416. %track
  417. prog apache-php4 = {
  418. version = %{version}
  419. url = http://www.apache.org/dist/httpd/
  420. regex = apache_(__VER__)\.tar\.gz
  421. }
  422. prog apache-php4:mod_access_referer = {
  423. version = %{V_mod_roaming}
  424. url = http://prdownloads.sourceforge.net/accessreferer/
  425. regex = mod_access_referer-(__VER__)\.tar\.gz
  426. }
  427. prog apache-php4:mod_auth_mysql = {
  428. version = %{V_mod_auth_mysql}
  429. url = http://prdownloads.sourceforge.net/modauthmysql/
  430. regex = mod_auth_mysql-(__VER__)\.tar\.gz
  431. }
  432. prog apache-php4:mod_auth_radius = {
  433. version = %{V_mod_auth_radius}
  434. url = ftp://ftp.freeradius.org/pub/radius/
  435. regex = mod_auth_radius-(__VER__)\.tar
  436. }
  437. prog apache-php4:mod_auth_kerb = {
  438. version = %{V_mod_auth_kerb}
  439. url = http://prdownloads.sourceforge.net/modauthkerb/
  440. regex = mod_auth_kerb-(__VER__)\.tar
  441. }
  442. prog apache-php4:mod_dav = {
  443. version = %{V_mod_dav}
  444. url = http://www.webdav.org/mod_dav/
  445. regex = mod_dav-(__VER__)\.tar\.gz
  446. }
  447. prog apache-php4:mod_gzip = {
  448. version = %{V_mod_gzip}
  449. url = http://prdownloads.sourceforge.net/mod-gzip/
  450. regex = mod_gzip-(__VER__)\.tgz
  451. }
  452. prog apache-php4:mod_fastcgi = {
  453. version = %{V_mod_fastcgi}
  454. url = http://www.fastcgi.com/dist/
  455. regex = mod_fastcgi-(__VER__)\.tar\.gz
  456. }
  457. prog apache-php4:mod_layout = {
  458. version = %{V_mod_layout}
  459. url = http://download.tangent.org/
  460. regex = mod_layout-(3\.[\d.]+)\.tar\.gz
  461. }
  462. prog apache-php4:mod_macro = {
  463. disabled
  464. comment = "rse: Apache 1.3 support stopped with version 1.1.2"
  465. version = %{V_mod_macro}
  466. url = http://www.cri.ensmp.fr/~coelho/mod_macro/
  467. regex = mod_macro-(__VER__)\.tar\.gz
  468. }
  469. prog apache-php4:mod_perl = {
  470. version = %{V_mod_perl}
  471. url = http://perl.apache.org/dist/
  472. regex = mod_perl-(1\.\d+)\.tar\.gz
  473. }
  474. prog apache-php4:mod_php = {
  475. version = %{V_mod_php}
  476. url = http://www.php.net/downloads.php
  477. regex = php-(4\.\d+\.\d+)\.tar\.gz
  478. }
  479. prog apache-php4:mod_php_hardened = {
  480. version = %{V_mod_php_hardened}
  481. url = http://www.hardened-php.net/downloads.13.html
  482. regex = hardening-patch-(4\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
  483. }
  484. prog apache-php4:mod_php_suhosin-patch = {
  485. version = %{V_mod_php_suhosin_p}
  486. url = http://www.hardened-php.net/suhosin/download.html
  487. regex = suhosin-patch-(4\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
  488. }
  489. prog apache-php4:mod_php_suhosin-ext = {
  490. version = %{V_mod_php_suhosin_e}
  491. url = http://www.hardened-php.net/suhosin/download.html
  492. regex = suhosin-(\d+(\.\d+)+)\.tgz
  493. }
  494. prog apache-php4:mod_relocate = {
  495. version = %{V_mod_relocate}
  496. url = http://software.tangent.org/download/
  497. regex = mod_relocate-(__VER__)\.tar\.gz
  498. }
  499. prog apache-php4:mod_roaming = {
  500. version = %{V_mod_roaming}
  501. url = http://www.klomp.org/mod_roaming/
  502. regex = mod_roaming-(1\.\d+\.\d+)\.tar\.gz
  503. }
  504. prog apache-php4:mod_ssl = {
  505. version = %{V_mod_ssl}
  506. url = http://www.modssl.org/source/
  507. regex = mod_ssl-(__VER__)\.tar\.gz
  508. }
  509. prog apache-php4:mod_throttle = {
  510. disabled
  511. comment = "rse: currently no longer publically available"
  512. version = %{V_mod_throttle}
  513. url = http://www.snert.com/Software/mod_throttle/
  514. regex = mod_throttle(__VER__)\.tgz
  515. }
  516. prog apache-php4:suphp = {
  517. version = %{V_suphp}
  518. url = http://www.suphp.org/Download.html
  519. regex = suphp-(__VER__)\.tar\.gz
  520. }
  521. prog apache-php4:mod_security = {
  522. version = %{V_mod_security}
  523. url = http://www.modsecurity.org/download/
  524. regex = modsecurity-apache_(1\.\d+(\.\d+)*)\.tar\.gz
  525. }
  526. prog apache-php4:mod_evasive = {
  527. version = %{V_mod_evasive}
  528. url = http://www.zdziarski.com/projects/mod_evasive/
  529. regex = mod_evasive[._-](__VER__)\.tar\.gz
  530. }
  531. %prep
  532. # unpack Apache distribution
  533. %setup -q -c
  534. %patch -p0
  535. %{l_shtool} subst \
  536. -e 's;"Unix";"%{l_openpkg_release -F "OpenPKG/%%t"}";g' \
  537. apache_%{V_apache}/src/os/unix/os.h
  538. # unpack optional extension modules
  539. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  540. %setup -q -T -D -a 1
  541. %endif
  542. %if "%{with_mod_perl}" == "yes"
  543. %setup -q -T -D -a 2
  544. %endif
  545. %if "%{with_mod_php}" == "yes"
  546. %setup -q -T -D -a 3
  547. ( cd php-%{V_mod_php}
  548. %if "%{with_mod_php_hardened}" == "yes"
  549. %patch -p1 -P 2
  550. %endif
  551. %if "%{with_mod_php_suhosin}" == "yes"
  552. %{l_gzip} -d -c %{SOURCE21} | %{l_tar} xf -
  553. %patch -p1 -P 3
  554. mv suhosin-%{V_mod_php_suhosin_e} ext/suhosin
  555. rm -f package.xml
  556. export PHP_AUTOCONF=autoconf-213
  557. ./buildconf --copy --force
  558. $PHP_AUTOCONF
  559. %endif
  560. %patch -p0 -P 5
  561. %{l_shtool} subst \
  562. -e 's;\(/include\)/freetype2;\1;' \
  563. configure \
  564. ext/gd/config.m4
  565. %if "%{with_mod_php_mssql}" == "yes"
  566. %{l_shtool} subst \
  567. -e 's;\($PHP_MSSQL/include/\)\(tds.h\);\1freetds/\2;g' \
  568. -e 's;\($FREETDS_INSTALLATION_DIR/lib/\)\(libtds.a\);\1freetds/\2;g' \
  569. -e 's;\(MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include\);\1/freetds;' \
  570. -e 's;\(MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib\);\1/freetds;' \
  571. configure
  572. %{l_shtool} subst \
  573. -e 's;^typedef short SHORT\;;;' \
  574. ext/mssql/php_mssql.h
  575. %endif
  576. ) || exit $?
  577. %endif
  578. %if "%{with_mod_dav}" == "yes"
  579. %setup -q -T -D -a 4
  580. %endif
  581. %if "%{with_mod_layout}" == "yes"
  582. %setup -q -T -D -a 5
  583. %endif
  584. %if "%{with_mod_macro}" == "yes"
  585. %setup -q -T -D -a 6
  586. %endif
  587. %if "%{with_mod_auth_pam}" == "yes"
  588. %setup -q -T -D -a 7
  589. %endif
  590. %if "%{with_mod_gzip}" == "yes"
  591. %setup -q -T -D -a 8
  592. %endif
  593. %if "%{with_mod_fastcgi}" == "yes"
  594. %setup -q -T -D -a 9
  595. %endif
  596. %if "%{with_mod_throttle}" == "yes"
  597. %setup -q -T -D -a 10
  598. %endif
  599. %if "%{with_mod_access_referer}" == "yes"
  600. %setup -q -T -D -a 11
  601. %endif
  602. %if "%{with_mod_roaming}" == "yes"
  603. %setup -q -T -D -a 12
  604. %endif
  605. %if "%{with_mod_relocate}" == "yes"
  606. %setup -q -T -D -a 13
  607. %endif
  608. %if "%{with_mod_auth_ldap}" == "yes"
  609. %setup -q -T -D -a 14
  610. %endif
  611. %if "%{with_mod_auth_radius}" == "yes"
  612. %setup -q -T -D -a 15
  613. %patch -p0 -d mod_auth_radius-%{V_mod_auth_radius} -P 7
  614. %endif
  615. %if "%{with_mod_auth_mysql}" == "yes"
  616. %setup -q -T -D -a 16
  617. %endif
  618. %if "%{with_suphp}" == "yes"
  619. %setup -q -T -D -a 17
  620. %patch -p0 -d suphp-%{V_suphp} -P 4
  621. %endif
  622. %if "%{with_mod_security}" == "yes"
  623. %setup -q -T -D -a 18
  624. %endif
  625. %if "%{with_mod_evasive}" == "yes"
  626. %setup -q -T -D -a 19
  627. %endif
  628. %if "%{with_mod_owa}" == "yes"
  629. %setup -q -T -D -a 20
  630. sed <%{PATCH apache-php4.patch.modowa} \
  631. -e "s;@l_oracle_cflags@;`%{l_rc} --query oracle_cflags`;g" |\
  632. %{l_patch} -p0
  633. %endif
  634. %if "%{with_mod_auth_kerb}" == "yes"
  635. %setup -q -T -D -a 22
  636. %patch -p0 -d mod_auth_kerb-%{V_mod_auth_kerb} -P 6
  637. %endif
  638. %build
  639. # prepare environment
  640. rm -rf $RPM_BUILD_ROOT
  641. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  642. # optionally prepare mod_ssl or mod_define
  643. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  644. ( cd mod_ssl-%{V_mod_ssl}
  645. ./configure \
  646. --with-apache=../apache_%{V_apache} \
  647. %if "%{with_mod_ssl}" != "yes"
  648. --with-eapi-only \
  649. %endif
  650. --expert --force
  651. ) || exit $?
  652. %endif
  653. # optionally pre-configure Apache for mod_php and mod_dav
  654. %if "%{with_mod_php}" == "yes" || "%{with_mod_dav}" == "yes"
  655. ( cd apache_%{V_apache}
  656. CC="%{l_cc}" \
  657. %if "%{with_debug}" == "yes"
  658. CFLAGS="%{l_cflags} -g" \
  659. %else
  660. CFLAGS="%{l_cflags -O}" \
  661. %endif
  662. ./configure \
  663. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  664. --enable-rule=EAPI \
  665. %endif
  666. %if "%{with_shared_core}" == "yes"
  667. --enable-rule=SHARED_CORE \
  668. %endif
  669. %if "%{with_shared_chain}" == "yes"
  670. --enable-rule=SHARED_CHAIN \
  671. %endif
  672. --target=apache \
  673. --with-layout=GNU \
  674. --prefix=%{l_prefix} \
  675. --sbindir=%{l_prefix}/sbin \
  676. --sysconfdir=%{l_prefix}/etc/apache \
  677. --libexecdir=%{l_prefix}/lib/apache \
  678. --datadir=%{l_prefix}/share/apache \
  679. --localstatedir=%{l_prefix}/var/apache
  680. ) || exit $?
  681. %endif
  682. # optionally prepare mod_perl
  683. %if "%{with_mod_perl}" == "yes"
  684. ( cd mod_perl-%{V_mod_perl}
  685. eval `%{l_prefix}/bin/perl -V:archname`
  686. eval `%{l_prefix}/bin/perl -V:version`
  687. eval `%{l_prefix}/bin/perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  688. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  689. perl=$RPM_BUILD_ROOT%{l_prefix}/bin/perl
  690. echo "#!/bin/sh" >$perl
  691. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  692. echo " -I${RPM_BUILD_ROOT}${installarchlib} \\" >>$perl
  693. echo " -I${RPM_BUILD_ROOT}${installprivlib} \\" >>$perl
  694. echo " -I${RPM_BUILD_ROOT}${installsitearch} \\" >>$perl
  695. echo " -I${RPM_BUILD_ROOT}${installsitelib} \\" >>$perl
  696. echo " \"\$@\"" >>$perl
  697. chmod a+x $perl
  698. $perl Makefile.PL \
  699. PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
  700. APACHE_SRC=../apache_%{V_apache}/src \
  701. DO_HTTPD=1 \
  702. USE_APACI=1 \
  703. PREP_HTTPD=1 \
  704. EVERYTHING=1 \
  705. PERL_TIE_TABLES=1 \
  706. PERL_DIRECTIVE_HANDLERS=1
  707. %{l_make} %{l_mflags}
  708. %{l_make} %{l_mflags} install
  709. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
  710. %{l_shtool} subst -e "s;^\\(PERL = \\).*;\\1 $perl;" \
  711. ../apache_%{V_apache}/src/modules/perl/mod_perl.config
  712. ) || exit $?
  713. %endif
  714. # optionally prepare mod_php
  715. %if "%{with_mod_php}" == "yes"
  716. ( cd php-%{V_mod_php}
  717. CC="%{l_cc}"; export CC
  718. %if "%{with_debug}" == "yes"
  719. CFLAGS="%{l_cflags} -g %{l_cppflags}"; export CFLAGS
  720. CPPFLAGS="%{l_cflags} -g %{l_cppflags}"; export CPPFLAGS
  721. LDFLAGS="%{l_cflags} -g %{l_ldflags}"; export LDFLAGS
  722. %else
  723. CFLAGS="%{l_cflags -O} %{l_cppflags}"; export CFLAGS
  724. CPPFLAGS="%{l_cflags -O} %{l_cppflags}"; export CPPFLAGS
  725. LDFLAGS="%{l_cflags -O} %{l_ldflags}"; export LDFLAGS
  726. %endif
  727. LIBS=""; export LIBS
  728. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  729. CFLAGS="$CFLAGS -DEAPI"
  730. %endif
  731. %if "%{with_mod_php_gd}" == "yes" || "%{with_mod_php_pdflib}" == "yes"
  732. LIBS="$LIBS -lpng -lz"
  733. %endif
  734. %if "%{with_mod_php_gettext}" == "yes" || "%{with_mod_php_mssql}" == "yes"
  735. LIBS="$LIBS -liconv"
  736. %endif
  737. %if "%{with_mod_php_openldap}" == "yes" && "%{with_mod_php_openldapsasl}" == "yes"
  738. LIBS="$LIBS -lsasl2"
  739. %endif
  740. %if "%{with_mod_php_imap}" == "yes"
  741. LIBS="$LIBS -lssl -lcrypto"
  742. %endif
  743. %if "%{with_mod_php_bdb}" == "yes"
  744. LIBS="$LIBS -ldb"
  745. %endif
  746. %if "%{with_mod_php_oci7}" == "yes" || "%{with_mod_php_oci8}" == "yes"
  747. ORACLE_HOME="`%{l_rc} --query oracle_home`"
  748. export ORACLE_HOME
  749. oracle_libdir="`%{l_rc} --query oracle_libdir`"
  750. case "$oracle_libdir" in
  751. */lib32 )
  752. %{l_shtool} subst \
  753. -e 's;OCI8_DIR/lib;OCI8_DIR/lib32;' \
  754. configure
  755. ;;
  756. esac
  757. %endif
  758. %if "%{with_mod_php_sendmail}" == "yes"
  759. PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
  760. %else
  761. PROG_SENDMAIL="`%{l_shtool} path false`" \
  762. %endif
  763. %if "%{with_mod_php_xslt}" == "yes"
  764. # as Sablotron is C++ explicit linkage against libstdc++ is required
  765. LIBS="$LIBS -lstdc++"
  766. %endif
  767. export PROG_SENDMAIL
  768. ./configure \
  769. --prefix=%{l_prefix} \
  770. --with-apache=../apache_%{V_apache} \
  771. --with-config-file-path=%{l_prefix}/etc/apache \
  772. %if "%{with_mod_php_mbregex}" == "yes"
  773. --enable-mbregex \
  774. %endif
  775. %if "%{with_mod_php_mbstring}" == "yes"
  776. --enable-mbstring \
  777. %endif
  778. %if "%{with_mod_php_suhosin}" == "yes"
  779. --enable-suhosin \
  780. %endif
  781. %if "%{with_mod_php_calendar}" == "yes"
  782. --enable-calendar \
  783. %endif
  784. %if "%{with_mod_php_mssql}" == "yes"
  785. --with-mssql=%{l_prefix} \
  786. %else
  787. --without-mssql \
  788. %endif
  789. %if "%{with_mod_php_mysql}" == "yes"
  790. --with-mysql=%{l_prefix} \
  791. %else
  792. --without-mysql \
  793. %endif
  794. %if "%{with_mod_php_pgsql}" == "yes"
  795. --with-pgsql=%{l_prefix} \
  796. %else
  797. --without-pgsql \
  798. %endif
  799. %if "%{with_mod_php_gd}" == "yes"
  800. --with-gd=%{l_prefix} \
  801. --with-jpeg-dir=%{l_prefix} \
  802. --with-png-dir=%{l_prefix} \
  803. %endif
  804. %if "%{with_mod_php_freetype}" == "yes"
  805. --enable-gd-imgstrttf \
  806. --enable-gd-native-ttf \
  807. --with-freetype-dir=%{l_prefix} \
  808. %endif
  809. %if "%{with_mod_php_t1lib}" == "yes"
  810. --with-t1lib=%{l_prefix} \
  811. %endif
  812. %if "%{with_mod_php_bdb}" == "yes"
  813. --with-db4=%{l_prefix} \
  814. %endif
  815. %if "%{with_mod_php_debug}" == "yes"
  816. --with-debug=yes \
  817. %else
  818. --with-debug=no \
  819. %endif
  820. %if "%{with_mod_php_zlib}" == "yes"
  821. --with-zlib=%{l_prefix} \
  822. --with-zlib-dir=%{l_prefix} \
  823. %endif
  824. %if "%{with_mod_php_bzip2}" == "yes"
  825. --with-bz2=%{l_prefix} \
  826. %endif
  827. %if "%{with_mod_php_pdflib}" == "yes"
  828. --with-pdflib=%{l_prefix} \
  829. --with-jpeg-dir=%{l_prefix} \
  830. --with-png-dir=%{l_prefix} \
  831. %endif
  832. %if "%{with_mod_php_ssl}" == "yes" || "%{with_mod_php_openldap}" == "yes"
  833. --with-openssl=%{l_prefix} \
  834. %endif
  835. %if "%{with_mod_php_openldap}" == "yes"
  836. --with-ldap=%{l_prefix} \
  837. %endif
  838. %if "%{with_mod_php_mm}" == "yes"
  839. --with-mm=%{l_prefix} \
  840. --enable-session \
  841. %endif
  842. %if "%{with_mod_php_pcre}" == "yes"
  843. --with-pcre=%{l_prefix} \
  844. %endif
  845. %if "%{with_mod_php_ftp}" == "yes"
  846. --enable-ftp \
  847. %endif
  848. %if "%{with_mod_php_java}" == "yes"
  849. --with-java=%{l_prefix}/libexec/j2se \
  850. %endif
  851. %if "%{with_mod_php_oci7}" == "yes"
  852. --with-oracle \
  853. %endif
  854. %if "%{with_mod_php_oci8}" == "yes"
  855. --with-oci8 \
  856. --enable-sigchld \
  857. %endif
  858. %if "%{with_mod_php_gettext}" == "yes"
  859. --with-gettext=%{l_prefix} \
  860. %endif
  861. %if "%{with_mod_php_imap}" == "yes"
  862. --with-imap=%{l_prefix} \
  863. --with-imap-ssl=%{l_prefix} \
  864. %endif
  865. %if "%{with_mod_php_xml}" == "yes"
  866. --enable-xml \
  867. --with-expat-dir=%{l_prefix} \
  868. %else
  869. --disable-xml \
  870. %endif
  871. %if "%{with_mod_php_dom}" == "yes"
  872. --with-dom=%{l_prefix} \
  873. --with-dom-xslt=%{l_prefix} \
  874. --with-dom-exslt=%{l_prefix} \
  875. %endif
  876. %if "%{with_mod_php_wddx}" == "yes"
  877. --enable-wddx \
  878. %endif
  879. %if "%{with_mod_php_bc}" == "yes"
  880. --enable-bcmath \
  881. %endif
  882. %if "%{with_mod_php_transsid}" == "yes"
  883. --enable-trans-sid \
  884. %endif
  885. %if "%{with_mod_php_mhash}" == "yes"
  886. --with-mhash=%{l_prefix} \
  887. %endif
  888. %if "%{with_mod_php_mcrypt}" == "yes"
  889. --with-mcrypt=%{l_prefix} \
  890. %endif
  891. %if "%{with_mod_php_curl}" == "yes"
  892. --with-curl=%{l_prefix} \
  893. %endif
  894. %if "%{with_mod_php_gdbm}" == "yes"
  895. --with-gdbm=%{l_prefix} \
  896. %endif
  897. %if "%{with_mod_php_versioning}" == "yes"
  898. --enable-versioning \
  899. %endif
  900. %if "%{with_mod_php_odbc}" == "yes"
  901. --with-unixODBC=%{l_prefix} \
  902. %endif
  903. %if "%{with_mod_php_snmp}" == "yes"
  904. --with-snmp=%{l_prefix} \
  905. %endif
  906. %if "%{with_mod_php_exif}" == "yes"
  907. --with-exif \
  908. %endif
  909. %if "%{with_mod_php_iconv}" == "yes"
  910. --with-iconv=%{l_prefix} \
  911. %endif
  912. %if "%{with_mod_php_crack}" == "yes"
  913. --with-crack=%{l_prefix} \
  914. %endif
  915. %if "%{with_mod_php_xslt}" == "yes"
  916. --enable-xslt \
  917. --with-xslt-sablot=%{l_prefix} \
  918. --with-expat-dir=%{l_prefix} \
  919. --with-iconv-dir=%{l_prefix} \
  920. %endif
  921. --disable-cli \
  922. --without-pear \
  923. --disable-shared \
  924. --enable-inline-optimization \
  925. --enable-track-vars
  926. %{l_make} %{l_mflags}
  927. %{l_make} %{l_mflags} install \
  928. INSTALL_ROOT=$RPM_BUILD_ROOT
  929. ) || exit $?
  930. %endif
  931. # optionally prepare mod_dav
  932. %if "%{with_mod_dav}" == "yes"
  933. ( cd mod_dav-%{V_mod_dav}
  934. CC="%{l_cc}" \
  935. %if "%{with_debug}" == "yes"
  936. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  937. CFLAGS="%{l_cflags} -g -DEAPI" \
  938. %else
  939. CFLAGS="%{l_cflags} -g" \
  940. %endif
  941. %else
  942. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  943. CFLAGS="%{l_cflags -O} -DEAPI" \
  944. %else
  945. CFLAGS="%{l_cflags -O}" \
  946. %endif
  947. %endif
  948. LDFLAGS="%{l_cflags -O}" \
  949. ./configure \
  950. --with-apache=../apache_%{V_apache} \
  951. --with-expat=%{l_prefix}
  952. %{l_make} %{l_mflags}
  953. %{l_make} %{l_mflags} install
  954. ) || exit $?
  955. %endif
  956. # optionally prepare mod_layout
  957. %if "%{with_mod_layout}" == "yes"
  958. ( cd mod_layout-%{V_mod_layout}
  959. mkdir ../apache_%{V_apache}/src/modules/layout
  960. cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
  961. chmod -R u+w ../apache_%{V_apache}/src/modules/layout
  962. ) || exit $?
  963. %endif
  964. # optionally prepare mod_macro
  965. %if "%{with_mod_macro}" == "yes"
  966. ( cd mod_macro-%{V_mod_macro}
  967. cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
  968. ) || exit $?
  969. %endif
  970. # optionally prepare mod_auth_pam
  971. %if "%{with_mod_auth_pam}" == "yes"
  972. ( cd mod_auth_pam-%{V_mod_auth_pam}
  973. sed -e '234N;s/\n//' -e '239N;s/\n//' <mod_auth_pam.c \
  974. >../apache_%{V_apache}/src/modules/extra/mod_auth_pam.c
  975. ) || exit $?
  976. %endif
  977. # optionally prepare mod_auth_ldap
  978. %if "%{with_mod_auth_ldap}" == "yes"
  979. ( cd mod_auth_ldap
  980. cp mod_auth_ldap.c ../apache_%{V_apache}/src/modules/extra/
  981. ) || exit $?
  982. %endif
  983. # optionally prepare mod_auth_radius
  984. %if "%{with_mod_auth_radius}" == "yes"
  985. ( cd mod_auth_radius-%{V_mod_auth_radius}
  986. sed -e 's;#endif DEBUG_RADIUS;#endif;' \
  987. <mod_auth_radius.c \
  988. >../apache_%{V_apache}/src/modules/extra/mod_auth_radius.c
  989. ) || exit $?
  990. %endif
  991. # optionally prepare mod_auth_mysql
  992. %if "%{with_mod_auth_mysql}" == "yes"
  993. %{l_shtool} install -c -m 644 \
  994. -e 's;^[ ]*MYSQL_LIB=.*$;;' \
  995. mod_auth_mysql-%{V_mod_auth_mysql}/mod_auth_mysql.c \
  996. apache_%{V_apache}/src/modules/extra/
  997. %endif
  998. # optionally prepare mod_gzip
  999. %if "%{with_mod_gzip}" == "yes"
  1000. ( cd mod_gzip-%{V_mod_gzip}
  1001. mkdir ../apache_%{V_apache}/src/modules/gzip
  1002. cp -rp * ../apache_%{V_apache}/src/modules/gzip/
  1003. ) || exit $?
  1004. %endif
  1005. # optionally prepare mod_fastcgi
  1006. %if "%{with_mod_fastcgi}" == "yes"
  1007. ( cd mod_fastcgi-%{V_mod_fastcgi}
  1008. mkdir ../apache_%{V_apache}/src/modules/fastcgi
  1009. cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
  1010. ) || exit $?
  1011. %endif
  1012. # optionally prepare mod_throttle
  1013. %if "%{with_mod_throttle}" == "yes"
  1014. ( cd mod_throttle-*
  1015. cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
  1016. ) || exit $?
  1017. %endif
  1018. # optionally prepare mod_access_referer
  1019. %if "%{with_mod_access_referer}" == "yes"
  1020. ( cd mod_access_referer-%{V_mod_access_referer}
  1021. cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
  1022. ) || exit $?
  1023. %endif
  1024. # optionally prepare mod_roaming
  1025. %if "%{with_mod_roaming}" == "yes"
  1026. ( cd mod_roaming-%{V_mod_roaming}
  1027. cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
  1028. ) || exit $?
  1029. %endif
  1030. # optionally prepare mod_owa
  1031. %if "%{with_mod_owa}" == "yes"
  1032. ( cd modowa
  1033. mkdir ../apache_%{V_apache}/src/modules/owa/
  1034. cp src/*.{c,h} src/Makefile.{libdir,tmpl} \
  1035. ../apache_%{V_apache}/src/modules/owa/
  1036. ) || exit $?
  1037. %endif
  1038. # optionally prepare mod_relocate
  1039. %if "%{with_mod_relocate}" == "yes"
  1040. ( cd mod_relocate-%{V_mod_relocate}
  1041. cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
  1042. ) || exit $?
  1043. %endif
  1044. # optionally prepare mod_define (if mod_ssl is disabled only)
  1045. %if "%{with_mod_define}" == "yes" && "%{with_mod_ssl}" != "yes"
  1046. ( cd mod_ssl-%{V_mod_ssl}/pkg.addon
  1047. cp mod_define.c ../../apache_%{V_apache}/src/modules/extra/
  1048. ) || exit $?
  1049. %endif
  1050. # optionally prepare mod_suphp
  1051. %if "%{with_suphp}" == "yes"
  1052. ( cd suphp-%{V_suphp}
  1053. cp src/apache/mod_suphp.c ../apache_%{V_apache}/src/modules/extra/
  1054. chmod +rx configure
  1055. CC="%{l_cc}" \
  1056. CFLAGS="%{l_cflags -O}" \
  1057. AUTOCONF="true" \
  1058. AUTOHEADER="true" \
  1059. AUTOMAKE="true" \
  1060. ACLOCAL="true" \
  1061. ./configure \
  1062. --prefix=%{l_prefix} \
  1063. --sysconfdir=%{l_prefix}/etc/apache \
  1064. --with-apxs="" \
  1065. --with-apache-user=%{with_suphp_caller} \
  1066. --with-php=%{with_suphp_phpcgi} \
  1067. --with-logfile=%{l_prefix}/var/apache/log/suphp.log \
  1068. %if "%{with_suphp_ugid_check}" == "no"
  1069. --disable-checkuid \
  1070. --disable-checkgid \
  1071. %endif
  1072. --with-setid-mode=%{with_suphp_ugid_mode} \
  1073. --disable-shared
  1074. %{l_make} %{l_mflags -O}
  1075. ) || exit $?
  1076. %endif
  1077. # optionally prepare mod_security
  1078. %if "%{with_mod_security}" == "yes"
  1079. ( cd modsecurity-apache_%{V_mod_security}/apache1
  1080. cp mod_security.c ../../apache_%{V_apache}/src/modules/extra/
  1081. ) || exit $?
  1082. %endif
  1083. # optionally prepare mod_evasive
  1084. %if "%{with_mod_evasive}" == "yes"
  1085. ( cd mod_evasive
  1086. cp mod_evasive.c ../apache_%{V_apache}/src/modules/extra/
  1087. ) || exit $?
  1088. %endif
  1089. # optionally prepare mod_auth_kerb
  1090. %if "%{with_mod_auth_kerb}" == "yes"
  1091. ( cd mod_auth_kerb-*
  1092. CC="%{l_cc}" \
  1093. CFLAGS="%{l_cflags}" \
  1094. ./configure \
  1095. --with-krb5=%{l_prefix} \
  1096. --with-krb4=no \
  1097. --with-apache=../apache_%{V_apache}
  1098. ) || exit $?
  1099. mv mod_auth_kerb-* apache_%{V_apache}/src/modules/mod_auth_kerb
  1100. %endif
  1101. # configure Apache
  1102. ( cd apache_%{V_apache}
  1103. %if "%{with_debug}" == "yes"
  1104. cflags="%{l_cflags} -g"
  1105. %else
  1106. cflags="%{l_cflags -O}"
  1107. %endif
  1108. ldflags=""
  1109. libs=""
  1110. %if "%{with_mod_auth_pam}" == "yes"
  1111. pam_incdir=`%{l_rc} --query pam_incdir`
  1112. if [ ".$pam_incdir" != "./usr/include" -a ".$pam_incdir" != "./include" ]; then
  1113. cflags="$cflags -I$pam_incdir"
  1114. fi
  1115. pam_libdir=`%{l_rc} --query pam_libdir`
  1116. if [ ".$pam_libdir" != "./usr/lib" -a ".$pam_libdir" != "./lib" ]; then
  1117. ldflags="$ldflags -L$pam_libdir"
  1118. fi
  1119. libs="$libs -lpam"
  1120. %endif
  1121. %if "%{with_mod_auth_ldap}" == "yes"
  1122. cflags="$cflags %{l_cppflags}"
  1123. ldflags="$ldflags %{l_ldflags}"
  1124. libs="$libs -lldap -llber -lssl -lcrypto"
  1125. case "%{l_platform -t}" in
  1126. *-sunos* )
  1127. libs="$libs -lresolv"
  1128. ;;
  1129. esac
  1130. %endif
  1131. %if "%{with_mod_auth_mysql}" == "yes"
  1132. cflags="$cflags -DAPACHE1 `mysql_config --cflags`"
  1133. libs="$libs `mysql_config --libs`"
  1134. %endif
  1135. %if "%{with_mod_owa}" == "yes"
  1136. cflags="$cflags `%{l_rc} --query oracle_cflags`"
  1137. ldflags="$ldflags `%{l_rc} --query oracle_ldflags`"
  1138. libs="$libs `%{l_rc} --query oracle_libs`"
  1139. %endif
  1140. %if "%{with_gdbm_ndbm}" == "yes"
  1141. cflags="$cflags %{l_cppflags}"
  1142. ldflags="$ldflags %{l_ldflags}"
  1143. libs="$libs -lndbm -lgdbm"
  1144. %endif
  1145. %if "%{with_mod_php_oci7}" == "yes" || "%{with_mod_php_oci8}" == "yes"
  1146. # workaround Oracle inter-library depencency by explicitly
  1147. # linking in all libraries
  1148. ldflags="$ldflags `%{l_rc} --query oracle_ldflags`"
  1149. libs="$libs `%{l_rc} --query oracle_libs`"
  1150. %endif
  1151. %if "%{with_mod_php}" == "yes" && "%{with_mod_php_imap}" == "yes"
  1152. libs="$libs -limap -lmodphp4 -limap"
  1153. %endif
  1154. %if "%{with_suphp}" == "yes"
  1155. cflags="$cflags -DSUPHP_PATH_TO_SUPHP='\"%{l_prefix}/sbin/suphp\"'"
  1156. # ugly hack to extract flags required for certain modes of
  1157. # operation of suPHP
  1158. cflags="$cflags \
  1159. `sed -n -e 's;^OPT_APACHEMOD_USERGROUP_DEF[ ]=\(.*\)$;\1;p' \
  1160. ../suphp-%{V_suphp}/src/apache/Makefile`"
  1161. %endif
  1162. CC="%{l_cc}" \
  1163. CFLAGS="$cflags" \
  1164. LDFLAGS="$ldflags" \
  1165. LIBS="$libs" \
  1166. LD_SHLIB="%{l_cc}" \
  1167. %if "%{with_mod_ssl}" == "yes"
  1168. EAPI_MM="%{l_prefix}" \
  1169. SSL_BASE="%{l_prefix}" \
  1170. %endif
  1171. ./configure \
  1172. --target=apache \
  1173. --with-layout=GNU \
  1174. --prefix=%{l_prefix} \
  1175. --sbindir=%{l_prefix}/sbin \
  1176. --sysconfdir=%{l_prefix}/etc/apache \
  1177. --libexecdir=%{l_prefix}/lib/apache \
  1178. --datadir=%{l_prefix}/share/apache \
  1179. --localstatedir=%{l_prefix}/var/apache \
  1180. %if "%{with_debug}" == "yes"
  1181. --without-execstrip \
  1182. %endif
  1183. %if "%{with_suexec}" == "yes"
  1184. --enable-suexec \
  1185. --suexec-caller=%{with_suexec_caller} \
  1186. --suexec-userdir=%{with_suexec_userdir} \
  1187. --suexec-logfile=%{l_prefix}/var/apache/log/suexec.log \
  1188. %endif
  1189. --enable-module=most \
  1190. --with-perl=%{l_prefix}/bin/perl \
  1191. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  1192. --enable-rule=EAPI \
  1193. %if "%{with_mod_ssl}" == "yes"
  1194. --enable-module=ssl \
  1195. %endif
  1196. %if "%{with_mod_define}" == "yes" && "%{with_mod_ssl}" != "yes"
  1197. --activate-module=src/modules/extra/mod_define.o \
  1198. %endif
  1199. %endif
  1200. %if "%{with_mod_perl}" == "yes"
  1201. --activate-module=src/modules/perl/libperl.a \
  1202. %endif
  1203. %if "%{with_mod_php}" == "yes"
  1204. --activate-module=src/modules/php4/libphp4.a \
  1205. %endif
  1206. %if "%{with_mod_dav}" == "yes"
  1207. --activate-module=src/modules/dav/libdav.a \
  1208. %endif
  1209. --disable-rule=EXPAT \
  1210. %if "%{with_shared_core}" == "yes"
  1211. --enable-rule=SHARED_CORE \
  1212. %endif
  1213. %if "%{with_shared_chain}" == "yes"
  1214. --enable-rule=SHARED_CHAIN \
  1215. %endif
  1216. %if "%{with_mod_layout}" == "yes"
  1217. --activate-module=src/modules/layout/liblayout.a \
  1218. %endif
  1219. %if "%{with_mod_macro}" == "yes"
  1220. --activate-module=src/modules/extra/mod_macro.o \
  1221. %endif
  1222. %if "%{with_mod_auth_pam}" == "yes"
  1223. --activate-module=src/modules/extra/mod_auth_pam.o \
  1224. %endif
  1225. %if "%{with_mod_auth_ldap}" == "yes"
  1226. --activate-module=src/modules/extra/mod_auth_ldap.o \
  1227. %endif
  1228. %if "%{with_mod_auth_radius}" == "yes"
  1229. --activate-module=src/modules/extra/mod_auth_radius.c \
  1230. %endif
  1231. %if "%{with_mod_auth_mysql}" == "yes"
  1232. --activate-module=src/modules/extra/mod_auth_mysql.o \
  1233. %endif
  1234. %if "%{with_mod_gzip}" == "yes"
  1235. --activate-module=src/modules/gzip/libgzip.a \
  1236. %endif
  1237. %if "%{with_mod_fastcgi}" == "yes"
  1238. --activate-module=src/modules/fastcgi/libfastcgi.a \
  1239. %endif
  1240. %if "%{with_mod_throttle}" == "yes"
  1241. --activate-module=src/modules/extra/mod_throttle.o \
  1242. %endif
  1243. %if "%{with_mod_access_referer}" == "yes"
  1244. --activate-module=src/modules/extra/mod_access_referer.o \
  1245. %endif
  1246. %if "%{with_mod_owa}" == "yes"
  1247. --activate-module=src/modules/owa/libowa.a \
  1248. %endif
  1249. %if "%{with_mod_roaming}" == "yes"
  1250. --activate-module=src/modules/extra/mod_roaming.o \
  1251. %endif
  1252. %if "%{with_mod_relocate}" == "yes"
  1253. --activate-module=src/modules/extra/mod_relocate.o \
  1254. %endif
  1255. %if "%{with_suphp}" == "yes"
  1256. --activate-module=src/modules/extra/mod_suphp.o \
  1257. %endif
  1258. %if "%{with_mod_security}" == "yes"
  1259. --activate-module=src/modules/extra/mod_security.o \
  1260. %endif
  1261. %if "%{with_mod_evasive}" == "yes"
  1262. --activate-module=src/modules/extra/mod_evasive.o \
  1263. %endif
  1264. %if "%{with_mod_auth_kerb}" == "yes"
  1265. --activate-module=src/modules/mod_auth_kerb/libmod_auth_kerb.a \
  1266. %endif
  1267. --enable-module=so
  1268. %{l_make} %{l_mflags -O} build-quiet
  1269. ) || exit $?
  1270. %install
  1271. # install Apache
  1272. ( cd apache_%{V_apache}
  1273. # perform standard Apache installation procedure
  1274. %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
  1275. # post-adjustments to installation tree
  1276. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
  1277. $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
  1278. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
  1279. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/README*
  1280. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/*.default
  1281. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/srm.conf
  1282. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/access.conf
  1283. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.en \
  1284. $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html
  1285. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.*
  1286. chmod a+rx $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin/*
  1287. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin \
  1288. $RPM_BUILD_ROOT%{l_prefix}/cgi/
  1289. rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
  1290. ) || exit $?
  1291. # install shell environment script
  1292. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  1293. -e 's;@l_path@;%{l_build_path};' \
  1294. -e 's;@l_ld_library_path@;%{l_build_ldlp};' \
  1295. %{SOURCE apache.sh} \
  1296. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  1297. %if "%{with_mod_fastcgi}" == "yes"
  1298. # provide mod_fastcgi IPC directory
  1299. %{l_shtool} mkdir -f -p -m 755 \
  1300. $RPM_BUILD_ROOT%{l_prefix}/var/apache/fastcgi
  1301. %endif
  1302. %if "%{with_mod_perl}" == "yes"
  1303. # cleanup for mod_perl
  1304. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
  1305. # provide mod_perl init script
  1306. %{l_shtool} install -c -m 644 \
  1307. %{SOURCE apache.pl} \
  1308. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  1309. %endif
  1310. # optionally make PHP happy
  1311. %if "%{with_mod_php}" == "yes"
  1312. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  1313. %{SOURCE php.ini} $RPM_BUILD_ROOT%{l_prefix}/etc/apache/php.ini
  1314. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/php
  1315. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/php/build
  1316. rmdir $RPM_BUILD_ROOT%{l_prefix}/lib/php >/dev/null 2>&1 || true
  1317. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/{php-config,phpextdist,phpize}
  1318. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/{php-config,phpize}.1
  1319. %endif
  1320. # optionally install suPHP wrapper binary
  1321. %if "%{with_suphp}" == "yes"
  1322. ( cd suphp-%{V_suphp}
  1323. %{l_shtool} install -c -s -m 711 \
  1324. src/suphp $RPM_BUILD_ROOT%{l_prefix}/sbin/
  1325. %{l_shtool} install -c -m 644 \
  1326. -e 's;^\(logfile=\).*;\1%{l_prefix}/var/apache/log/suphp.log;' \
  1327. -e 's;^\(webserver_user=\).*;\1%{with_suphp_caller};' \
  1328. -e 's;/usr/bin/php;%{with_suphp_phpcgi};' \
  1329. doc/suphp.conf-example \
  1330. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/suphp.conf
  1331. ) || exit $?
  1332. %endif
  1333. # create default configuration
  1334. l_hostname=`%{l_shtool} echo -e %h`
  1335. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  1336. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  1337. -e "s;@l_hostname@;$l_hostname;g" \
  1338. -e "s;@l_domainname@;$l_domainname;g" \
  1339. %{SOURCE apache.base} \
  1340. %{SOURCE apache.conf} \
  1341. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  1342. mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
  1343. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  1344. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
  1345. # create run-command script
  1346. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  1347. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  1348. %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  1349. # strip installation binaries
  1350. %if "%{with_debug}" != "yes"
  1351. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  1352. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true
  1353. %endif
  1354. # determine installation tree files
  1355. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  1356. %{l_files_std} \
  1357. %if "%{with_suexec}" == "yes"
  1358. '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suexec' \
  1359. %endif
  1360. %if "%{with_suphp}" == "yes"
  1361. '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suphp' \
  1362. %endif
  1363. '%config %{l_prefix}/etc/apache/*' \
  1364. %if "%{with_mod_ssl}" == "yes"
  1365. '%config %{l_prefix}/etc/apache/ssl.crl/*.crl' \
  1366. '%config %{l_prefix}/etc/apache/ssl.crt/*.crt' \
  1367. '%config %{l_prefix}/etc/apache/ssl.csr/*.csr' \
  1368. '%config %{l_prefix}/etc/apache/ssl.key/*.key' \
  1369. '%config %{l_prefix}/etc/apache/ssl.prm/*.prm' \
  1370. %endif
  1371. %if "%{with_mod_fastcgi}" == "yes"
  1372. '%attr(750,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/apache/fastcgi' \
  1373. %endif
  1374. '%config %attr(444,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/apache/apache.base'
  1375. %files -f files
  1376. %clean
  1377. rm -rf $RPM_BUILD_ROOT
  1378. %post
  1379. %if "%{with_mod_auth_pam}" == "yes"
  1380. # add PAM configuration entry
  1381. if [ $1 -eq 1 ]; then
  1382. $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=apache
  1383. fi
  1384. %endif
  1385. # after upgrade, restart service
  1386. [ $1 -eq 2 ] || exit 0
  1387. eval `%{l_rc} apache status 2>/dev/null`
  1388. [ ".$apache_active" = .yes ] && %{l_rc} apache restart
  1389. exit 0
  1390. %preun
  1391. # before erase, stop service and remove log files
  1392. [ $1 -eq 0 ] || exit 0
  1393. %{l_rc} apache stop 2>/dev/null
  1394. rm -rf $RPM_INSTALL_PREFIX/var/apache/log/ >/dev/null 2>&1 || true
  1395. %if "%{with_mod_auth_pam}" == "yes"
  1396. # remove PAM configuration entry
  1397. $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=apache
  1398. %endif
  1399. exit 0