apache-php.spec 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. ##
  2. ## apache-php.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package versions
  24. %define V_php 5.2.6
  25. %define V_php_suhosin_p 5.2.6-0.9.6.2
  26. %define V_php_suhosin_e 0.9.24
  27. %define V_php_kolab 5.2.6
  28. %define V_php_pecl_memcache 2.2.3
  29. # package information
  30. Name: apache-php
  31. Summary: Apache Extension: PHP Scripting Language
  32. URL: http://www.php.net/
  33. Vendor: The PHP Project
  34. Packager: OpenPKG Foundation e.V.
  35. Distribution: OpenPKG Community
  36. Class: BASE
  37. Group: Web
  38. License: PHP
  39. Version: %{V_php}
  40. Release: 20080511
  41. # package options
  42. %option with_suhosin no
  43. %option with_bc no
  44. %option with_bdb no
  45. %option with_bzip2 no
  46. %option with_calendar no
  47. %option with_ctype no
  48. %option with_curl no
  49. %option with_debug no
  50. %option with_dom no
  51. %option with_exif no
  52. %option with_fastcgi no
  53. %option with_freetype no
  54. %option with_ftp no
  55. %option with_gd no
  56. %option with_gdbm no
  57. %option with_gettext no
  58. %option with_iconv no
  59. %option with_imap no
  60. %option with_imap_annotate no
  61. %option with_json no
  62. %option with_mbregex no
  63. %option with_mbstring no
  64. %option with_mcrypt no
  65. %option with_mhash no
  66. %option with_mm no
  67. %option with_mysql no
  68. %option with_oci8 no
  69. %option with_odbc no
  70. %option with_openldap no
  71. %option with_openldapsasl no
  72. %option with_pcre no
  73. %option with_pear no
  74. %option with_pgsql no
  75. %option with_posix no
  76. %option with_sendmail no
  77. %option with_session no
  78. %option with_simplexml no
  79. %option with_snmp no
  80. %option with_sqlite no
  81. %option with_ssl no
  82. %option with_tidy no
  83. %option with_versioning no
  84. %option with_wddx no
  85. %option with_xml no
  86. %option with_xslt no
  87. %option with_zlib no
  88. %option with_pecl_memcache no
  89. # fixing implicit extension dependencies and correlations
  90. %if "%{with_mm}" == "yes" || "%{with_pecl_memcache}" == "yes"
  91. %undefine with_session
  92. %define with_session yes
  93. %endif
  94. %if "%{with_pear}" == "yes"
  95. %undefine with_xml
  96. %define with_xml yes
  97. %undefine with_pcre
  98. %define with_pcre yes
  99. %endif
  100. %if "%{with_freetype}" == "yes"
  101. %undefine with_gd
  102. %define with_gd yes
  103. %endif
  104. %if "%{with_imap_annotate}" == "yes"
  105. %undefine with_imap
  106. %define with_imap yes
  107. %endif
  108. %if "%{with_mysql}" == "yes" || "%{with_gd}" == "yes" || "%{with_dom}" == "yes" || "%{with_pecl_memcache}" == "yes"
  109. %undefine with_zlib
  110. %define with_zlib yes
  111. %endif
  112. %if "%{with_xslt}" == "yes"
  113. %undefine with_dom
  114. %define with_dom yes
  115. %endif
  116. %if "%{with_dom}" == "yes"
  117. %undefine with_xml
  118. %define with_xml yes
  119. %endif
  120. %if "%{with_pgsql}" == "yes"
  121. %undefine with_ssl
  122. %define with_ssl yes
  123. %endif
  124. # list of sources
  125. Source0: http://static.php.net/www.php.net/distributions/php-%{V_php}.tar.bz2
  126. Source1: http://download.suhosin.org/suhosin-%{V_php_suhosin_e}.tgz
  127. Source2: apache-php.ini
  128. Source3: apache-php.conf
  129. Source4: http://pecl.php.net/get/memcache-%{V_php_pecl_memcache}.tgz
  130. Patch0: http://download.suhosin.org/suhosin-patch-%{V_php_suhosin_p}.patch.gz
  131. Patch1: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/php/php-%{V_php_kolab}/KOLAB_Annotations.patch
  132. # build information
  133. Prefix: %{l_prefix}
  134. BuildRoot: %{l_buildroot}
  135. BuildPreReq: OpenPKG, openpkg >= 20050615, gcc, flex, bison
  136. PreReq: OpenPKG, openpkg >= 20050615
  137. BuildPreReq: apache
  138. PreReq: apache
  139. %if "%{with_suhosin}" == "yes" || "%{with_pecl_memcache}" == "yes"
  140. BuildPreReq: autoconf
  141. %endif
  142. %if "%{with_sqlite}" == "yes"
  143. BuildPreReq: sqlite
  144. PreReq: sqlite
  145. %endif
  146. %if "%{with_mysql}" == "yes"
  147. BuildPreReq: mysql
  148. PreReq: mysql
  149. %endif
  150. %if "%{with_pgsql}" == "yes"
  151. BuildPreReq: postgresql
  152. PreReq: postgresql
  153. %endif
  154. %if "%{with_gd}" == "yes"
  155. BuildPreReq: gd >= 2.0.20, jpeg, png
  156. PreReq: gd >= 2.0.20, jpeg, png
  157. %endif
  158. %if "%{with_bdb}" == "yes"
  159. BuildPreReq: db
  160. PreReq: db
  161. %endif
  162. %if "%{with_zlib}" == "yes"
  163. BuildPreReq: zlib
  164. PreReq: zlib
  165. %endif
  166. %if "%{with_bzip2}" == "yes"
  167. BuildPreReq: bzip2
  168. PreReq: bzip2
  169. %endif
  170. %if "%{with_ssl}" == "yes"
  171. BuildPreReq: openssl
  172. PreReq: openssl
  173. %endif
  174. %if "%{with_openldap}" == "yes"
  175. BuildPreReq: openldap
  176. PreReq: openldap
  177. %if "%{with_openldapsasl}" == "yes"
  178. BuildPreReq: openldap::with_sasl = yes
  179. PreReq: openldap::with_sasl = yes
  180. %else
  181. BuildPreReq: openldap::with_sasl = no
  182. PreReq: openldap::with_sasl = no
  183. %endif
  184. %endif
  185. %if "%{with_mm}" == "yes"
  186. BuildPreReq: mm
  187. PreReq: mm
  188. %endif
  189. %if "%{with_pcre}" == "yes"
  190. BuildPreReq: pcre
  191. PreReq: pcre
  192. %endif
  193. %if "%{with_freetype}" == "yes"
  194. BuildPreReq: freetype
  195. PreReq: freetype
  196. %endif
  197. %if "%{with_gettext}" == "yes"
  198. BuildPreReq: gettext, libiconv
  199. PreReq: gettext, libiconv
  200. %endif
  201. %if "%{with_iconv}" == "yes"
  202. BuildPreReq: libiconv
  203. PreReq: libiconv
  204. %endif
  205. %if "%{with_imap}" == "yes"
  206. BuildPreReq: imap, openssl
  207. PreReq: imap, openssl
  208. %if "%{with_imap_annotate}" == "yes"
  209. BuildPreReq: imap::with_annotate = yes
  210. PreReq: imap::with_annotate = yes
  211. %endif
  212. %endif
  213. %if "%{with_xml}" == "yes"
  214. BuildPreReq: libxml
  215. PreReq: libxml
  216. %endif
  217. %if "%{with_xslt}" == "yes"
  218. BuildPreReq: libxslt
  219. PreReq: libxslt
  220. %endif
  221. %if "%{with_dom}" == "yes"
  222. BuildPreReq: libxml, libxslt
  223. PreReq: libxml, libxslt
  224. %endif
  225. %if "%{with_curl}" == "yes"
  226. BuildPreReq: curl
  227. PreReq: curl
  228. %endif
  229. %if "%{with_mhash}" == "yes"
  230. BuildPreReq: mhash
  231. PreReq: mhash
  232. %endif
  233. %if "%{with_mcrypt}" == "yes"
  234. BuildPreReq: libmcrypt
  235. PreReq: libmcrypt
  236. %endif
  237. %if "%{with_gdbm}" == "yes"
  238. BuildPreReq: gdbm, gdbm::with_ndbm = yes
  239. PreReq: gdbm, gdbm::with_ndbm = yes
  240. %endif
  241. %if "%{with_oci8}" == "yes"
  242. BuildPreReq: oracle
  243. PreReq: oracle
  244. %endif
  245. %if "%{with_snmp}" == "yes"
  246. BuildPreReq: snmp
  247. PreReq: snmp
  248. %endif
  249. %if "%{with_odbc}" == "yes"
  250. BuildPreReq: unixodbc
  251. PreReq: unixodbc
  252. %endif
  253. %if "%{with_sendmail}" == "yes"
  254. BuildPreReq: MTA
  255. PreReq: MTA
  256. %endif
  257. %if "%{with_simplexml}" == "yes"
  258. BuildPreReq: libxml
  259. PreReq: libxml
  260. %endif
  261. %if "%{with_tidy}" == "yes"
  262. BuildPreReq: tidy
  263. PreReq: tidy
  264. %endif
  265. %if "%{with_pecl_memcache}" == "yes"
  266. BuildPreReq: memcached
  267. PreReq: memcached
  268. %endif
  269. AutoReq: no
  270. AutoReqProv: no
  271. %description
  272. PHP is an HTML-embedded scripting language. Much of its syntax is
  273. borrowed from C, Java and Perl with a couple of unique PHP-specific
  274. features thrown in. The goal of the language is to allow web
  275. developers to write dynamically generated pages quickly.
  276. This package provides a Dynamic Shared Object (DSO) for the Apache
  277. HTTP 2.2 web server. In general speaking, this module is also known
  278. as mod_php.
  279. %track
  280. prog apache-php = {
  281. version = %{V_php}
  282. url = http://www.php.net/downloads.php
  283. regex = php-(5\.\d+\.\d+)\.tar\.(bz2|gz)
  284. }
  285. prog apache-php:suhosin-patch = {
  286. version = %{V_php_suhosin_p}
  287. url = http://www.hardened-php.net/suhosin/download.html
  288. regex = suhosin-patch-(5\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
  289. }
  290. prog apache-php:suhosin-ext = {
  291. version = %{V_php_suhosin_e}
  292. url = http://www.hardened-php.net/suhosin/download.html
  293. regex = suhosin-(\d+(\.\d+)+)\.tgz
  294. }
  295. prog apache-php:kolab = {
  296. version = %{V_php_kolab}
  297. url = http://kolab.org/cgi-bin/viewcvs-kolab.cgi/*checkout*/server/patches/php/
  298. regex = php-(\d+(\.\d+)+)/
  299. }
  300. prog apache-php:pecl_memcache = {
  301. version = %{V_php_pecl_memcache}
  302. url = http://pecl.php.net/package/memcache/
  303. regex = memcache-(2(\.\d+)+)\.tgz
  304. }
  305. %prep
  306. %setup -q -n php-%{V_php}
  307. %if "%{with_suhosin}" == "yes"
  308. %setup -q -n php-%{V_php} -T -D -a 1
  309. %patch -p1
  310. mv suhosin-%{V_php_suhosin_e} ext/suhosin
  311. rm -f package.xml
  312. %endif
  313. %if "%{with_pecl_memcache}" == "yes"
  314. %setup -q -n php-%{V_php} -T -D -a 4
  315. mv memcache-%{V_php_pecl_memcache} ext/memcache
  316. %endif
  317. %if "%{with_suhosin}" == "yes" || "%{with_pecl_memcache}" == "yes"
  318. # in case we add extensions the configure script needs to be newly
  319. # generated
  320. export PHP_AUTOCONF="autoconf-213"
  321. rm -f configure && ./buildconf --copy --force
  322. $PHP_AUTOCONF
  323. %endif
  324. %{l_shtool} subst \
  325. -e 's;-i -a -n php5;-i -n php5;' \
  326. configure
  327. %{l_shtool} subst \
  328. -e 's;\(/include\)/freetype2;\1;' \
  329. configure \
  330. ext/gd/config.m4
  331. %if "%{with_imap_annotate}" == "yes"
  332. sed <%{PATCH1} -e '/php-5.2.1\/ext\/imap\/php_imap.c.orig/,/^[^\+]/d' | %{l_patch} -p1
  333. %endif
  334. %build
  335. # configure package
  336. case "%{l_platform -t}" in
  337. *-sunos5.10 ) cflags="%{l_cflags}" ;;
  338. * ) cflags="%{l_cflags -O}" ;;
  339. esac
  340. cppflags="%{l_cppflags}"
  341. ldflags="%{l_ldflags}"
  342. libs=""
  343. %if "%{with_gdbm}" == "yes"
  344. libs="$libs -lndbm -lgdbm"
  345. %endif
  346. %if "%{with_gd}" == "yes"
  347. libs="$libs -lpng -lz"
  348. %endif
  349. %if "%{with_gettext}" == "yes"
  350. libs="$libs -liconv"
  351. %endif
  352. %if "%{with_openldap}" == "yes" && "%{with_openldapsasl}" == "yes"
  353. libs="$libs -lsasl2"
  354. %endif
  355. %if "%{with_imap}" == "yes"
  356. libs="$libs -lssl -lcrypto"
  357. %endif
  358. %if "%{with_bdb}" == "yes"
  359. libs="$libs -ldb"
  360. %endif
  361. %if "%{with_pgsql}" == "yes"
  362. libs="$libs `pg_config --libs`"
  363. %endif
  364. %if "%{with_oci8}" == "yes"
  365. ORACLE_HOME="`%{l_rc} --query oracle_home`"
  366. export ORACLE_HOME
  367. %endif
  368. CC="%{l_cc}" \
  369. CFLAGS="$cflags" \
  370. CPPFLAGS="$cppflags" \
  371. LDFLAGS="$ldflags" \
  372. LIBS="$libs" \
  373. %if "%{with_sendmail}" == "yes"
  374. PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
  375. %else
  376. PROG_SENDMAIL="`%{l_shtool} path false`" \
  377. %endif
  378. ./configure \
  379. --prefix=%{l_prefix} \
  380. --sysconfdir=%{l_prefix}/etc/apache \
  381. --with-config-file-path=%{l_prefix}/etc/apache \
  382. --libdir=%{l_prefix}/lib/php \
  383. --disable-all \
  384. --enable-pdo \
  385. %if "%{with_suhosin}" == "yes"
  386. --enable-suhosin \
  387. %endif
  388. %if "%{with_calendar}" == "yes"
  389. --enable-calendar \
  390. %endif
  391. --without-sqlite \
  392. %if "%{with_sqlite}" == "yes"
  393. --with-pdo-sqlite=%{l_prefix} \
  394. %else
  395. --without-pdo-sqlite \
  396. %endif
  397. %if "%{with_mysql}" == "yes"
  398. --with-mysql=%{l_prefix} \
  399. --with-pdo-mysql=%{l_prefix} \
  400. %else
  401. --without-mysql \
  402. %endif
  403. %if "%{with_pgsql}" == "yes"
  404. --with-pgsql=%{l_prefix} \
  405. --with-pdo-pgsql=%{l_prefix} \
  406. %else
  407. --without-pgsql \
  408. %endif
  409. %if "%{with_posix}" == "yes"
  410. --enable-posix \
  411. %endif
  412. %if "%{with_gd}" == "yes"
  413. --with-gd=%{l_prefix} \
  414. --with-jpeg-dir=%{l_prefix} \
  415. --with-png-dir=%{l_prefix} \
  416. %endif
  417. %if "%{with_fastcgi}" == "yes"
  418. --enable-fastcgi \
  419. %else
  420. --disable-fastcgi \
  421. %endif
  422. %if "%{with_freetype}" == "yes"
  423. --enable-gd-native-ttf \
  424. --with-freetype-dir=%{l_prefix} \
  425. %endif
  426. %if "%{with_bdb}" == "yes"
  427. --with-db4=%{l_prefix} \
  428. %endif
  429. %if "%{with_debug}" == "yes"
  430. --enable-debug \
  431. %else
  432. --disable-debug \
  433. %endif
  434. %if "%{with_zlib}" == "yes"
  435. --with-zlib=%{l_prefix} \
  436. --with-zlib-dir=%{l_prefix} \
  437. %endif
  438. %if "%{with_bzip2}" == "yes"
  439. --with-bz2=%{l_prefix} \
  440. %endif
  441. %if "%{with_ssl}" == "yes" || "%{with_openldap}" == "yes"
  442. --with-openssl=%{l_prefix} \
  443. %endif
  444. %if "%{with_openldap}" == "yes"
  445. --with-ldap=%{l_prefix} \
  446. %endif
  447. %if "%{with_session}" == "yes"
  448. --enable-session \
  449. %endif
  450. %if "%{with_mm}" == "yes"
  451. --with-mm=%{l_prefix} \
  452. %endif
  453. %if "%{with_pcre}" == "yes"
  454. --with-pcre-regex=%{l_prefix} \
  455. %endif
  456. %if "%{with_ftp}" == "yes"
  457. --enable-ftp \
  458. %endif
  459. %if "%{with_oci8}" == "yes"
  460. --with-oci8 \
  461. %endif
  462. %if "%{with_gettext}" == "yes"
  463. --with-gettext=%{l_prefix} \
  464. %endif
  465. %if "%{with_imap}" == "yes"
  466. --with-imap=%{l_prefix} \
  467. --with-imap-ssl=%{l_prefix} \
  468. %endif
  469. %if "%{with_json}" == "yes"
  470. --enable-json \
  471. %else
  472. --disable-json \
  473. %endif
  474. %if "%{with_xml}" == "yes"
  475. --enable-xml \
  476. --enable-libxml \
  477. --with-libxml-dir=%{l_prefix} \
  478. %else
  479. --disable-xml \
  480. %endif
  481. %if "%{with_xslt}" == "yes"
  482. --with-xsl=%{l_prefix} \
  483. %else
  484. --without-xsl \
  485. %endif
  486. %if "%{with_dom}" == "yes"
  487. --enable-dom \
  488. %else
  489. --disable-dom \
  490. %endif
  491. %if "%{with_wddx}" == "yes"
  492. --enable-wddx \
  493. %endif
  494. %if "%{with_bc}" == "yes"
  495. --enable-bcmath \
  496. %endif
  497. %if "%{with_mhash}" == "yes"
  498. --with-mhash=%{l_prefix} \
  499. %endif
  500. %if "%{with_mcrypt}" == "yes"
  501. --with-mcrypt=%{l_prefix} \
  502. %endif
  503. %if "%{with_ctype}" == "yes"
  504. --enable-ctype \
  505. %endif
  506. %if "%{with_curl}" == "yes"
  507. --with-curl=%{l_prefix} \
  508. %endif
  509. %if "%{with_gdbm}" == "yes"
  510. --with-gdbm=%{l_prefix} \
  511. %endif
  512. %if "%{with_versioning}" == "yes"
  513. --enable-versioning \
  514. %endif
  515. %if "%{with_pear}" == "yes"
  516. --with-pear=%{l_prefix}/lib/php \
  517. %else
  518. --without-pear \
  519. %endif
  520. %if "%{with_simplexml}" == "yes"
  521. --enable-simplexml \
  522. --enable-libxml \
  523. --with-libxml-dir=%{l_prefix} \
  524. %else
  525. --disable-simplexml \
  526. %endif
  527. %if "%{with_snmp}" == "yes"
  528. --with-snmp=%{l_prefix} \
  529. --with-openssl-dir=%{l_prefix} \
  530. %endif
  531. %if "%{with_odbc}" == "yes"
  532. --with-unixODBC=%{l_prefix} \
  533. --with-pdo-odbc=unixODBC,%{l_prefix} \
  534. %endif
  535. %if "%{with_mbregex}" == "yes"
  536. --enable-mbregex \
  537. %endif
  538. %if "%{with_mbstring}" == "yes"
  539. --enable-mbstring \
  540. %endif
  541. %if "%{with_exif}" == "yes"
  542. --with-exif \
  543. %endif
  544. %if "%{with_iconv}" == "yes"
  545. --with-iconv=%{l_prefix} \
  546. %endif
  547. %if "%{with_tidy}" == "yes"
  548. --with-tidy=%{l_prefix} \
  549. %else
  550. --without-tidy \
  551. %endif
  552. %if "%{with_pecl_memcache}" == "yes"
  553. --enable-memcache \
  554. %endif
  555. --with-apxs2=%{l_prefix}/sbin/apxs \
  556. --disable-cli \
  557. --disable-cgi \
  558. --enable-force-cgi-redirect \
  559. --enable-discard-path
  560. # build package
  561. %{l_make} %{l_mflags}
  562. %install
  563. # install package
  564. rm -rf $RPM_BUILD_ROOT
  565. %{l_make} %{l_mflags} install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
  566. mv $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/libphp5.so \
  567. $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/mod_php.so
  568. # install default configuration file
  569. %{l_shtool} mkdir -f -p -m 755 \
  570. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
  571. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  572. %{SOURCE apache-php.ini} \
  573. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
  574. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  575. %{SOURCE apache-php.conf} \
  576. $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
  577. # create session storage directory
  578. %if "%{with_mm}" == "yes"
  579. %{l_shtool} mkdir -f -p -m 755 \
  580. $RPM_BUILD_ROOT%{l_prefix}/var/apache/run/apache-php.session
  581. %endif
  582. # determine installation files
  583. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  584. %if "%{with_mm}" == "yes"
  585. '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/apache/run/apache-php.session' \
  586. %endif
  587. '%config %{l_prefix}/etc/apache/apache-php.ini' \
  588. '%config %{l_prefix}/etc/apache/apache.d/apache-php.conf'
  589. %files -f files
  590. %clean
  591. rm -rf $RPM_BUILD_ROOT
  592. %post
  593. # after upgrade, restart service
  594. [ $1 -eq 2 ] || exit 0
  595. eval `%{l_rc} apache status 2>/dev/null`
  596. [ ".$apache_active" = .yes ] && %{l_rc} apache restart
  597. exit 0