|
| 1 | +#!/usr/bin/make -f |
| 2 | + |
| 3 | +# Copied from dh-php: /usr/share/dh-php/pkg-pecl.mk |
| 4 | + |
| 5 | +# See debhelper(7) (uncomment to enable) |
| 6 | +# output every command that modifies files on the build system. |
| 7 | +#DH_VERBOSE = 1 |
| 8 | + |
| 9 | +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* |
| 10 | +DPKG_EXPORT_BUILDFLAGS = 1 |
| 11 | +include /usr/share/dpkg/default.mk |
| 12 | + |
| 13 | +# see FEATURE AREAS in dpkg-buildflags(1) |
| 14 | +export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 15 | + |
| 16 | +# see ENVIRONMENT in dpkg-buildflags(1) |
| 17 | +# package maintainers to append CFLAGS |
| 18 | +export DEB_CFLAGS_MAINT_APPEND = -Wall |
| 19 | +# package maintainers to append LDFLAGS |
| 20 | +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed |
| 21 | + |
| 22 | +# Don't ever use RPATH on Debian |
| 23 | +export PHP_RPATH=no |
| 24 | + |
| 25 | +export DH_PHP_VERSIONS = $(PHP_VERSION) |
| 26 | + |
| 27 | +PECL_NAME := cassandra-driver |
| 28 | +INSTALL_ROOT = $(CURDIR)/debian/php$(PHP_VERSION)-cassandra-driver |
| 29 | + |
| 30 | +%: |
| 31 | + dh $@ --with php |
| 32 | + |
| 33 | +override_dh_auto_configure: |
| 34 | + phpize$(PHP_VERSION) |
| 35 | + dh_auto_configure -- --with-cassandra --with-php-config=/usr/bin/php-config$(PHP_VERSION) $(PECL_CONFIGURE_MAINT_APPEND) |
| 36 | + |
| 37 | +override_dh_auto_build: |
| 38 | + dh_auto_build -- -j$(NUMJOBS) |
| 39 | + |
| 40 | +override_dh_auto_install: |
| 41 | + dh_auto_install -- INSTALL_ROOT=$(INSTALL_ROOT) |
| 42 | + |
| 43 | +override_dh_gencontrol: ,:=, |
| 44 | +override_dh_gencontrol: |
| 45 | + dh_gencontrol -- "-Vphp:Provides=$(addprefix php,$(addsuffix -$(PECL_NAME)$(,) ,$(PHP_VERSION)))" |
| 46 | + |
| 47 | +override_dh_php: |
| 48 | + dh_php -p php$(PHP_VERSION)-$(PECL_NAME) |
| 49 | + |
0 commit comments