[csw-devel] SF.net SVN: gar:[4891] csw/mgar/pkg/php5/trunk
valholla at users.sourceforge.net
valholla at users.sourceforge.net
Sat May 16 13:04:22 CEST 2009
Revision: 4891
http://gar.svn.sourceforge.net/gar/?rev=4891&view=rev
Author: valholla
Date: 2009-05-16 11:04:22 +0000 (Sat, 16 May 2009)
Log Message:
-----------
even more generic admin scripts
Modified Paths:
--------------
csw/mgar/pkg/php5/trunk/Makefile
csw/mgar/pkg/php5/trunk/Makefile.Orig
csw/mgar/pkg/php5/trunk/Makefile.default-dirs
csw/mgar/pkg/php5/trunk/checksums
csw/mgar/pkg/php5/trunk/files/CSWphp5.postinstall
csw/mgar/pkg/php5/trunk/files/php.ini.CSW
Modified: csw/mgar/pkg/php5/trunk/Makefile
===================================================================
--- csw/mgar/pkg/php5/trunk/Makefile 2009-05-16 10:51:17 UTC (rev 4890)
+++ csw/mgar/pkg/php5/trunk/Makefile 2009-05-16 11:04:22 UTC (rev 4891)
@@ -21,12 +21,13 @@
MASTER_SITES = http://us.php.net/distributions/
SPKG_SOURCEURL = http://www.php.net/downloads.php
INSTALL_ENV += INSTALL_ROOT=$(DESTDIR)
-STRIP_DIRS += $(DESTDIR)$(prefix)/lib/php/extensions/*/
+STRIP_DIRS += $(shell $(call _get_php_prefix,$(DESTDIR))/bin/php-config --extension-dir)/*/
DISTFILES += $(DISTNAME).tar.bz2
DISTFILES += php.ini.CSW phpext pear.conf.CSW CSWphp5.postinstall
PACKAGES = CSWphp5 CSWphp5devel
+
CATALOGNAME_CSWphp5 = php5
SPKG_DESC_CSWphp5 = A High-Level Scripting Languages
CATALOGNAME_CSWphp5devel = php5_devel
@@ -68,9 +69,9 @@
NOISALIST = 1
STRIP_LIBTOOL = 1
-CONFIGURE_ARGS += --prefix=$(prefix)
+CONFIGURE_ARGS += --prefix=$(prefix)/php5
CONFIGURE_ARGS += --disable-static
-CONFIGURE_ARGS += --with-exec-dir=$(prefix)/bin
+CONFIGURE_ARGS += --with-exec-dir=$(prefix)/php5/bin
CONFIGURE_ARGS += --enable-cli
CONFIGURE_ARGS += --enable-fastcgi
CONFIGURE_ARGS += --enable-force-cgi-redirect
@@ -84,6 +85,18 @@
SKIPTEST = 1
ENABLE_CHECK = 0
+define _get_php_config
+$(abspath $(shell gfind $(1) -name php-config -print))
+endef
+
+define _get_php_prefix
+$(shell $(call _get_php_config,$(1)) --prefix)
+endef
+
+define _get_php_ini_path
+$(shell $(call _get_php_prefix,$(1))/bin/php -i | grep "Configuration File .* Path" | gawk '{print $$NF}')
+endef
+
PI_SCRIPTS = install-extras
PI_SCRIPTS += install-ap2modphp5
PI_SCRIPTS += install-modphp5
@@ -94,53 +107,44 @@
install-extras:
@echo "[====> Fixing Admin Scripts <====]"
- PHP_INI_FILE=`$(DESTDIR)$(bindir)/php -i | \
- grep "Configuration File .* Path" | awk '{print $$NF}'`; \
- perl -i -pne "s|_PHPINIFILE_|$${PHP_INI_FILE}/php.ini|" \
- `gfind $(DOWNLOADDIR) -type f -print`
- perl -i -pne "s|_PHPLIBDIR_|$(libdir)|" \
- `gfind $(DOWNLOADDIR) -type f -print`
- perl -i -pne "s|_PHPBINDIR_|$(bindir)|" \
- `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPINIFILE_|$(call _get_php_ini_path,$(DESTDIR))/php.ini|" `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPLIBDIR_|$(call _get_php_ini_path,$(DESTDIR))|" `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPBINDIR_|$(call _get_php_prefix,$(DESTDIR))/bin|" `gfind $(DOWNLOADDIR) -type f -print`
@echo "[====> Installing Extra Files <====]"
- ginstall -m 0755 $(DOWNLOADDIR)/phpext $(DESTDIR)$(bindir)
- gsed -i -e s,PHPEXTDIR,`$(DESTDIR)$(bindir)/php-config --extension-dir`,\
- $(DOWNLOADDIR)/php.ini.CSW
- ginstall -m 0644 $(DOWNLOADDIR)/php.ini.CSW $(DESTDIR)$(libdir)
- ginstall -m 0644 $(DOWNLOADDIR)/pear.conf.CSW $(DESTDIR)$(sysconfdir)
- ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
- ginstall -m 0644 $(DOWNLOADDIR)/httpd-php5.conf.CSW \
- $(DESTDIR)$(prefix)/apache2/etc/extra
+ ginstall -m 0755 $(DOWNLOADDIR)/phpext $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/bin
+ perl -i -pne 's|_PHPEXTDIR_|$(shell $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/bin/php-config --extension-dir)|' $(DOWNLOADDIR)/php.ini.CSW
+ ginstall -m 0644 $(DOWNLOADDIR)/php.ini.CSW $(DESTDIR)$(call _get_php_ini_path,$(DESTDIR))
+ ginstall -m 0644 $(DOWNLOADDIR)/pear.conf.CSW $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/etc
@$(MAKECOOKIE)
install-ap2modphp5:
@echo "[====> Now Building ap2_modphp5 <====]"
- @if [ -f $(WORKSRC)/Makefile ]; then \
+ if [ -f $(WORKSRC)/Makefile ]; then \
$(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
cd $(WORKSRC) && $(BUILD_ENV) \
./configure $(CONFIGURE_ARGS) --with-apxs2=$(prefix)/apache2/sbin/apxs
- @$(GARBIN)/fixlibtool $(WORKSRC)
- @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
- @strip $(DESTDIR)$(prefix)/apache2/libexec/libphp5.so
+ $(GARBIN)/fixlibtool $(WORKSRC)
+ $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
+ strip $(DESTDIR)$(prefix)/apache2/libexec/libphp5.so
+ ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
+ ginstall -m 0644 $(DOWNLOADDIR)/httpd-php5.conf.CSW $(DESTDIR)$(prefix)/apache2/etc/extra
@$(MAKECOOKIE)
install-modphp5:
@echo "[====> Now Building mod_php5 <====]"
- @if [ -f $(WORKSRC)/Makefile ]; then \
- $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
- cd $(WORKSRC) && $(BUILD_ENV) \
- ./configure $(CONFIGURE_ARGS) --with-apxs=$(prefix)/apache/bin/apxs
- @$(GARBIN)/fixlibtool $(WORKSRC)
- @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
- @strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so
+ if [ -f $(WORKSRC)/Makefile ]; then $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
+ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(CONFIGURE_ARGS) --with-apxs=$(prefix)/apache/bin/apxs
+ $(GARBIN)/fixlibtool $(WORKSRC)
+ $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
+ strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so
@$(MAKECOOKIE)
install-cleanup:
- @gfind $(DESTDIR) -name \.[a-z]\* -print |xargs grm -fr
- @grm -f $(DESTDIR)$(sysconfdir)/pear.conf
- @gfind $(DESTDIR)$(prefix)/apache* \
- -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr
- @$(MAKECOOKIE)
+ @echo "[====> Cleaning Up Extra Install Files <====]"
+ gfind $(DESTDIR) -name \.[a-z]\* -print |xargs grm -fr
+ grm -f $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/etc/pear.conf
+ gfind $(DESTDIR)$(prefix)/apache* -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr
+ $(MAKECOOKIE)
EXTFILES = $(shell find extensions/*/files/* -prune -type f)
pre-fetch:
Modified: csw/mgar/pkg/php5/trunk/Makefile.Orig
===================================================================
--- csw/mgar/pkg/php5/trunk/Makefile.Orig 2009-05-16 10:51:17 UTC (rev 4890)
+++ csw/mgar/pkg/php5/trunk/Makefile.Orig 2009-05-16 11:04:22 UTC (rev 4891)
@@ -1,8 +1,8 @@
-GARNAME = php5
-GARVERSION = 5.2.9
-CATEGORIES = lang
-SF_PROJ = $(shell echo $(GARNAME) | sed -e 's/[0-9]//g')
-DISTNAME = $(SF_PROJ)-$(GARVERSION)
+GARNAME = php5
+GARVERSION = 5.2.9
+CATEGORIES = lang
+SF_PROJ = $(shell echo $(GARNAME) | sed -e 's/[0-9]//g')
+DISTNAME = $(SF_PROJ)-$(GARVERSION)
DESCRIPTION = A high-level scripting language.
define BLURB
@@ -18,19 +18,11 @@
available.
endef
-php5_root = $(DESTDIR)$(prefix)/php5
-php5_bin = $(php5_root)/bin
-php5_lib = $(php5_root)/lib
-
MASTER_SITES = http://us.php.net/distributions/
SPKG_SOURCEURL = http://www.php.net/downloads.php
-
INSTALL_ENV += INSTALL_ROOT=$(DESTDIR)
-PHP5ROOT = $(DESTDIR)$(prefix)/php5
+STRIP_DIRS += $(shell $(call _get_php_prefix,$(DESTDIR))/bin/php-config --extension-dir)/*/
-STRIP_DIRS += $(PHP5ROOT)/lib/php/extensions/*/
-STRIP_DIRS += $(PHP5ROOT)/bin
-
DISTFILES += $(DISTNAME).tar.bz2
DISTFILES += php.ini.CSW phpext pear.conf.CSW CSWphp5.postinstall
@@ -44,12 +36,24 @@
REQUIRED_PKGS_CSWphp5 += CSWlibxml2 CSWzlib CSWmysql5rt
REQUIRED_PKGS_CSWphp5devel = CSWphp5
-PKGFILES_CSWphp5devel = $(prefix)/php5/bin/php-config
-PKGFILES_CSWphp5devel += $(prefix)/php5/bin/phpize
-PKGFILES_CSWphp5devel += $(prefix)/php5/bin/peardev
-PKGFILES_CSWphp5devel += $(prefix)/php5/include.*
-PKGFILES_CSWphp5devel += $(prefix)/php5/lib/php/build/.*
-PKGFILES_CSWphp5devel += $(prefix)/php5/man/.*
+PKGFILES_CSWphp5devel = $(bindir)/php-config
+PKGFILES_CSWphp5devel += $(bindir)/phpize
+PKGFILES_CSWphp5devel += $(bindir)/peardev
+PKGFILES_CSWphp5devel += $(libdir)/php/build/.*
+PKGFILES_CSWphp5devel += $(includedir)/php/TSRM.*
+PKGFILES_CSWphp5devel += $(includedir)/php/Zend.*
+PKGFILES_CSWphp5devel += $(includedir)/php/include.*
+PKGFILES_CSWphp5devel += $(includedir)/php/main.*
+PKGFILES_CSWphp5devel += $(includedir)/php/regex.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/date.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/filter.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/libxml.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/pcre.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/spl.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/standard.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/xml.*
+PKGFILES_CSWphp5devel += $(mandir)/man1/php-config.1
+PKGFILES_CSWphp5devel += $(mandir)/man1/phpize.1
PATCHFILES += configure.diff
PATCHFILES += php-bug-45557-fix.diff
@@ -62,7 +66,7 @@
EXTRA_INC += $(prefix)/bdb44/include
EXTRA_CFLAGS = -I$(prefix)/include/ncursesw
-NOISALIST = 1
+NOISALIST = 1
STRIP_LIBTOOL = 1
CONFIGURE_ARGS += --prefix=$(prefix)/php5
@@ -71,8 +75,6 @@
CONFIGURE_ARGS += --enable-cli
CONFIGURE_ARGS += --enable-fastcgi
CONFIGURE_ARGS += --enable-force-cgi-redirect
-CONFIGURE_ARGS += --enable-pcntl=shared
-CONFIGURE_ARGS += --enable-pdo=shared
CONFIGURE_ARGS += --with-mm=$(prefix)
CONFIGURE_ARGS += --enable-magic-quotes
CONFIGURE_ARGS += --enable-spl=shared
@@ -80,9 +82,21 @@
CONFIGURE_ARGS += --with-pear=shared
# Disable Tests (report submitted to PHP QA)
-SKIPTEST = 1
+SKIPTEST = 1
ENABLE_CHECK = 0
+define _get_php_config
+$(abspath $(shell gfind $(1) -name php-config -print))
+endef
+
+define _get_php_prefix
+$(shell $(call _get_php_config,$(1)) --prefix)
+endef
+
+define _get_php_ini_path
+$(shell $(call _get_php_prefix,$(1))/bin/php -i | grep "Configuration File .* Path" | gawk '{print $$NF}')
+endef
+
PI_SCRIPTS = install-extras
PI_SCRIPTS += install-ap2modphp5
PI_SCRIPTS += install-modphp5
@@ -92,45 +106,45 @@
@$(MAKECOOKIE)
install-extras:
- ginstall -m 0755 $(WORKDIR)/phpext $(DESTDIR)$(prefix)/php5/bin
- gsed -i -e s,PHPEXTDIR,$(shell $(PHP5ROOT)/bin/php-config --extension-dir),\
- $(WORKDIR)/php.ini.CSW
- ginstall -m 0644 $(WORKDIR)/php.ini.CSW $(DESTDIR)$(prefix)/php5/lib
- ginstall -m 0644 $(WORKDIR)/pear.conf.CSW $(DESTDIR)$(prefix)/php5/etc
- ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
- ginstall -m 0644 $(WORKDIR)/httpd-php5.conf.CSW \
- $(DESTDIR)$(prefix)/apache2/etc/extra
+ @echo "[====> Fixing Admin Scripts <====]"
+ perl -i -pne "s|_PHPINIFILE_|$(call _get_php_ini_path,$(DESTDIR))/php.ini|" `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPLIBDIR_|$(call _get_php_ini_path,$(DESTDIR))|" `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPBINDIR_|$(call _get_php_prefix,$(DESTDIR))/bin|" `gfind $(DOWNLOADDIR) -type f -print`
+ @echo "[====> Installing Extra Files <====]"
+ ginstall -m 0755 $(DOWNLOADDIR)/phpext $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/bin
+ perl -i -pne 's|_PHPEXTDIR_|$(shell $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/bin/php-config --extension-dir)|' $(DOWNLOADDIR)/php.ini.CSW
+ ginstall -m 0644 $(DOWNLOADDIR)/php.ini.CSW $(DESTDIR)$(call _get_php_ini_path,$(DESTDIR))
+ ginstall -m 0644 $(DOWNLOADDIR)/pear.conf.CSW $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/etc
@$(MAKECOOKIE)
install-ap2modphp5:
- @( echo " ==> Now Building ap2_modphp5 <==" )
- @( if [ -f $(WORKSRC)/Makefile ]; then \
- $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi )
- @( cd $(WORKSRC) && $(BUILD_ENV) \
- ./configure $(CONFIGURE_ARGS) --with-apxs2=$(prefix)/apache2/sbin/apxs)
- @( $(GARBIN)/fixlibtool $(WORKSRC) )
- @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi )
- @( strip $(DESTDIR)$(prefix)/apache2/libexec/libphp5.so )
+ @echo "[====> Now Building ap2_modphp5 <====]"
+ if [ -f $(WORKSRC)/Makefile ]; then \
+ $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
+ cd $(WORKSRC) && $(BUILD_ENV) \
+ ./configure $(CONFIGURE_ARGS) --with-apxs2=$(prefix)/apache2/sbin/apxs
+ $(GARBIN)/fixlibtool $(WORKSRC)
+ $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
+ strip $(DESTDIR)$(prefix)/apache2/libexec/libphp5.so
+ ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
+ ginstall -m 0644 $(DOWNLOADDIR)/httpd-php5.conf.CSW $(DESTDIR)$(prefix)/apache2/etc/extra
@$(MAKECOOKIE)
install-modphp5:
- @( echo " ==> Now Building mod_php5 <==" )
- @( if [ -f $(WORKSRC)/Makefile ]; then \
- $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi )
- @( cd $(WORKSRC) && $(BUILD_ENV) \
- ./configure $(CONFIGURE_ARGS) --with-apxs=$(prefix)/apache/bin/apxs)
- @( $(GARBIN)/fixlibtool $(WORKSRC) )
- @( $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi )
- @( strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so )
+ @echo "[====> Now Building mod_php5 <====]"
+ if [ -f $(WORKSRC)/Makefile ]; then $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
+ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(CONFIGURE_ARGS) --with-apxs=$(prefix)/apache/bin/apxs
+ $(GARBIN)/fixlibtool $(WORKSRC)
+ $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
+ strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so
@$(MAKECOOKIE)
install-cleanup:
- @gfind $(DESTDIR) -name \.[a-z]\* -exec grm -fr {} \;
- @gfind $(DESTDIR)/$(libdir) -name "*.a" -exec grm -f {} \;
- @grm -f $(DESTDIR)$(sysconfdir)/pear.conf
- @gfind $(DESTDIR)$(prefix)/apache* \
- -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr
- @$(MAKECOOKIE)
+ @echo "[====> Cleaning Up Extra Install Files <====]"
+ gfind $(DESTDIR) -name \.[a-z]\* -print |xargs grm -fr
+ grm -f $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/etc/pear.conf
+ gfind $(DESTDIR)$(prefix)/apache* -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr
+ $(MAKECOOKIE)
EXTFILES = $(shell find extensions/*/files/* -prune -type f)
pre-fetch:
Modified: csw/mgar/pkg/php5/trunk/Makefile.default-dirs
===================================================================
--- csw/mgar/pkg/php5/trunk/Makefile.default-dirs 2009-05-16 10:51:17 UTC (rev 4890)
+++ csw/mgar/pkg/php5/trunk/Makefile.default-dirs 2009-05-16 11:04:22 UTC (rev 4891)
@@ -21,12 +21,13 @@
MASTER_SITES = http://us.php.net/distributions/
SPKG_SOURCEURL = http://www.php.net/downloads.php
INSTALL_ENV += INSTALL_ROOT=$(DESTDIR)
-STRIP_DIRS += $(DESTDIR)$(prefix)/lib/php/extensions/*/
+STRIP_DIRS += $(shell $(call _get_php_prefix,$(DESTDIR))/bin/php-config --extension-dir)/*/
DISTFILES += $(DISTNAME).tar.bz2
DISTFILES += php.ini.CSW phpext pear.conf.CSW CSWphp5.postinstall
PACKAGES = CSWphp5 CSWphp5devel
+
CATALOGNAME_CSWphp5 = php5
SPKG_DESC_CSWphp5 = A High-Level Scripting Languages
CATALOGNAME_CSWphp5devel = php5_devel
@@ -38,17 +39,28 @@
PKGFILES_CSWphp5devel = $(bindir)/php-config
PKGFILES_CSWphp5devel += $(bindir)/phpize
PKGFILES_CSWphp5devel += $(bindir)/peardev
-PKGFILES_CSWphp5devel += $(includedir)/.*
PKGFILES_CSWphp5devel += $(libdir)/php/build/.*
-PKGFILES_CSWphp5devel += $(mandir)/.*
+PKGFILES_CSWphp5devel += $(includedir)/php/TSRM.*
+PKGFILES_CSWphp5devel += $(includedir)/php/Zend.*
+PKGFILES_CSWphp5devel += $(includedir)/php/include.*
+PKGFILES_CSWphp5devel += $(includedir)/php/main.*
+PKGFILES_CSWphp5devel += $(includedir)/php/regex.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/date.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/filter.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/libxml.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/pcre.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/spl.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/standard.*
+PKGFILES_CSWphp5devel += $(includedir)/php/ext/xml.*
+PKGFILES_CSWphp5devel += $(mandir)/man1/php-config.1
+PKGFILES_CSWphp5devel += $(mandir)/man1/phpize.1
PATCHFILES += configure.diff
PATCHFILES += php-bug-45557-fix.diff
# PHP Extensions
EXTDIRLIST = $(shell ls -d extensions/*)
-INCLUDE_MK = $(foreach X,$(EXTDIRLIST),$(X)/Makefile)
-include $(INCLUDE_MK)
+include $(foreach X,$(EXTDIRLIST),$(X)/Makefile)
EXTRA_LIB += $(prefix)/bdb44/lib
EXTRA_INC += $(prefix)/bdb44/include
@@ -57,7 +69,7 @@
NOISALIST = 1
STRIP_LIBTOOL = 1
-CONFIGURE_ARGS = --prefix=$(prefix)
+CONFIGURE_ARGS += --prefix=$(prefix)
CONFIGURE_ARGS += --disable-static
CONFIGURE_ARGS += --with-exec-dir=$(prefix)/bin
CONFIGURE_ARGS += --enable-cli
@@ -73,6 +85,18 @@
SKIPTEST = 1
ENABLE_CHECK = 0
+define _get_php_config
+$(abspath $(shell gfind $(1) -name php-config -print))
+endef
+
+define _get_php_prefix
+$(shell $(call _get_php_config,$(1)) --prefix)
+endef
+
+define _get_php_ini_path
+$(shell $(call _get_php_prefix,$(1))/bin/php -i | grep "Configuration File .* Path" | gawk '{print $$NF}')
+endef
+
PI_SCRIPTS = install-extras
PI_SCRIPTS += install-ap2modphp5
PI_SCRIPTS += install-modphp5
@@ -81,57 +105,51 @@
post-install-modulated: $(PI_SCRIPTS)
@$(MAKECOOKIE)
+
install-extras:
- ginstall -m 0755 $(WORKDIR)/phpext $(DESTDIR)$(bindir)
- gsed -i -e s,PHPEXTDIR,$(shell $(DESTDIR)$(bindir)/php-config --extension-dir),\
- $(WORKDIR)/php.ini.CSW
- ginstall -m 0644 $(WORKDIR)/php.ini.CSW $(DESTDIR)$(libdir)
- ginstall -m 0644 $(WORKDIR)/pear.conf.CSW $(DESTDIR)$(sysconfdir)
- ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
- ginstall -m 0644 $(WORKDIR)/httpd-php5.conf.CSW \
- $(DESTDIR)$(prefix)/apache2/etc/extra
+ @echo "[====> Fixing Admin Scripts <====]"
+ perl -i -pne "s|_PHPINIFILE_|$(call _get_php_ini_path,$(DESTDIR))/php.ini|" `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPLIBDIR_|$(call _get_php_ini_path,$(DESTDIR))|" `gfind $(DOWNLOADDIR) -type f -print`
+ perl -i -pne "s|_PHPBINDIR_|$(call _get_php_prefix,$(DESTDIR))/bin|" `gfind $(DOWNLOADDIR) -type f -print`
+ @echo "[====> Installing Extra Files <====]"
+ ginstall -m 0755 $(DOWNLOADDIR)/phpext $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/bin
+ perl -i -pne 's|_PHPEXTDIR_|$(shell $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/bin/php-config --extension-dir)|' $(DOWNLOADDIR)/php.ini.CSW
+ ginstall -m 0644 $(DOWNLOADDIR)/php.ini.CSW $(DESTDIR)$(call _get_php_ini_path,$(DESTDIR))
+ ginstall -m 0644 $(DOWNLOADDIR)/pear.conf.CSW $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/etc
@$(MAKECOOKIE)
install-ap2modphp5:
- @echo " ==> Now Building ap2_modphp5 <=="
- @if [ -f $(WORKSRC)/Makefile ]; then \
+ @echo "[====> Now Building ap2_modphp5 <====]"
+ if [ -f $(WORKSRC)/Makefile ]; then \
$(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
cd $(WORKSRC) && $(BUILD_ENV) \
./configure $(CONFIGURE_ARGS) --with-apxs2=$(prefix)/apache2/sbin/apxs
- @$(GARBIN)/fixlibtool $(WORKSRC)
- @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
- @strip $(DESTDIR)$(prefix)/apache2/libexec/libphp5.so
+ $(GARBIN)/fixlibtool $(WORKSRC)
+ $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
+ strip $(DESTDIR)$(prefix)/apache2/libexec/libphp5.so
+ ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
+ ginstall -m 0644 $(DOWNLOADDIR)/httpd-php5.conf.CSW $(DESTDIR)$(prefix)/apache2/etc/extra
@$(MAKECOOKIE)
install-modphp5:
- @echo " ==> Now Building mod_php5 <=="
- @if [ -f $(WORKSRC)/Makefile ]; then \
- $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
- cd $(WORKSRC) && $(BUILD_ENV) \
- ./configure $(CONFIGURE_ARGS) --with-apxs=$(prefix)/apache/bin/apxs
- @$(GARBIN)/fixlibtool $(WORKSRC)
- @$(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
- @strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so
+ @echo "[====> Now Building mod_php5 <====]"
+ if [ -f $(WORKSRC)/Makefile ]; then $(BUILD_ENV) gmake -C $(WORKSRC) distclean; fi
+ cd $(WORKSRC) && $(BUILD_ENV) ./configure $(CONFIGURE_ARGS) --with-apxs=$(prefix)/apache/bin/apxs
+ $(GARBIN)/fixlibtool $(WORKSRC)
+ $(BUILD_ENV) $(INSTALL_ENV) gmake -C $(WORKSRC) install-sapi
+ strip $(DESTDIR)$(prefix)/apache/libexec/libphp5.so
@$(MAKECOOKIE)
install-cleanup:
- @gfind $(DESTDIR) -name \.[a-z]\* -exec grm -fr {} \;
- @gfind $(DESTDIR)/$(libdir) -name "*.a" -exec grm -f {} \;
- @grm -f $(DESTDIR)$(sysconfdir)/pear.conf
- @gfind $(DESTDIR)$(prefix)/apache* \
- -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr
- @$(MAKECOOKIE)
+ @echo "[====> Cleaning Up Extra Install Files <====]"
+ gfind $(DESTDIR) -name \.[a-z]\* -print |xargs grm -fr
+ grm -f $(DESTDIR)$(call _get_php_prefix,$(DESTDIR))/etc/pear.conf
+ gfind $(DESTDIR)$(prefix)/apache* -mindepth 1 -type d | egrep -v "etc|libexec" | xargs grm -fr
+ $(MAKECOOKIE)
EXTFILES = $(shell find extensions/*/files/* -prune -type f)
pre-fetch:
$(foreach F,$(EXTFILES),$(shell cp $(F) $(DOWNLOADDIR)))
-post-merge-modulated:
- @echo "[====> Fixing Admin Scripts <====]"
- @perl -i -plne "s|PHP_INI=_PHPINIFILE_|PHP_INI=`$(PKGROOT)$(bindir)/php -i | \
- grep "Loaded Configuration File" | awk '{print $$NF}'`|" \
- gfind $(DOWNLOADDIR) -type f -print`
- @$(MAKECOOKIE)
-
# System Rules/Configuration
include gar/category.mk
Modified: csw/mgar/pkg/php5/trunk/checksums
===================================================================
--- csw/mgar/pkg/php5/trunk/checksums 2009-05-16 10:51:17 UTC (rev 4890)
+++ csw/mgar/pkg/php5/trunk/checksums 2009-05-16 11:04:22 UTC (rev 4891)
@@ -4,7 +4,7 @@
5f0046fe1b3f8e2228fdb165bdbbe73a download/CSWmodphp5.postinstall
2e5dbed2c9dd5e24c331753984946822 download/CSWmodphp5.preremove
0dd379f20ceb32fc77bb3a9bf045097f download/CSWmodphp5.space
-0914febc951a55cd2bc587a2f9c30652 download/CSWphp5.postinstall
+61b5c51492268af9e9afc22759c63a6b download/CSWphp5.postinstall
ab08e2ba62667bf13fa236099e433e84 download/configure.diff
a71677d80f5cfd1aeb03547dfdeb705a download/httpd-php5.conf.CSW
2206431e47c2075c0b9c4a12de5cf791 download/odbc.diff
@@ -13,5 +13,5 @@
13db46097c9686302bebf160e2d26ed2 download/pgsql.diff
280d6cda7f72a4fc6de42fda21ac2db7 download/php-5.2.9.tar.bz2
a450a46ce0ea9fd0c0abe432e750a873 download/php-bug-45557-fix.diff
-550ae718308582e8eec40452190cae50 download/php.ini.CSW
-6251f3adcefc6ffa61d6339ac6b2d1eb download/phpext
+dfd4f19799c8f1e827402f40eda74fad download/php.ini.CSW
+90ae3cef3692d7e566c47d89fe39c43d download/phpext
Modified: csw/mgar/pkg/php5/trunk/files/CSWphp5.postinstall
===================================================================
--- csw/mgar/pkg/php5/trunk/files/CSWphp5.postinstall 2009-05-16 10:51:17 UTC (rev 4890)
+++ csw/mgar/pkg/php5/trunk/files/CSWphp5.postinstall 2009-05-16 11:04:22 UTC (rev 4891)
@@ -10,8 +10,7 @@
else
echo "$PHP_INI already exists"
- extdir_ext=`${PHP_BIN}/php -i |grep 'PHP Extension' |awk '{print $NF}'`
- extdir="${PHP_LIB}/php/extensions/no-debug-non-zts-${extdir_ext}"
+ extdir="_PHPEXTDIR_"
curextdir=`perl -lne '/(no-debug-non-zts-[0-9]+)/ && print $1' $PHP_INI`
if [ "$extdir" != "$curextdir" ]; then
Modified: csw/mgar/pkg/php5/trunk/files/php.ini.CSW
===================================================================
--- csw/mgar/pkg/php5/trunk/files/php.ini.CSW 2009-05-16 10:51:17 UTC (rev 4890)
+++ csw/mgar/pkg/php5/trunk/files/php.ini.CSW 2009-05-16 11:04:22 UTC (rev 4891)
@@ -517,7 +517,7 @@
user_dir =
; Directory in which the loadable extensions (modules) reside.
-extension_dir = "PHPEXTDIR"
+extension_dir = "_PHPEXTDIR_"
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list