apache-php4.spec 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468
  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.3
  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.18
  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: 20070329
  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. Patch8: apache-php4.patch.modssl
  226. Patch9: apache-php4.patch.modperl
  227. # build information
  228. Prefix: %{l_prefix}
  229. BuildRoot: %{l_buildroot}
  230. BuildPreReq: OpenPKG, openpkg >= 20060823
  231. PreReq: OpenPKG, openpkg >= 20060823
  232. %if "%{with_gdbm_ndbm}" == "yes"
  233. BuildPreReq: gdbm, gdbm::with_ndbm = yes
  234. PreReq: gdbm, gdbm::with_ndbm = yes
  235. %endif
  236. %if "%{with_mod_auth_kerb}" == "yes"
  237. BuildPreReq: kerberos
  238. PreReq: kerberos
  239. %endif
  240. %if "%{with_mod_auth_ldap}" == "yes"
  241. BuildPreReq: openldap, openssl
  242. PreReq: openldap, openssl
  243. %endif
  244. %if "%{with_mod_auth_mysql}" == "yes"
  245. BuildPreReq: mysql
  246. PreReq: mysql
  247. %endif
  248. %if "%{with_mod_auth_pam}" == "yes"
  249. BuildPreReq: PAM
  250. PreReq: PAM
  251. %endif
  252. %if "%{with_mod_dav}" == "yes"
  253. BuildPreReq: expat
  254. PreReq: expat
  255. %endif
  256. %if "%{with_mod_owa}" == "yes"
  257. BuildPreReq: oracle
  258. PreReq: oracle
  259. %endif
  260. %if "%{with_mod_perl}" == "yes"
  261. BuildPreReq: perl
  262. PreReq: perl
  263. %endif
  264. %if "%{with_mod_php}" == "yes"
  265. BuildPreReq: gcc, sed, flex, bison
  266. %if "%{with_mod_php_bdb}" == "yes"
  267. BuildPreReq: db
  268. PreReq: db
  269. %endif
  270. %if "%{with_mod_php_bzip2}" == "yes"
  271. BuildPreReq: bzip2
  272. PreReq: bzip2
  273. %endif
  274. %if "%{with_mod_php_crack}" == "yes"
  275. BuildPreReq: cracklib
  276. PreReq: cracklib
  277. %endif
  278. %if "%{with_mod_php_curl}" == "yes"
  279. BuildPreReq: curl
  280. PreReq: curl
  281. %endif
  282. %if "%{with_mod_php_xml}" == "yes"
  283. BuildPreReq: expat
  284. PreReq: expat
  285. %endif
  286. %if "%{with_mod_php_dom}" == "yes"
  287. BuildPreReq: libxml, libxslt
  288. PreReq: libxml, libxslt
  289. %endif
  290. %if "%{with_mod_php_freetype}" == "yes"
  291. BuildPreReq: freetype
  292. PreReq: freetype
  293. %endif
  294. %if "%{with_mod_php_gd}" == "yes"
  295. BuildPreReq: gd >= 2.0.20, jpeg, png
  296. PreReq: gd >= 2.0.20, jpeg, png
  297. %endif
  298. %if "%{with_mod_php_gdbm}" == "yes"
  299. BuildPreReq: gdbm
  300. PreReq: gdbm
  301. %endif
  302. %if "%{with_mod_php_gettext}" == "yes"
  303. BuildPreReq: gettext, libiconv
  304. PreReq: gettext, libiconv
  305. %endif
  306. %if "%{with_mod_php_iconv}" == "yes"
  307. BuildPreReq: libiconv
  308. PreReq: libiconv
  309. %endif
  310. %if "%{with_mod_php_imap}" == "yes"
  311. BuildPreReq: imap, openssl
  312. PreReq: imap, openssl
  313. %endif
  314. %if "%{with_mod_php_java}" == "yes"
  315. BuildPreReq: j2se
  316. PreReq: j2se
  317. %endif
  318. %if "%{with_mod_php_mcrypt}" == "yes"
  319. BuildPreReq: libmcrypt
  320. PreReq: libmcrypt
  321. %endif
  322. %if "%{with_mod_php_mhash}" == "yes"
  323. BuildPreReq: mhash
  324. PreReq: mhash
  325. %endif
  326. %if "%{with_mod_php_mm}" == "yes"
  327. BuildPreReq: mm
  328. PreReq: mm
  329. %endif
  330. %if "%{with_mod_php_mssql}" == "yes"
  331. BuildPreReq: freetds, libiconv
  332. PreReq: freetds, libiconv
  333. %endif
  334. %if "%{with_mod_php_mysql}" == "yes"
  335. BuildPreReq: mysql
  336. PreReq: mysql
  337. %endif
  338. %if "%{with_mod_php_oci7}" == "yes" || "%{with_mod_php_oci8}" == "yes"
  339. BuildPreReq: oracle
  340. PreReq: oracle
  341. %endif
  342. %if "%{with_mod_php_odbc}" == "yes"
  343. BuildPreReq: unixodbc
  344. PreReq: unixodbc
  345. %endif
  346. %if "%{with_mod_php_openldap}" == "yes"
  347. BuildPreReq: openldap, openssl
  348. PreReq: openldap, openssl
  349. %if "%{with_mod_php_openldapsasl}" == "yes"
  350. BuildPreReq: openldap::with_sasl = yes
  351. PreReq: openldap::with_sasl = yes
  352. %else
  353. BuildPreReq: openldap::with_sasl = no
  354. PreReq: openldap::with_sasl = no
  355. %endif
  356. %endif
  357. %if "%{with_mod_php_pcre}" == "yes"
  358. BuildPreReq: pcre
  359. PreReq: pcre
  360. %endif
  361. %if "%{with_mod_php_pdflib}" == "yes"
  362. BuildPreReq: pdflib, jpeg, png
  363. PreReq: pdflib, jpeg, png
  364. %endif
  365. %if "%{with_mod_php_pgsql}" == "yes"
  366. BuildPreReq: postgresql, openssl
  367. PreReq: postgresql, openssl
  368. %endif
  369. %if "%{with_mod_php_sendmail}" == "yes"
  370. BuildPreReq: MTA
  371. PreReq: MTA
  372. %endif
  373. %if "%{with_mod_php_snmp}" == "yes"
  374. BuildPreReq: snmp
  375. PreReq: snmp
  376. %endif
  377. %if "%{with_mod_php_ssl}" == "yes"
  378. BuildPreReq: openssl
  379. PreReq: openssl
  380. %endif
  381. %if "%{with_mod_php_suhosin}" == "yes"
  382. BuildPreReq: autoconf
  383. %endif
  384. %if "%{with_mod_php_t1lib}" == "yes"
  385. BuildPreReq: t1lib
  386. PreReq: t1lib
  387. %endif
  388. %if "%{with_mod_php_xslt}" == "yes"
  389. BuildPreReq: sablotron, expat, libiconv, gcc::with_cxx = yes
  390. PreReq: sablotron, expat, libiconv
  391. %endif
  392. %if "%{with_mod_php_zlib}" == "yes"
  393. BuildPreReq: zlib
  394. PreReq: zlib
  395. %endif
  396. %endif
  397. %if "%{with_mod_ssl}" == "yes"
  398. BuildPreReq: openssl, mm
  399. PreReq: openssl, mm
  400. %endif
  401. %if "%{with_suphp}" == "yes"
  402. BuildPreReq: php, gcc, gcc::with_cxx = yes
  403. PreReq: php
  404. %endif
  405. AutoReq: no
  406. AutoReqProv: no
  407. Provides: apache = %{version}-%{release}
  408. %description
  409. The Apache Project is a collaborative software development effort
  410. aimed at creating a robust, commercial-grade, featureful, and
  411. freely-available source code implementation of an HTTP (Web) server.
  412. The project is jointly managed by a group of volunteers located
  413. around the world, using the Internet and the Web to communicate,
  414. plan, and develop the server and its related documentation. These
  415. volunteers are known as the Apache Group. In addition, hundreds
  416. of users have contributed ideas, code, and documentation to the
  417. project.
  418. %track
  419. prog apache-php4 = {
  420. version = %{version}
  421. url = http://www.apache.org/dist/httpd/
  422. regex = apache_(__VER__)\.tar\.gz
  423. }
  424. prog apache-php4:mod_access_referer = {
  425. version = %{V_mod_roaming}
  426. url = http://prdownloads.sourceforge.net/accessreferer/
  427. regex = mod_access_referer-(__VER__)\.tar\.gz
  428. }
  429. prog apache-php4:mod_auth_mysql = {
  430. version = %{V_mod_auth_mysql}
  431. url = http://prdownloads.sourceforge.net/modauthmysql/
  432. regex = mod_auth_mysql-(__VER__)\.tar\.gz
  433. }
  434. prog apache-php4:mod_auth_radius = {
  435. version = %{V_mod_auth_radius}
  436. url = ftp://ftp.freeradius.org/pub/radius/
  437. regex = mod_auth_radius-(__VER__)\.tar
  438. }
  439. prog apache-php4:mod_auth_kerb = {
  440. version = %{V_mod_auth_kerb}
  441. url = http://prdownloads.sourceforge.net/modauthkerb/
  442. regex = mod_auth_kerb-(__VER__)\.tar
  443. }
  444. prog apache-php4:mod_dav = {
  445. version = %{V_mod_dav}
  446. url = http://www.webdav.org/mod_dav/
  447. regex = mod_dav-(__VER__)\.tar\.gz
  448. }
  449. prog apache-php4:mod_gzip = {
  450. version = %{V_mod_gzip}
  451. url = http://prdownloads.sourceforge.net/mod-gzip/
  452. regex = mod_gzip-(__VER__)\.tgz
  453. }
  454. prog apache-php4:mod_fastcgi = {
  455. version = %{V_mod_fastcgi}
  456. url = http://www.fastcgi.com/dist/
  457. regex = mod_fastcgi-(__VER__)\.tar\.gz
  458. }
  459. prog apache-php4:mod_layout = {
  460. version = %{V_mod_layout}
  461. url = http://download.tangent.org/
  462. regex = mod_layout-(3\.[\d.]+)\.tar\.gz
  463. }
  464. prog apache-php4:mod_macro = {
  465. disabled
  466. comment = "rse: Apache 1.3 support stopped with version 1.1.2"
  467. version = %{V_mod_macro}
  468. url = http://www.cri.ensmp.fr/~coelho/mod_macro/
  469. regex = mod_macro-(__VER__)\.tar\.gz
  470. }
  471. prog apache-php4:mod_perl = {
  472. version = %{V_mod_perl}
  473. url = http://perl.apache.org/dist/
  474. regex = mod_perl-(1\.\d+)\.tar\.gz
  475. }
  476. prog apache-php4:mod_php = {
  477. version = %{V_mod_php}
  478. url = http://www.php.net/downloads.php
  479. regex = php-(4\.\d+\.\d+)\.tar\.gz
  480. }
  481. prog apache-php4:mod_php_hardened = {
  482. comment = "cs: year 2006 -> 2007 substitution probably obselete with next release"
  483. version = %{V_mod_php_hardened}
  484. url = http://www.hardened-php.net/downloads.13.html
  485. regex = hardening-patch-(4\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
  486. }
  487. prog apache-php4:mod_php_suhosin-patch = {
  488. version = %{V_mod_php_suhosin_p}
  489. url = http://www.hardened-php.net/suhosin/download.html
  490. regex = suhosin-patch-(4\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
  491. }
  492. prog apache-php4:mod_php_suhosin-ext = {
  493. version = %{V_mod_php_suhosin_e}
  494. url = http://www.hardened-php.net/suhosin/download.html
  495. regex = suhosin-(\d+(\.\d+)+)\.tgz
  496. }
  497. prog apache-php4:mod_relocate = {
  498. version = %{V_mod_relocate}
  499. url = http://software.tangent.org/download/
  500. regex = mod_relocate-(__VER__)\.tar\.gz
  501. }
  502. prog apache-php4:mod_roaming = {
  503. version = %{V_mod_roaming}
  504. url = http://www.klomp.org/mod_roaming/
  505. regex = mod_roaming-(1\.\d+\.\d+)\.tar\.gz
  506. }
  507. prog apache-php4:mod_ssl = {
  508. version = %{V_mod_ssl}
  509. url = http://www.modssl.org/source/
  510. regex = mod_ssl-(__VER__)\.tar\.gz
  511. }
  512. prog apache-php4:mod_throttle = {
  513. disabled
  514. comment = "rse: currently no longer publically available"
  515. version = %{V_mod_throttle}
  516. url = http://www.snert.com/Software/mod_throttle/
  517. regex = mod_throttle(__VER__)\.tgz
  518. }
  519. prog apache-php4:suphp = {
  520. version = %{V_suphp}
  521. url = http://www.suphp.org/Download.html
  522. regex = suphp-(__VER__)\.tar\.gz
  523. }
  524. prog apache-php4:mod_security = {
  525. version = %{V_mod_security}
  526. url = http://www.modsecurity.org/download/
  527. regex = modsecurity-apache_(1\.\d+(\.\d+)*)\.tar\.gz
  528. }
  529. prog apache-php4:mod_evasive = {
  530. version = %{V_mod_evasive}
  531. url = http://www.zdziarski.com/projects/mod_evasive/
  532. regex = mod_evasive[._-](__VER__)\.tar\.gz
  533. }
  534. %prep
  535. # unpack Apache distribution
  536. %setup -q -c
  537. %patch -p0
  538. %{l_shtool} subst \
  539. -e 's;"Unix";"%{l_openpkg_release -F "OpenPKG/%%t"}";g' \
  540. apache_%{V_apache}/src/os/unix/os.h
  541. # unpack optional extension modules
  542. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  543. %setup -q -T -D -a 1
  544. %patch -p0 -d mod_ssl-%{V_mod_ssl} -P 8
  545. %endif
  546. %if "%{with_mod_perl}" == "yes"
  547. %setup -q -T -D -a 2
  548. %patch -p0 -d mod_perl-%{V_mod_perl} -P 9
  549. %endif
  550. %if "%{with_mod_php}" == "yes"
  551. %setup -q -T -D -a 3
  552. ( cd php-%{V_mod_php}
  553. %if "%{with_mod_php_hardened}" == "yes"
  554. # substitude year 2006 -> 2007 to make Hardening patch apply on
  555. # recent versions of PHP
  556. %{l_gzip} -dc %{PATCH2} |\
  557. %{l_sed} -e 's;\(1997-200\)6\( The PHP Group\);\17\2;'g |\
  558. %{l_patch} -p1 -b
  559. %endif
  560. %if "%{with_mod_php_suhosin}" == "yes"
  561. %{l_gzip} -d -c %{SOURCE21} | %{l_tar} xf -
  562. %patch -p1 -P 3
  563. mv suhosin-%{V_mod_php_suhosin_e} ext/suhosin
  564. rm -f package.xml
  565. export PHP_AUTOCONF=autoconf-213
  566. ./buildconf --copy --force
  567. $PHP_AUTOCONF
  568. %endif
  569. %patch -p0 -P 5
  570. %{l_shtool} subst \
  571. -e 's;\(/include\)/freetype2;\1;' \
  572. configure \
  573. ext/gd/config.m4
  574. %if "%{with_mod_php_mssql}" == "yes"
  575. %{l_shtool} subst \
  576. -e 's;\($PHP_MSSQL/include/\)\(tds.h\);\1freetds/\2;g' \
  577. -e 's;\($FREETDS_INSTALLATION_DIR/lib/\)\(libtds.a\);\1freetds/\2;g' \
  578. -e 's;\(MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include\);\1/freetds;' \
  579. -e 's;\(MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/lib\);\1/freetds;' \
  580. configure
  581. %{l_shtool} subst \
  582. -e 's;^typedef short SHORT\;;;' \
  583. ext/mssql/php_mssql.h
  584. %endif
  585. ) || exit $?
  586. %endif
  587. %if "%{with_mod_dav}" == "yes"
  588. %setup -q -T -D -a 4
  589. %endif
  590. %if "%{with_mod_layout}" == "yes"
  591. %setup -q -T -D -a 5
  592. %endif
  593. %if "%{with_mod_macro}" == "yes"
  594. %setup -q -T -D -a 6
  595. %endif
  596. %if "%{with_mod_auth_pam}" == "yes"
  597. %setup -q -T -D -a 7
  598. %endif
  599. %if "%{with_mod_gzip}" == "yes"
  600. %setup -q -T -D -a 8
  601. %endif
  602. %if "%{with_mod_fastcgi}" == "yes"
  603. %setup -q -T -D -a 9
  604. %endif
  605. %if "%{with_mod_throttle}" == "yes"
  606. %setup -q -T -D -a 10
  607. %endif
  608. %if "%{with_mod_access_referer}" == "yes"
  609. %setup -q -T -D -a 11
  610. %endif
  611. %if "%{with_mod_roaming}" == "yes"
  612. %setup -q -T -D -a 12
  613. %endif
  614. %if "%{with_mod_relocate}" == "yes"
  615. %setup -q -T -D -a 13
  616. %endif
  617. %if "%{with_mod_auth_ldap}" == "yes"
  618. %setup -q -T -D -a 14
  619. %endif
  620. %if "%{with_mod_auth_radius}" == "yes"
  621. %setup -q -T -D -a 15
  622. %patch -p0 -d mod_auth_radius-%{V_mod_auth_radius} -P 7
  623. %endif
  624. %if "%{with_mod_auth_mysql}" == "yes"
  625. %setup -q -T -D -a 16
  626. %endif
  627. %if "%{with_suphp}" == "yes"
  628. %setup -q -T -D -a 17
  629. %patch -p0 -d suphp-%{V_suphp} -P 4
  630. %endif
  631. %if "%{with_mod_security}" == "yes"
  632. %setup -q -T -D -a 18
  633. %endif
  634. %if "%{with_mod_evasive}" == "yes"
  635. %setup -q -T -D -a 19
  636. %endif
  637. %if "%{with_mod_owa}" == "yes"
  638. %setup -q -T -D -a 20
  639. sed <%{PATCH apache-php4.patch.modowa} \
  640. -e "s;@l_oracle_cflags@;`%{l_rc} --query oracle_cflags`;g" |\
  641. %{l_patch} -p0
  642. %endif
  643. %if "%{with_mod_auth_kerb}" == "yes"
  644. %setup -q -T -D -a 22
  645. %patch -p0 -d mod_auth_kerb-%{V_mod_auth_kerb} -P 6
  646. %endif
  647. %build
  648. # prepare environment
  649. rm -rf $RPM_BUILD_ROOT
  650. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
  651. # optionally prepare mod_ssl or mod_define
  652. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  653. ( cd mod_ssl-%{V_mod_ssl}
  654. ./configure \
  655. --with-apache=../apache_%{V_apache} \
  656. %if "%{with_mod_ssl}" != "yes"
  657. --with-eapi-only \
  658. %endif
  659. --expert --force
  660. ) || exit $?
  661. %endif
  662. # optionally pre-configure Apache for mod_php and mod_dav
  663. %if "%{with_mod_php}" == "yes" || "%{with_mod_dav}" == "yes"
  664. ( cd apache_%{V_apache}
  665. CC="%{l_cc}" \
  666. %if "%{with_debug}" == "yes"
  667. CFLAGS="%{l_cflags} -g" \
  668. %else
  669. CFLAGS="%{l_cflags -O}" \
  670. %endif
  671. ./configure \
  672. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  673. --enable-rule=EAPI \
  674. %endif
  675. %if "%{with_shared_core}" == "yes"
  676. --enable-rule=SHARED_CORE \
  677. %endif
  678. %if "%{with_shared_chain}" == "yes"
  679. --enable-rule=SHARED_CHAIN \
  680. %endif
  681. --target=apache \
  682. --with-layout=GNU \
  683. --prefix=%{l_prefix} \
  684. --sbindir=%{l_prefix}/sbin \
  685. --sysconfdir=%{l_prefix}/etc/apache \
  686. --libexecdir=%{l_prefix}/lib/apache \
  687. --datadir=%{l_prefix}/share/apache \
  688. --localstatedir=%{l_prefix}/var/apache
  689. ) || exit $?
  690. %endif
  691. # optionally prepare mod_perl
  692. %if "%{with_mod_perl}" == "yes"
  693. ( cd mod_perl-%{V_mod_perl}
  694. eval `%{l_prefix}/bin/perl -V:archname`
  695. eval `%{l_prefix}/bin/perl -V:version`
  696. eval `%{l_prefix}/bin/perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  697. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  698. perl=$RPM_BUILD_ROOT%{l_prefix}/bin/perl
  699. echo "#!/bin/sh" >$perl
  700. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  701. echo " -I${RPM_BUILD_ROOT}${installarchlib} \\" >>$perl
  702. echo " -I${RPM_BUILD_ROOT}${installprivlib} \\" >>$perl
  703. echo " -I${RPM_BUILD_ROOT}${installsitearch} \\" >>$perl
  704. echo " -I${RPM_BUILD_ROOT}${installsitelib} \\" >>$perl
  705. echo " \"\$@\"" >>$perl
  706. chmod a+x $perl
  707. $perl Makefile.PL \
  708. PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
  709. APACHE_SRC=../apache_%{V_apache}/src \
  710. DO_HTTPD=1 \
  711. USE_APACI=1 \
  712. PREP_HTTPD=1 \
  713. EVERYTHING=1 \
  714. PERL_TIE_TABLES=1 \
  715. PERL_DIRECTIVE_HANDLERS=1
  716. %{l_make} %{l_mflags}
  717. %{l_make} %{l_mflags} install
  718. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
  719. %{l_shtool} subst -e "s;^\\(PERL = \\).*;\\1 $perl;" \
  720. ../apache_%{V_apache}/src/modules/perl/mod_perl.config
  721. ) || exit $?
  722. %endif
  723. # optionally prepare mod_php
  724. %if "%{with_mod_php}" == "yes"
  725. ( cd php-%{V_mod_php}
  726. CC="%{l_cc}"; export CC
  727. %if "%{with_debug}" == "yes"
  728. CFLAGS="%{l_cflags} -g %{l_cppflags}"; export CFLAGS
  729. CPPFLAGS="%{l_cflags} -g %{l_cppflags}"; export CPPFLAGS
  730. LDFLAGS="%{l_cflags} -g %{l_ldflags}"; export LDFLAGS
  731. %else
  732. CFLAGS="%{l_cflags -O} %{l_cppflags}"; export CFLAGS
  733. CPPFLAGS="%{l_cflags -O} %{l_cppflags}"; export CPPFLAGS
  734. LDFLAGS="%{l_cflags -O} %{l_ldflags}"; export LDFLAGS
  735. %endif
  736. LIBS=""; export LIBS
  737. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  738. CFLAGS="$CFLAGS -DEAPI"
  739. %endif
  740. %if "%{with_mod_php_gd}" == "yes" || "%{with_mod_php_pdflib}" == "yes"
  741. LIBS="$LIBS -lpng -lz"
  742. %endif
  743. %if "%{with_mod_php_gettext}" == "yes" || "%{with_mod_php_mssql}" == "yes"
  744. LIBS="$LIBS -liconv"
  745. %endif
  746. %if "%{with_mod_php_openldap}" == "yes" && "%{with_mod_php_openldapsasl}" == "yes"
  747. LIBS="$LIBS -lsasl2"
  748. %endif
  749. %if "%{with_mod_php_imap}" == "yes"
  750. LIBS="$LIBS -lssl -lcrypto"
  751. %endif
  752. %if "%{with_mod_php_bdb}" == "yes"
  753. LIBS="$LIBS -ldb"
  754. %endif
  755. %if "%{with_mod_php_oci7}" == "yes" || "%{with_mod_php_oci8}" == "yes"
  756. ORACLE_HOME="`%{l_rc} --query oracle_home`"
  757. export ORACLE_HOME
  758. oracle_libdir="`%{l_rc} --query oracle_libdir`"
  759. case "$oracle_libdir" in
  760. */lib32 )
  761. %{l_shtool} subst \
  762. -e 's;OCI8_DIR/lib;OCI8_DIR/lib32;' \
  763. configure
  764. ;;
  765. esac
  766. %endif
  767. %if "%{with_mod_php_sendmail}" == "yes"
  768. PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
  769. %else
  770. PROG_SENDMAIL="`%{l_shtool} path false`" \
  771. %endif
  772. %if "%{with_mod_php_xslt}" == "yes"
  773. # as Sablotron is C++ explicit linkage against libstdc++ is required
  774. LIBS="$LIBS -lstdc++"
  775. %endif
  776. export PROG_SENDMAIL
  777. ./configure \
  778. --prefix=%{l_prefix} \
  779. --with-apache=../apache_%{V_apache} \
  780. --with-config-file-path=%{l_prefix}/etc/apache \
  781. %if "%{with_mod_php_mbregex}" == "yes"
  782. --enable-mbregex \
  783. %endif
  784. %if "%{with_mod_php_mbstring}" == "yes"
  785. --enable-mbstring \
  786. %endif
  787. %if "%{with_mod_php_suhosin}" == "yes"
  788. --enable-suhosin \
  789. %endif
  790. %if "%{with_mod_php_calendar}" == "yes"
  791. --enable-calendar \
  792. %endif
  793. %if "%{with_mod_php_mssql}" == "yes"
  794. --with-mssql=%{l_prefix} \
  795. %else
  796. --without-mssql \
  797. %endif
  798. %if "%{with_mod_php_mysql}" == "yes"
  799. --with-mysql=%{l_prefix} \
  800. %else
  801. --without-mysql \
  802. %endif
  803. %if "%{with_mod_php_pgsql}" == "yes"
  804. --with-pgsql=%{l_prefix} \
  805. %else
  806. --without-pgsql \
  807. %endif
  808. %if "%{with_mod_php_gd}" == "yes"
  809. --with-gd=%{l_prefix} \
  810. --with-jpeg-dir=%{l_prefix} \
  811. --with-png-dir=%{l_prefix} \
  812. %endif
  813. %if "%{with_mod_php_freetype}" == "yes"
  814. --enable-gd-imgstrttf \
  815. --enable-gd-native-ttf \
  816. --with-freetype-dir=%{l_prefix} \
  817. %endif
  818. %if "%{with_mod_php_t1lib}" == "yes"
  819. --with-t1lib=%{l_prefix} \
  820. %endif
  821. %if "%{with_mod_php_bdb}" == "yes"
  822. --with-db4=%{l_prefix} \
  823. %endif
  824. %if "%{with_mod_php_debug}" == "yes"
  825. --with-debug=yes \
  826. %else
  827. --with-debug=no \
  828. %endif
  829. %if "%{with_mod_php_zlib}" == "yes"
  830. --with-zlib=%{l_prefix} \
  831. --with-zlib-dir=%{l_prefix} \
  832. %endif
  833. %if "%{with_mod_php_bzip2}" == "yes"
  834. --with-bz2=%{l_prefix} \
  835. %endif
  836. %if "%{with_mod_php_pdflib}" == "yes"
  837. --with-pdflib=%{l_prefix} \
  838. --with-jpeg-dir=%{l_prefix} \
  839. --with-png-dir=%{l_prefix} \
  840. %endif
  841. %if "%{with_mod_php_ssl}" == "yes" || "%{with_mod_php_openldap}" == "yes"
  842. --with-openssl=%{l_prefix} \
  843. %endif
  844. %if "%{with_mod_php_openldap}" == "yes"
  845. --with-ldap=%{l_prefix} \
  846. %endif
  847. %if "%{with_mod_php_mm}" == "yes"
  848. --with-mm=%{l_prefix} \
  849. --enable-session \
  850. %endif
  851. %if "%{with_mod_php_pcre}" == "yes"
  852. --with-pcre=%{l_prefix} \
  853. %endif
  854. %if "%{with_mod_php_ftp}" == "yes"
  855. --enable-ftp \
  856. %endif
  857. %if "%{with_mod_php_java}" == "yes"
  858. --with-java=%{l_prefix}/libexec/j2se \
  859. %endif
  860. %if "%{with_mod_php_oci7}" == "yes"
  861. --with-oracle \
  862. %endif
  863. %if "%{with_mod_php_oci8}" == "yes"
  864. --with-oci8 \
  865. --enable-sigchld \
  866. %endif
  867. %if "%{with_mod_php_gettext}" == "yes"
  868. --with-gettext=%{l_prefix} \
  869. %endif
  870. %if "%{with_mod_php_imap}" == "yes"
  871. --with-imap=%{l_prefix} \
  872. --with-imap-ssl=%{l_prefix} \
  873. %endif
  874. %if "%{with_mod_php_xml}" == "yes"
  875. --enable-xml \
  876. --with-expat-dir=%{l_prefix} \
  877. %else
  878. --disable-xml \
  879. %endif
  880. %if "%{with_mod_php_dom}" == "yes"
  881. --with-dom=%{l_prefix} \
  882. --with-dom-xslt=%{l_prefix} \
  883. --with-dom-exslt=%{l_prefix} \
  884. %endif
  885. %if "%{with_mod_php_wddx}" == "yes"
  886. --enable-wddx \
  887. %endif
  888. %if "%{with_mod_php_bc}" == "yes"
  889. --enable-bcmath \
  890. %endif
  891. %if "%{with_mod_php_transsid}" == "yes"
  892. --enable-trans-sid \
  893. %endif
  894. %if "%{with_mod_php_mhash}" == "yes"
  895. --with-mhash=%{l_prefix} \
  896. %endif
  897. %if "%{with_mod_php_mcrypt}" == "yes"
  898. --with-mcrypt=%{l_prefix} \
  899. %endif
  900. %if "%{with_mod_php_curl}" == "yes"
  901. --with-curl=%{l_prefix} \
  902. %endif
  903. %if "%{with_mod_php_gdbm}" == "yes"
  904. --with-gdbm=%{l_prefix} \
  905. %endif
  906. %if "%{with_mod_php_versioning}" == "yes"
  907. --enable-versioning \
  908. %endif
  909. %if "%{with_mod_php_odbc}" == "yes"
  910. --with-unixODBC=%{l_prefix} \
  911. %endif
  912. %if "%{with_mod_php_snmp}" == "yes"
  913. --with-snmp=%{l_prefix} \
  914. %endif
  915. %if "%{with_mod_php_exif}" == "yes"
  916. --with-exif \
  917. %endif
  918. %if "%{with_mod_php_iconv}" == "yes"
  919. --with-iconv=%{l_prefix} \
  920. %endif
  921. %if "%{with_mod_php_crack}" == "yes"
  922. --with-crack=%{l_prefix} \
  923. %endif
  924. %if "%{with_mod_php_xslt}" == "yes"
  925. --enable-xslt \
  926. --with-xslt-sablot=%{l_prefix} \
  927. --with-expat-dir=%{l_prefix} \
  928. --with-iconv-dir=%{l_prefix} \
  929. %endif
  930. --disable-cli \
  931. --without-pear \
  932. --disable-shared \
  933. --enable-inline-optimization \
  934. --enable-track-vars
  935. %{l_make} %{l_mflags}
  936. %{l_make} %{l_mflags} install \
  937. INSTALL_ROOT=$RPM_BUILD_ROOT
  938. ) || exit $?
  939. %endif
  940. # optionally prepare mod_dav
  941. %if "%{with_mod_dav}" == "yes"
  942. ( cd mod_dav-%{V_mod_dav}
  943. CC="%{l_cc}" \
  944. %if "%{with_debug}" == "yes"
  945. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  946. CFLAGS="%{l_cflags} -g -DEAPI" \
  947. %else
  948. CFLAGS="%{l_cflags} -g" \
  949. %endif
  950. %else
  951. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  952. CFLAGS="%{l_cflags -O} -DEAPI" \
  953. %else
  954. CFLAGS="%{l_cflags -O}" \
  955. %endif
  956. %endif
  957. LDFLAGS="%{l_cflags -O}" \
  958. ./configure \
  959. --with-apache=../apache_%{V_apache} \
  960. --with-expat=%{l_prefix}
  961. %{l_make} %{l_mflags}
  962. %{l_make} %{l_mflags} install
  963. ) || exit $?
  964. %endif
  965. # optionally prepare mod_layout
  966. %if "%{with_mod_layout}" == "yes"
  967. ( cd mod_layout-%{V_mod_layout}
  968. mkdir ../apache_%{V_apache}/src/modules/layout
  969. cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
  970. chmod -R u+w ../apache_%{V_apache}/src/modules/layout
  971. ) || exit $?
  972. %endif
  973. # optionally prepare mod_macro
  974. %if "%{with_mod_macro}" == "yes"
  975. ( cd mod_macro-%{V_mod_macro}
  976. cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
  977. ) || exit $?
  978. %endif
  979. # optionally prepare mod_auth_pam
  980. %if "%{with_mod_auth_pam}" == "yes"
  981. ( cd mod_auth_pam-%{V_mod_auth_pam}
  982. sed -e '234N;s/\n//' -e '239N;s/\n//' <mod_auth_pam.c \
  983. >../apache_%{V_apache}/src/modules/extra/mod_auth_pam.c
  984. ) || exit $?
  985. %endif
  986. # optionally prepare mod_auth_ldap
  987. %if "%{with_mod_auth_ldap}" == "yes"
  988. ( cd mod_auth_ldap
  989. cp mod_auth_ldap.c ../apache_%{V_apache}/src/modules/extra/
  990. ) || exit $?
  991. %endif
  992. # optionally prepare mod_auth_radius
  993. %if "%{with_mod_auth_radius}" == "yes"
  994. ( cd mod_auth_radius-%{V_mod_auth_radius}
  995. sed -e 's;#endif DEBUG_RADIUS;#endif;' \
  996. <mod_auth_radius.c \
  997. >../apache_%{V_apache}/src/modules/extra/mod_auth_radius.c
  998. ) || exit $?
  999. %endif
  1000. # optionally prepare mod_auth_mysql
  1001. %if "%{with_mod_auth_mysql}" == "yes"
  1002. %{l_shtool} install -c -m 644 \
  1003. -e 's;^[ ]*MYSQL_LIB=.*$;;' \
  1004. mod_auth_mysql-%{V_mod_auth_mysql}/mod_auth_mysql.c \
  1005. apache_%{V_apache}/src/modules/extra/
  1006. %endif
  1007. # optionally prepare mod_gzip
  1008. %if "%{with_mod_gzip}" == "yes"
  1009. ( cd mod_gzip-%{V_mod_gzip}
  1010. mkdir ../apache_%{V_apache}/src/modules/gzip
  1011. cp -rp * ../apache_%{V_apache}/src/modules/gzip/
  1012. ) || exit $?
  1013. %endif
  1014. # optionally prepare mod_fastcgi
  1015. %if "%{with_mod_fastcgi}" == "yes"
  1016. ( cd mod_fastcgi-%{V_mod_fastcgi}
  1017. mkdir ../apache_%{V_apache}/src/modules/fastcgi
  1018. cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
  1019. ) || exit $?
  1020. %endif
  1021. # optionally prepare mod_throttle
  1022. %if "%{with_mod_throttle}" == "yes"
  1023. ( cd mod_throttle-*
  1024. cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
  1025. ) || exit $?
  1026. %endif
  1027. # optionally prepare mod_access_referer
  1028. %if "%{with_mod_access_referer}" == "yes"
  1029. ( cd mod_access_referer-%{V_mod_access_referer}
  1030. cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
  1031. ) || exit $?
  1032. %endif
  1033. # optionally prepare mod_roaming
  1034. %if "%{with_mod_roaming}" == "yes"
  1035. ( cd mod_roaming-%{V_mod_roaming}
  1036. cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
  1037. ) || exit $?
  1038. %endif
  1039. # optionally prepare mod_owa
  1040. %if "%{with_mod_owa}" == "yes"
  1041. ( cd modowa
  1042. mkdir ../apache_%{V_apache}/src/modules/owa/
  1043. cp src/*.{c,h} src/Makefile.{libdir,tmpl} \
  1044. ../apache_%{V_apache}/src/modules/owa/
  1045. ) || exit $?
  1046. %endif
  1047. # optionally prepare mod_relocate
  1048. %if "%{with_mod_relocate}" == "yes"
  1049. ( cd mod_relocate-%{V_mod_relocate}
  1050. cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
  1051. ) || exit $?
  1052. %endif
  1053. # optionally prepare mod_define (if mod_ssl is disabled only)
  1054. %if "%{with_mod_define}" == "yes" && "%{with_mod_ssl}" != "yes"
  1055. ( cd mod_ssl-%{V_mod_ssl}/pkg.addon
  1056. cp mod_define.c ../../apache_%{V_apache}/src/modules/extra/
  1057. ) || exit $?
  1058. %endif
  1059. # optionally prepare mod_suphp
  1060. %if "%{with_suphp}" == "yes"
  1061. ( cd suphp-%{V_suphp}
  1062. cp src/apache/mod_suphp.c ../apache_%{V_apache}/src/modules/extra/
  1063. chmod +rx configure
  1064. CC="%{l_cc}" \
  1065. CFLAGS="%{l_cflags -O}" \
  1066. AUTOCONF="true" \
  1067. AUTOHEADER="true" \
  1068. AUTOMAKE="true" \
  1069. ACLOCAL="true" \
  1070. ./configure \
  1071. --prefix=%{l_prefix} \
  1072. --sysconfdir=%{l_prefix}/etc/apache \
  1073. --with-apxs="" \
  1074. --with-apache-user=%{with_suphp_caller} \
  1075. --with-php=%{with_suphp_phpcgi} \
  1076. --with-logfile=%{l_prefix}/var/apache/log/suphp.log \
  1077. %if "%{with_suphp_ugid_check}" == "no"
  1078. --disable-checkuid \
  1079. --disable-checkgid \
  1080. %endif
  1081. --with-setid-mode=%{with_suphp_ugid_mode} \
  1082. --disable-shared
  1083. %{l_make} %{l_mflags -O}
  1084. ) || exit $?
  1085. %endif
  1086. # optionally prepare mod_security
  1087. %if "%{with_mod_security}" == "yes"
  1088. ( cd modsecurity-apache_%{V_mod_security}/apache1
  1089. cp mod_security.c ../../apache_%{V_apache}/src/modules/extra/
  1090. ) || exit $?
  1091. %endif
  1092. # optionally prepare mod_evasive
  1093. %if "%{with_mod_evasive}" == "yes"
  1094. ( cd mod_evasive
  1095. cp mod_evasive.c ../apache_%{V_apache}/src/modules/extra/
  1096. ) || exit $?
  1097. %endif
  1098. # optionally prepare mod_auth_kerb
  1099. %if "%{with_mod_auth_kerb}" == "yes"
  1100. ( cd mod_auth_kerb-*
  1101. CC="%{l_cc}" \
  1102. CFLAGS="%{l_cflags}" \
  1103. ./configure \
  1104. --with-krb5=%{l_prefix} \
  1105. --with-krb4=no \
  1106. --with-apache=../apache_%{V_apache}
  1107. ) || exit $?
  1108. mv mod_auth_kerb-* apache_%{V_apache}/src/modules/mod_auth_kerb
  1109. %endif
  1110. # configure Apache
  1111. ( cd apache_%{V_apache}
  1112. %if "%{with_debug}" == "yes"
  1113. cflags="%{l_cflags} -g"
  1114. %else
  1115. cflags="%{l_cflags -O}"
  1116. %endif
  1117. ldflags=""
  1118. libs=""
  1119. %if "%{with_mod_auth_pam}" == "yes"
  1120. pam_incdir=`%{l_rc} --query pam_incdir`
  1121. if [ ".$pam_incdir" != "./usr/include" -a ".$pam_incdir" != "./include" ]; then
  1122. cflags="$cflags -I$pam_incdir"
  1123. fi
  1124. pam_libdir=`%{l_rc} --query pam_libdir`
  1125. if [ ".$pam_libdir" != "./usr/lib" -a ".$pam_libdir" != "./lib" ]; then
  1126. ldflags="$ldflags -L$pam_libdir"
  1127. fi
  1128. libs="$libs -lpam"
  1129. %endif
  1130. %if "%{with_mod_auth_ldap}" == "yes"
  1131. cflags="$cflags %{l_cppflags}"
  1132. ldflags="$ldflags %{l_ldflags}"
  1133. libs="$libs -lldap -llber -lssl -lcrypto"
  1134. case "%{l_platform -t}" in
  1135. *-sunos* )
  1136. libs="$libs -lresolv"
  1137. ;;
  1138. esac
  1139. %endif
  1140. %if "%{with_mod_auth_mysql}" == "yes"
  1141. cflags="$cflags -DAPACHE1 `mysql_config --cflags`"
  1142. libs="$libs `mysql_config --libs`"
  1143. %endif
  1144. %if "%{with_mod_owa}" == "yes"
  1145. cflags="$cflags `%{l_rc} --query oracle_cflags`"
  1146. ldflags="$ldflags `%{l_rc} --query oracle_ldflags`"
  1147. libs="$libs `%{l_rc} --query oracle_libs`"
  1148. %endif
  1149. %if "%{with_gdbm_ndbm}" == "yes"
  1150. cflags="$cflags %{l_cppflags}"
  1151. ldflags="$ldflags %{l_ldflags}"
  1152. libs="$libs -lndbm -lgdbm"
  1153. %endif
  1154. %if "%{with_mod_php_oci7}" == "yes" || "%{with_mod_php_oci8}" == "yes"
  1155. # workaround Oracle inter-library depencency by explicitly
  1156. # linking in all libraries
  1157. ldflags="$ldflags `%{l_rc} --query oracle_ldflags`"
  1158. libs="$libs `%{l_rc} --query oracle_libs`"
  1159. %endif
  1160. %if "%{with_mod_php}" == "yes" && "%{with_mod_php_imap}" == "yes"
  1161. libs="$libs -limap -lmodphp4 -limap"
  1162. %endif
  1163. %if "%{with_suphp}" == "yes"
  1164. cflags="$cflags -DSUPHP_PATH_TO_SUPHP='\"%{l_prefix}/sbin/suphp\"'"
  1165. # ugly hack to extract flags required for certain modes of
  1166. # operation of suPHP
  1167. cflags="$cflags \
  1168. `sed -n -e 's;^OPT_APACHEMOD_USERGROUP_DEF[ ]=\(.*\)$;\1;p' \
  1169. ../suphp-%{V_suphp}/src/apache/Makefile`"
  1170. %endif
  1171. CC="%{l_cc}" \
  1172. CFLAGS="$cflags" \
  1173. LDFLAGS="$ldflags" \
  1174. LIBS="$libs" \
  1175. LD_SHLIB="%{l_cc}" \
  1176. %if "%{with_mod_ssl}" == "yes"
  1177. EAPI_MM="%{l_prefix}" \
  1178. SSL_BASE="%{l_prefix}" \
  1179. %endif
  1180. ./configure \
  1181. --target=apache \
  1182. --with-layout=GNU \
  1183. --prefix=%{l_prefix} \
  1184. --sbindir=%{l_prefix}/sbin \
  1185. --sysconfdir=%{l_prefix}/etc/apache \
  1186. --libexecdir=%{l_prefix}/lib/apache \
  1187. --datadir=%{l_prefix}/share/apache \
  1188. --localstatedir=%{l_prefix}/var/apache \
  1189. %if "%{with_debug}" == "yes"
  1190. --without-execstrip \
  1191. %endif
  1192. %if "%{with_suexec}" == "yes"
  1193. --enable-suexec \
  1194. --suexec-caller=%{with_suexec_caller} \
  1195. --suexec-userdir=%{with_suexec_userdir} \
  1196. --suexec-logfile=%{l_prefix}/var/apache/log/suexec.log \
  1197. %endif
  1198. --enable-module=most \
  1199. --with-perl=%{l_prefix}/bin/perl \
  1200. %if "%{with_mod_ssl}" == "yes" || "%{with_mod_define}" == "yes"
  1201. --enable-rule=EAPI \
  1202. %if "%{with_mod_ssl}" == "yes"
  1203. --enable-module=ssl \
  1204. %endif
  1205. %if "%{with_mod_define}" == "yes" && "%{with_mod_ssl}" != "yes"
  1206. --activate-module=src/modules/extra/mod_define.o \
  1207. %endif
  1208. %endif
  1209. %if "%{with_mod_perl}" == "yes"
  1210. --activate-module=src/modules/perl/libperl.a \
  1211. %endif
  1212. %if "%{with_mod_php}" == "yes"
  1213. --activate-module=src/modules/php4/libphp4.a \
  1214. %endif
  1215. %if "%{with_mod_dav}" == "yes"
  1216. --activate-module=src/modules/dav/libdav.a \
  1217. %endif
  1218. --disable-rule=EXPAT \
  1219. %if "%{with_shared_core}" == "yes"
  1220. --enable-rule=SHARED_CORE \
  1221. %endif
  1222. %if "%{with_shared_chain}" == "yes"
  1223. --enable-rule=SHARED_CHAIN \
  1224. %endif
  1225. %if "%{with_mod_layout}" == "yes"
  1226. --activate-module=src/modules/layout/liblayout.a \
  1227. %endif
  1228. %if "%{with_mod_macro}" == "yes"
  1229. --activate-module=src/modules/extra/mod_macro.o \
  1230. %endif
  1231. %if "%{with_mod_auth_pam}" == "yes"
  1232. --activate-module=src/modules/extra/mod_auth_pam.o \
  1233. %endif
  1234. %if "%{with_mod_auth_ldap}" == "yes"
  1235. --activate-module=src/modules/extra/mod_auth_ldap.o \
  1236. %endif
  1237. %if "%{with_mod_auth_radius}" == "yes"
  1238. --activate-module=src/modules/extra/mod_auth_radius.c \
  1239. %endif
  1240. %if "%{with_mod_auth_mysql}" == "yes"
  1241. --activate-module=src/modules/extra/mod_auth_mysql.o \
  1242. %endif
  1243. %if "%{with_mod_gzip}" == "yes"
  1244. --activate-module=src/modules/gzip/libgzip.a \
  1245. %endif
  1246. %if "%{with_mod_fastcgi}" == "yes"
  1247. --activate-module=src/modules/fastcgi/libfastcgi.a \
  1248. %endif
  1249. %if "%{with_mod_throttle}" == "yes"
  1250. --activate-module=src/modules/extra/mod_throttle.o \
  1251. %endif
  1252. %if "%{with_mod_access_referer}" == "yes"
  1253. --activate-module=src/modules/extra/mod_access_referer.o \
  1254. %endif
  1255. %if "%{with_mod_owa}" == "yes"
  1256. --activate-module=src/modules/owa/libowa.a \
  1257. %endif
  1258. %if "%{with_mod_roaming}" == "yes"
  1259. --activate-module=src/modules/extra/mod_roaming.o \
  1260. %endif
  1261. %if "%{with_mod_relocate}" == "yes"
  1262. --activate-module=src/modules/extra/mod_relocate.o \
  1263. %endif
  1264. %if "%{with_suphp}" == "yes"
  1265. --activate-module=src/modules/extra/mod_suphp.o \
  1266. %endif
  1267. %if "%{with_mod_security}" == "yes"
  1268. --activate-module=src/modules/extra/mod_security.o \
  1269. %endif
  1270. %if "%{with_mod_evasive}" == "yes"
  1271. --activate-module=src/modules/extra/mod_evasive.o \
  1272. %endif
  1273. %if "%{with_mod_auth_kerb}" == "yes"
  1274. --activate-module=src/modules/mod_auth_kerb/libmod_auth_kerb.a \
  1275. %endif
  1276. --enable-module=so
  1277. %{l_make} %{l_mflags -O} build-quiet
  1278. ) || exit $?
  1279. %install
  1280. # install Apache
  1281. ( cd apache_%{V_apache}
  1282. # perform standard Apache installation procedure
  1283. %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
  1284. # post-adjustments to installation tree
  1285. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
  1286. $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
  1287. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
  1288. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/README*
  1289. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/*.default
  1290. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/srm.conf
  1291. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/access.conf
  1292. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.en \
  1293. $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html
  1294. rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.*
  1295. chmod a+rx $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin/*
  1296. mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin \
  1297. $RPM_BUILD_ROOT%{l_prefix}/cgi/
  1298. rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
  1299. ) || exit $?
  1300. # install shell environment script
  1301. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  1302. -e 's;@l_path@;%{l_build_path};' \
  1303. -e 's;@l_ld_library_path@;%{l_build_ldlp};' \
  1304. %{SOURCE apache.sh} \
  1305. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  1306. %if "%{with_mod_fastcgi}" == "yes"
  1307. # provide mod_fastcgi IPC directory
  1308. %{l_shtool} mkdir -f -p -m 755 \
  1309. $RPM_BUILD_ROOT%{l_prefix}/var/apache/fastcgi
  1310. %endif
  1311. %if "%{with_mod_perl}" == "yes"
  1312. # cleanup for mod_perl
  1313. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
  1314. # provide mod_perl init script
  1315. %{l_shtool} install -c -m 644 \
  1316. %{SOURCE apache.pl} \
  1317. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  1318. %endif
  1319. # optionally make PHP happy
  1320. %if "%{with_mod_php}" == "yes"
  1321. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  1322. %{SOURCE php.ini} $RPM_BUILD_ROOT%{l_prefix}/etc/apache/php.ini
  1323. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/php
  1324. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/php/build
  1325. rmdir $RPM_BUILD_ROOT%{l_prefix}/lib/php >/dev/null 2>&1 || true
  1326. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/{php-config,phpextdist,phpize}
  1327. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/{php-config,phpize}.1
  1328. %endif
  1329. # optionally install suPHP wrapper binary
  1330. %if "%{with_suphp}" == "yes"
  1331. ( cd suphp-%{V_suphp}
  1332. %{l_shtool} install -c -s -m 711 \
  1333. src/suphp $RPM_BUILD_ROOT%{l_prefix}/sbin/
  1334. %{l_shtool} install -c -m 644 \
  1335. -e 's;^\(logfile=\).*;\1%{l_prefix}/var/apache/log/suphp.log;' \
  1336. -e 's;^\(webserver_user=\).*;\1%{with_suphp_caller};' \
  1337. -e 's;/usr/bin/php;%{with_suphp_phpcgi};' \
  1338. doc/suphp.conf-example \
  1339. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/suphp.conf
  1340. ) || exit $?
  1341. %endif
  1342. # create default configuration
  1343. l_hostname=`%{l_shtool} echo -e %h`
  1344. l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
  1345. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  1346. -e "s;@l_hostname@;$l_hostname;g" \
  1347. -e "s;@l_domainname@;$l_domainname;g" \
  1348. %{SOURCE apache.base} \
  1349. %{SOURCE apache.conf} \
  1350. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  1351. mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
  1352. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  1353. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
  1354. # create run-command script
  1355. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  1356. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  1357. %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  1358. # strip installation binaries
  1359. %if "%{with_debug}" != "yes"
  1360. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  1361. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true
  1362. %endif
  1363. # determine installation tree files
  1364. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  1365. %{l_files_std} \
  1366. %if "%{with_suexec}" == "yes"
  1367. '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suexec' \
  1368. %endif
  1369. %if "%{with_suphp}" == "yes"
  1370. '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/suphp' \
  1371. %endif
  1372. '%config %{l_prefix}/etc/apache/*' \
  1373. %if "%{with_mod_ssl}" == "yes"
  1374. '%config %{l_prefix}/etc/apache/ssl.crl/*.crl' \
  1375. '%config %{l_prefix}/etc/apache/ssl.crt/*.crt' \
  1376. '%config %{l_prefix}/etc/apache/ssl.csr/*.csr' \
  1377. '%config %{l_prefix}/etc/apache/ssl.key/*.key' \
  1378. '%config %{l_prefix}/etc/apache/ssl.prm/*.prm' \
  1379. %endif
  1380. %if "%{with_mod_fastcgi}" == "yes"
  1381. '%attr(750,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/apache/fastcgi' \
  1382. %endif
  1383. '%config %attr(444,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/apache/apache.base'
  1384. %files -f files
  1385. %clean
  1386. rm -rf $RPM_BUILD_ROOT
  1387. %post
  1388. %if "%{with_mod_auth_pam}" == "yes"
  1389. # add PAM configuration entry
  1390. if [ $1 -eq 1 ]; then
  1391. $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=apache
  1392. fi
  1393. %endif
  1394. # after upgrade, restart service
  1395. [ $1 -eq 2 ] || exit 0
  1396. eval `%{l_rc} apache status 2>/dev/null`
  1397. [ ".$apache_active" = .yes ] && %{l_rc} apache restart
  1398. exit 0
  1399. %preun
  1400. # before erase, stop service and remove log files
  1401. [ $1 -eq 0 ] || exit 0
  1402. %{l_rc} apache stop 2>/dev/null
  1403. rm -rf $RPM_INSTALL_PREFIX/var/apache/log/ >/dev/null 2>&1 || true
  1404. %if "%{with_mod_auth_pam}" == "yes"
  1405. # remove PAM configuration entry
  1406. $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=apache
  1407. %endif
  1408. exit 0