From 1333d835130e07f0b517fc431d4b1aa45eed27a5 Mon Sep 17 00:00:00 2001 From: Michael Penick Date: Fri, 11 Aug 2017 12:29:38 -0700 Subject: [PATCH] Updated packaging for PHP 7.1 --- ext/packaging/debian-php7.1/cassandra.ini | 1 + ext/packaging/debian-php7.1/compat | 1 + ext/packaging/debian-php7.1/control | 22 +++++++++ ext/packaging/debian-php7.1/copyright | 9 ++++ .../debian-php7.1/php7.1-cassandra-driver.php | 1 + ext/packaging/debian-php7.1/rules | 49 +++++++++++++++++++ ext/packaging/debian-php7.1/source/format | 1 + 7 files changed, 84 insertions(+) create mode 100644 ext/packaging/debian-php7.1/cassandra.ini create mode 100644 ext/packaging/debian-php7.1/compat create mode 100644 ext/packaging/debian-php7.1/control create mode 100644 ext/packaging/debian-php7.1/copyright create mode 100644 ext/packaging/debian-php7.1/php7.1-cassandra-driver.php create mode 100755 ext/packaging/debian-php7.1/rules create mode 100644 ext/packaging/debian-php7.1/source/format diff --git a/ext/packaging/debian-php7.1/cassandra.ini b/ext/packaging/debian-php7.1/cassandra.ini new file mode 100644 index 000000000..9dec4e58a --- /dev/null +++ b/ext/packaging/debian-php7.1/cassandra.ini @@ -0,0 +1 @@ +extension=cassandra.so diff --git a/ext/packaging/debian-php7.1/compat b/ext/packaging/debian-php7.1/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/ext/packaging/debian-php7.1/compat @@ -0,0 +1 @@ +9 diff --git a/ext/packaging/debian-php7.1/control b/ext/packaging/debian-php7.1/control new file mode 100644 index 000000000..645141d2b --- /dev/null +++ b/ext/packaging/debian-php7.1/control @@ -0,0 +1,22 @@ +Source: php7.1-cassandra-driver +Section: php +Priority: optional +Maintainer: Michael Penick +Build-Depends: debhelper (>= 9~), + dh-php (>= 0.10~), + php7.1-dev, + dh-php, + pkg-config, + cassandra-cpp-driver-dev (>= 2.7.0) +Homepage: http://datastax.github.io/php-driver/ + +Package: php7.1-cassandra-driver +Architecture: any +Depends: ${misc:Depends}, + ${php:Depends}, + ${shlibs:Depends}, + cassandra-cpp-driver (>= 2.7.0) +Provides: ${php:Provides} +Description: Modern, feature-rich and highly tunable PHP client library for + Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using exclusively + Cassandra's binary protocol and Cassandra Query Language v3. diff --git a/ext/packaging/debian-php7.1/copyright b/ext/packaging/debian-php7.1/copyright new file mode 100644 index 000000000..3f471dad8 --- /dev/null +++ b/ext/packaging/debian-php7.1/copyright @@ -0,0 +1,9 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: php7.1-cassandra-driver +Source: https://github.com/datastax/php-driver + +Files: * +Copyright: Copyright 2014-2017 DataStax +License: Apache-2.0 + On Debian systems, the complete text of the Apache License Version 2.0 + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/ext/packaging/debian-php7.1/php7.1-cassandra-driver.php b/ext/packaging/debian-php7.1/php7.1-cassandra-driver.php new file mode 100644 index 000000000..286184276 --- /dev/null +++ b/ext/packaging/debian-php7.1/php7.1-cassandra-driver.php @@ -0,0 +1 @@ +mod debian/cassandra.ini diff --git a/ext/packaging/debian-php7.1/rules b/ext/packaging/debian-php7.1/rules new file mode 100755 index 000000000..ff1894aad --- /dev/null +++ b/ext/packaging/debian-php7.1/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copied from dh-php: /usr/share/dh-php/pkg-pecl.mk + +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +export DEB_CFLAGS_MAINT_APPEND = -Wall +# package maintainers to append LDFLAGS +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +# Don't ever use RPATH on Debian +export PHP_RPATH=no + +export DH_PHP_VERSIONS = $(PHP_VERSION) + +PECL_NAME := cassandra-driver +INSTALL_ROOT = $(CURDIR)/debian/php$(PHP_VERSION)-cassandra-driver + +%: + dh $@ --with php + +override_dh_auto_configure: + phpize$(PHP_VERSION) + dh_auto_configure -- --with-cassandra --with-php-config=/usr/bin/php-config$(PHP_VERSION) $(PECL_CONFIGURE_MAINT_APPEND) + +override_dh_auto_build: + dh_auto_build -- -j$(NUMJOBS) + +override_dh_auto_install: + dh_auto_install -- INSTALL_ROOT=$(INSTALL_ROOT) + +override_dh_gencontrol: ,:=, +override_dh_gencontrol: + dh_gencontrol -- "-Vphp:Provides=$(addprefix php,$(addsuffix -$(PECL_NAME)$(,) ,$(PHP_VERSION)))" + +override_dh_php: + dh_php -p php$(PHP_VERSION)-$(PECL_NAME) + diff --git a/ext/packaging/debian-php7.1/source/format b/ext/packaging/debian-php7.1/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/ext/packaging/debian-php7.1/source/format @@ -0,0 +1 @@ +3.0 (quilt)