Skip to content

Commit

Permalink
Updated packaging for PHP 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenick committed Aug 11, 2017
1 parent 7ce6e2b commit 1333d83
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext/packaging/debian-php7.1/cassandra.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=cassandra.so
1 change: 1 addition & 0 deletions ext/packaging/debian-php7.1/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
22 changes: 22 additions & 0 deletions ext/packaging/debian-php7.1/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Source: php7.1-cassandra-driver
Section: php
Priority: optional
Maintainer: Michael Penick <[email protected]>
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.
9 changes: 9 additions & 0 deletions ext/packaging/debian-php7.1/copyright
Original file line number Diff line number Diff line change
@@ -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'.
1 change: 1 addition & 0 deletions ext/packaging/debian-php7.1/php7.1-cassandra-driver.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod debian/cassandra.ini
49 changes: 49 additions & 0 deletions ext/packaging/debian-php7.1/rules
Original file line number Diff line number Diff line change
@@ -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)

1 change: 1 addition & 0 deletions ext/packaging/debian-php7.1/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 1333d83

Please sign in to comment.