php3.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. ##
  2. ## php3.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: php3
  27. Summary: Personal HomePage (PHP)
  28. URL: http://www.php.net/
  29. Vendor: The PHP Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Language
  33. License: PHP
  34. Version: 3.0.18
  35. Release: 20031127
  36. # package options
  37. %option with_mysql no
  38. %option with_pgsql no
  39. %option with_gd no
  40. %option with_db no
  41. %option with_zlib no
  42. %option with_openssl no
  43. %option with_ftp no
  44. # fixing implicit inter-module dependencies and correlations
  45. %if "%{with_mysql}" == "yes" || "%{with_gd}" == "yes"
  46. %undefine with_zlib
  47. %define with_zlib yes
  48. %endif
  49. %if "%{with_pgsql}" == "yes"
  50. %undefine with_openssl
  51. %define with_openssl yes
  52. %endif
  53. # list of sources
  54. Source0: http://www.php.net/distributions/php-%{version}.tar.gz
  55. Patch0: http://static.php.net/www.php.net/distributions/mime.c.diff-3.0.gz
  56. # build information
  57. Prefix: %{l_prefix}
  58. BuildRoot: %{l_buildroot}
  59. BuildPreReq: OpenPKG, openpkg >= 20030708, gcc, flex, bison
  60. PreReq: OpenPKG, openpkg >= 20030708, MTA
  61. BuildPreReq: gdbm
  62. PreReq: gdbm
  63. %if "%{with_mysql}" == "yes"
  64. BuildPreReq: mysql
  65. PreReq: mysql
  66. %endif
  67. %if "%{with_pgsql}" == "yes"
  68. BuildPreReq: postgresql
  69. PreReq: postgresql
  70. %endif
  71. %if "%{with_gd}" == "yes"
  72. BuildPreReq: gd, jpeg, png
  73. PreReq: gd, jpeg, png
  74. %endif
  75. %if "%{with_db}" == "yes"
  76. BuildPreReq: db
  77. PreReq: db
  78. %endif
  79. %if "%{with_zlib}" == "yes"
  80. BuildPreReq: zlib
  81. PreReq: zlib
  82. %endif
  83. %if "%{with_openssl}" == "yes"
  84. BuildPreReq: openssl
  85. PreReq: openssl
  86. %endif
  87. AutoReq: no
  88. AutoReqProv: no
  89. %description
  90. PHP is an HTML-embedded scripting language. Much of its syntax is
  91. borrowed from C, Java and Perl with a couple of unique PHP-specific
  92. features thrown in. The goal of the language is to allow web
  93. developers to write dynamically generated pages quickly.
  94. This is the Common Gateway Interface (CGI) version of PHP, intended
  95. for use in the "shebang" line ("#!%{l_prefix}/cgi/php") of
  96. stand-alone webserver-independent CGI scripts.
  97. THIS IS THE ALREADY DEPRECATED VERSION 3.x OF PHP.
  98. USE IT IN A PRODUCTION ENVIRONMENT ON YOUR OWN RISK ONLY.
  99. %prep
  100. %setup -q -n php-%{version}
  101. cd functions
  102. %patch -p0
  103. %build
  104. # configure package
  105. cflags="%{l_cflags -O}"
  106. cppflags="%{l_cppflags}"
  107. ldflags="%{l_ldflags}"
  108. libs="-lgdbm"
  109. %if "%{with_gd}" == "yes"
  110. libs="$libs -lpng -lz"
  111. %endif
  112. %if "%{with_db}" == "yes"
  113. libs="$libs -ldb"
  114. %endif
  115. CC="%{l_cc}" \
  116. CFLAGS="$cflags" \
  117. CPPFLAGS="$cppflags" \
  118. LDFLAGS="$ldflags" \
  119. LIBS="$libs" \
  120. PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
  121. ./configure \
  122. --prefix=%{l_prefix} \
  123. --sysconfdir=%{l_prefix}/etc/php3 \
  124. --with-config-file-path=%{l_prefix}/etc/php3 \
  125. %if "%{with_mysql}" == "yes"
  126. --with-mysql=%{l_prefix} \
  127. %else
  128. --without-mysql \
  129. %endif
  130. %if "%{with_pgsql}" == "yes"
  131. --with-pgsql=%{l_prefix} \
  132. %else
  133. --without-pgsql \
  134. %endif
  135. %if "%{with_gd}" == "yes"
  136. --with-gd=%{l_prefix} \
  137. --with-jpeg-dir=%{l_prefix} \
  138. --with-png-dir=%{l_prefix} \
  139. %endif
  140. %if "%{with_db}" == "yes"
  141. --with-db4=%{l_prefix} \
  142. %endif
  143. %if "%{with_zlib}" == "yes"
  144. --with-zlib=%{l_prefix} \
  145. --with-zlib-dir=%{l_prefix} \
  146. %endif
  147. %if "%{with_openssl}" == "yes"
  148. --with-openssl=%{l_prefix} \
  149. %endif
  150. %if "%{with_ftp}" == "yes"
  151. --enable-ftp \
  152. %else
  153. --disable-ftp \
  154. %endif
  155. --without-apache \
  156. --enable-force-cgi-redirect \
  157. --enable-discard-path \
  158. --enable-track-vars \
  159. --enable-memory-limit
  160. # build package
  161. %{l_make} %{l_mflags -O}
  162. %install
  163. # install package
  164. rm -rf $RPM_BUILD_ROOT
  165. %{l_shtool} mkdir -f -p -m 755 \
  166. $RPM_BUILD_ROOT%{l_prefix}/cgi \
  167. $RPM_BUILD_ROOT%{l_prefix}/etc/php3
  168. %{l_shtool} install -c -s -m 755 \
  169. php $RPM_BUILD_ROOT%{l_prefix}/cgi/php3
  170. # install default configuration file
  171. %{l_shtool} mkdir -f -p -m 755 \
  172. $RPM_BUILD_ROOT%{l_prefix}/etc/php3
  173. %{l_shtool} install -c -m 644 /dev/null \
  174. $RPM_BUILD_ROOT%{l_prefix}/etc/php3/php.ini
  175. # determine installation files
  176. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  177. '%config %{l_prefix}/etc/php3/*'
  178. %files -f files
  179. %clean
  180. rm -rf $RPM_BUILD_ROOT