[geos] 01/03: Also build the PHP binding. (closes: #761467)
Bas Couwenberg
sebastic at xs4all.nl
Sun Sep 14 16:53:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository geos.
commit 612530662166070d3dabb0e4846508224903f619
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sun Sep 14 13:56:01 2014 +0200
Also build the PHP binding. (closes: #761467)
---
debian/changelog | 7 +++++++
debian/control | 15 +++++++++++++++
debian/control.in | 15 +++++++++++++++
debian/geos.ini | 1 +
debian/php5-geos.install | 2 ++
debian/php5-geos.postinst | 14 ++++++++++++++
debian/php5-geos.prerm | 11 +++++++++++
debian/rules | 12 ++++++++++++
8 files changed, 77 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f678189..aae19be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+geos (3.4.2-6) UNRELEASED; urgency=medium
+
+ * Also build the PHP binding.
+ (closes: #761467)
+
+ -- Bas Couwenberg <sebastic at xs4all.nl> Sun, 14 Sep 2014 13:37:45 +0200
+
geos (3.4.2-5) unstable; urgency=medium
* Do run tests, but don't fail build on troublesome architectures.
diff --git a/debian/control b/debian/control
index a0c7d18..c19c1a2 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,9 @@ Build-Depends: debhelper (>= 9),
swig,
ruby,
ruby-all-dev,
+ php5-dev,
+ phpunit,
+ chrpath,
dh-autoreconf
Standards-Version: 3.9.5
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/geos.git
@@ -130,6 +133,18 @@ Description: GEOS bindings for Ruby
.
This package contains the Ruby bindings for GEOS.
+Package: php5-geos
+Section: web
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: GEOS bindings for PHP
+ GEOS provides a spatial object model and fundamental geometric
+ functions. It implements the geometry model defined in the
+ OpenGIS Consortium Simple Features Specification for SQL.
+ .
+ This package contains the PHP bindings for GEOS.
+
Package: libgeos-dbg
Architecture: any
Section: debug
diff --git a/debian/control.in b/debian/control.in
index 404f977..6fddecb 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -9,6 +9,9 @@ Build-Depends: debhelper (>= 9),
swig,
ruby,
ruby-all-dev,
+ php5-dev,
+ phpunit,
+ chrpath,
dh-autoreconf
Standards-Version: 3.9.3
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/geos.git
@@ -130,6 +133,18 @@ Description: GEOS bindings for Ruby
.
This package contains the Ruby bindings for GEOS.
+Package: php5-geos
+Architecture: any
+Section: web
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: GEOS bindings for PHP
+ GEOS provides a spatial object model and fundamental geometric
+ functions. It implements the geometry model defined in the
+ OpenGIS Consortium Simple Features Specification for SQL.
+ .
+ This package contains the PHP bindings for GEOS.
+
Package: libgeos-dbg
Architecture: any
Section: debug
diff --git a/debian/geos.ini b/debian/geos.ini
new file mode 100644
index 0000000..e896942
--- /dev/null
+++ b/debian/geos.ini
@@ -0,0 +1 @@
+extension=geos.so
diff --git a/debian/php5-geos.install b/debian/php5-geos.install
new file mode 100644
index 0000000..69987d2
--- /dev/null
+++ b/debian/php5-geos.install
@@ -0,0 +1,2 @@
+usr/lib/php5/
+etc/php5/mods-available/
diff --git a/debian/php5-geos.postinst b/debian/php5-geos.postinst
new file mode 100644
index 0000000..9c9526b
--- /dev/null
+++ b/debian/php5-geos.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+if [ "$1" = "configure" ]; then
+ php5enmod geos
+fi
+
+exit 0
diff --git a/debian/php5-geos.prerm b/debian/php5-geos.prerm
new file mode 100644
index 0000000..729b75b
--- /dev/null
+++ b/debian/php5-geos.prerm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" = "remove" ]; then
+ php5dismod geos
+fi
+
+exit 0
diff --git a/debian/rules b/debian/rules
index e78a127..a310930 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,8 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# testrunner fails on some architectures
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+PHP5API=$(shell php-config5 --phpapi)
+
# Guessing geos version, which is required for C++ binding support
VER_MAJOR=$(shell grep ^VERSION_MAJOR configure.*|cut -d= -f2)
VER_MINOR=$(shell grep ^VERSION_MINOR configure.*|cut -d= -f2)
@@ -47,6 +49,7 @@ override_dh_auto_configure: debian/control
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--enable-ruby \
+ --enable-php \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
$(CONFFLAGS) \
@@ -75,6 +78,15 @@ override_dh_install-arch:
cp debian/libgeos++-dev.install.in debian/libgeos++-dev.install
find debian/tmp/usr/include/geos -name "*.h" -a ! -name "export.h" | sed -e 's/^debian\/tmp\///' >>debian/libgeos++-dev.install
+ # install PHP module to version specific directory
+ echo 'misc:Depends=phpapi-'$(PHP5API) >> debian/php5-geos.substvars
+
+ -mkdir -p debian/tmp/etc/php5/mods-available/
+ install -m644 debian/geos.ini debian/tmp/etc/php5/mods-available/
+
+ # Strip RPATH
+ chrpath --delete debian/tmp/usr/lib/php5/*/geos.so
+
dh_install --same-arch
# remove the library from the -dev package
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/geos.git
More information about the Pkg-grass-devel
mailing list