Makefile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:= php
  7. PKG_VERSION:= 5.2.9
  8. PKG_RELEASE:= 1
  9. PKG_MD5SUM:= 98b647561dc664adefe296106056cf11
  10. MASTER_SITES:= http://de.php.net/distributions/
  11. include $(TOPDIR)/mk/package.mk
  12. $(eval $(call PKG_template,PHP_CLI,php-cli,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
  13. $(eval $(call PKG_template,PHP_FASTCGI,php-fastcgi,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
  14. define PKG_mod_template
  15. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  16. ${2}-install:
  17. ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/php
  18. ${INSTALL_DATA} $(WRKBUILD)/modules/$(2).so $$(IDIR_$(1))/usr/lib/php
  19. endef
  20. PKG_CONFIGURE_OPTS:= \
  21. --without-pear \
  22. --disable-spl \
  23. --with-config-file-path=/etc \
  24. --enable-magic-quotes \
  25. --disable-short-tags \
  26. --disable-ctype \
  27. --disable-dom \
  28. --enable-ftp=shared \
  29. --without-gettext \
  30. --without-iconv \
  31. --disable-libxml \
  32. --without-libxml-dir \
  33. --disable-mbstring \
  34. --disable-mbregex \
  35. --with-openssl=shared,"$(STAGING_DIR)/usr" \
  36. --with-kerberos=no \
  37. --with-openssl-dir="$(STAGING_DIR)/usr" \
  38. --enable-session=shared \
  39. --disable-simplexml \
  40. --disable-soap \
  41. --enable-sockets=shared \
  42. --disable-tokenizer \
  43. --disable-filter \
  44. --disable-xmlreader \
  45. --disable-xmlwriter \
  46. --with-zlib="$(STAGING_DIR)/usr" \
  47. --with-zlib-dir="$(STAGING_DIR)/usr" \
  48. --enable-cli \
  49. --enable-cgi \
  50. --enable-fastcgi \
  51. --enable-force-cgi-redirect \
  52. --enable-discard-path \
  53. ifneq ($(ADK_PACKAGE_PHP_MOD_CURL),)
  54. PKG_CONFIGURE_OPTS+= --with-curl=shared,"$(STAGING_DIR)/usr"
  55. else
  56. PKG_CONFIGURE_OPTS+= --without-curl
  57. endif
  58. ifneq ($(ADK_PACKAGE_PHP_MOD_GD),)
  59. PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_DIR)/usr" \
  60. --without-freetype-dir \
  61. --with-jpeg-dir="$(STAGING_DIR)/usr" \
  62. --with-png-dir="$(STAGING_DIR)/usr" \
  63. --without-xpm-dir \
  64. --without-ttf \
  65. --without-t1lib \
  66. --enable-gd-native-ttf \
  67. --disable-gd-jis-conv
  68. else
  69. PKG_CONFIGURE_OPTS+= --without-gd
  70. endif
  71. ifneq ($(ADK_PACKAGE_PHP_MOD_GMP),)
  72. PKG_CONFIGURE_OPTS+= --with-gmp=shared,"$(STAGING_DIR)/usr"
  73. else
  74. PKG_CONFIGURE_OPTS+= --without-gmp
  75. endif
  76. ifneq ($(ADK_PACKAGE_PHP_MOD_LDAP),)
  77. PKG_CONFIGURE_OPTS+= --with-ldap=shared,"$(STAGING_DIR)/usr" \
  78. --with-ldap-sasl="$(STAGING_DIR)/usr"
  79. else
  80. PKG_CONFIGURE_OPTS+= --without-ldap
  81. endif
  82. ifneq ($(ADK_PACKAGE_PHP_MOD_MYSQL),)
  83. PKG_CONFIGURE_OPTS+= --with-mysql=shared,"$(STAGING_DIR)/usr"
  84. else
  85. PKG_CONFIGURE_OPTS+= --without-mysql
  86. endif
  87. ifneq ($(ADK_PACKAGE_PHP_MOD_PCRE),)
  88. PKG_CONFIGURE_OPTS+= --with-pcre-regex=shared,"$(STAGING_DIR)/usr"
  89. else
  90. PKG_CONFIGURE_OPTS+= --without-pcre-regex
  91. endif
  92. ifneq ($(ADK_PACKAGE_PHP_MOD_PGSQL),)
  93. PKG_CONFIGURE_OPTS+= --with-pgsql=shared,"$(STAGING_DIR)/usr"
  94. else
  95. PKG_CONFIGURE_OPTS+= --without-pgsql
  96. endif
  97. ifneq ($(ADK_PACKAGE_PHP_MOD_SQLITE),)
  98. PKG_CONFIGURE_OPTS+= --without-sqlite
  99. PKG_CONFIGURE_OPTS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr"
  100. PKG_CONFIGURE_OPTS+= --enable-pdo=shared
  101. else
  102. PKG_CONFIGURE_OPTS+= --without-sqlite
  103. endif
  104. ifneq ($(ADK_PACKAGE_PHP_MOD_XML),)
  105. PKG_CONFIGURE_OPTS+= --enable-xml=shared,"$(STAGING_DIR)/usr" \
  106. --with-libexpat-dir="$(STAGING_DIR)/usr"
  107. else
  108. PKG_CONFIGURE_OPTS+= --disable-xml
  109. endif
  110. $(eval $(call PKG_template,PHP_MOD_CURL,php-mod-curl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  111. $(eval $(call PKG_template,PHP_MOD_FTP,php-mod-ftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  112. $(eval $(call PKG_template,PHP_MOD_GD,php-mod-gd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  113. $(eval $(call PKG_template,PHP_MOD_GMP,php-mod-gmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  114. $(eval $(call PKG_template,PHP_MOD_LDAP,php-mod-ldap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  115. $(eval $(call PKG_template,PHP_MOD_MYSQL,php-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  116. $(eval $(call PKG_template,PHP_MOD_OPENSSL,php-mod-openssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  117. $(eval $(call PKG_template,PHP_MOD_PCRE,php-mod-pcre,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  118. $(eval $(call PKG_template,PHP_MOD_PGSQL,php-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  119. $(eval $(call PKG_template,PHP_MOD_SESSION,php-mod-session,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  120. $(eval $(call PKG_template,PHP_MOD_SOCKETS,php-mod-sockets,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  121. $(eval $(call PKG_template,PHP_MOD_SQLITE,php-mod-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  122. $(eval $(call PKG_template,PHP_MOD_XML,php-mod-xml,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
  123. $(eval $(call PKG_mod_template,PHP_MOD_CURL,curl))
  124. $(eval $(call PKG_mod_template,PHP_MOD_FTP,ftp))
  125. $(eval $(call PKG_mod_template,PHP_MOD_GD,gd))
  126. $(eval $(call PKG_mod_template,PHP_MOD_GMP,gmp))
  127. $(eval $(call PKG_mod_template,PHP_MOD_LDAP,ldap))
  128. $(eval $(call PKG_mod_template,PHP_MOD_MYSQL,mysql))
  129. $(eval $(call PKG_mod_template,PHP_MOD_OPENSSL,openssl))
  130. $(eval $(call PKG_mod_template,PHP_MOD_PCRE,pcre))
  131. $(eval $(call PKG_mod_template,PHP_MOD_PGSQL,pgsql))
  132. $(eval $(call PKG_mod_template,PHP_MOD_SESSION,session))
  133. $(eval $(call PKG_mod_template,PHP_MOD_SOCKETS,sockets))
  134. $(eval $(call PKG_mod_template,PHP_MOD_SQLITE,pdo))
  135. $(eval $(call PKG_mod_template,PHP_MOD_XML,xml))
  136. TLDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
  137. CONFIGURE_STYLE:= gnu
  138. CONFIGURE_ARGS+= $(PKG_CONFIGURE_OPTS)
  139. BUILD_STYLE:= auto
  140. do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  141. ${INSTALL_DIR} $(IDIR_PHP_CLI)/etc
  142. ${INSTALL_DATA} ./files/php.ini $(IDIR_PHP_CLI)/etc/
  143. ${INSTALL_DIR} $(IDIR_PHP_CLI)/usr/bin
  144. ${INSTALL_BIN} $(WRKBUILD)/sapi/cli/php $(IDIR_PHP_CLI)/usr/bin/php
  145. ${INSTALL_DIR} $(IDIR_PHP_FASTCGI)/etc
  146. ${INSTALL_DATA} ./files/php.ini $(IDIR_PHP_FASTCGI)/etc/
  147. ${INSTALL_DIR} $(IDIR_PHP_FASTCGI)/etc/init.d
  148. ${INSTALL_BIN} ./files/php.init \
  149. $(IDIR_PHP_FASTCGI)/etc/init.d/php
  150. ${INSTALL_DIR} $(IDIR_PHP_FASTCGI)/usr/sbin
  151. ${INSTALL_BIN} $(WRKBUILD)/sapi/cgi/php-cgi $(IDIR_PHP_FASTCGI)/usr/sbin/php
  152. include ${TOPDIR}/mk/pkg-bottom.mk