File: rules

package info (click to toggle)
snuffleupagus 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,828 kB
  • sloc: ansic: 6,265; php: 127; makefile: 98; python: 79; sh: 3
file content (35 lines) | stat: -rwxr-xr-x 1,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/make -f

#export DH_VERBOSE = 1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
export DEB_CFLAGS_MAINT_APPEND = -Werror

PHP_VERSION := $(shell phpquery -q -V)

%:
	dh $@ --sourcedirectory src --with php

execute_after_dh_auto_clean:
	cd ./src; /usr/bin/phpize --clean

override_dh_auto_configure:
	cd ./src; /usr/bin/phpize
	dh_auto_configure --sourcedirectory src -- --enable-snuffleupagus

override_dh_auto_test:
	REPORT_EXIST_STATUS=1 NO_INTERACTION=1 dh_auto_test --sourcedirectory src

override_dh_auto_install:
	# update configuration file path
	sed -e 's/@PHP_VERSION@/${PHP_VERSION}/' $(CURDIR)/debian/snuffleupagus.ini.in > $(CURDIR)/debian/snuffleupagus.ini

	# phpize uses INSTALL_ROOT instead of DESTDIR
	INSTALL_ROOT=$(CURDIR)/debian/php-snuffleupagus dh_auto_install --sourcedirectory src

	# install default configuration file
	mkdir -p $(CURDIR)/debian/php-snuffleupagus/etc/php/${PHP_VERSION}/conf.d/
	cp $(CURDIR)/config/default.rules $(CURDIR)/debian/php-snuffleupagus/etc/php/${PHP_VERSION}/conf.d/snuffleupagus.rules