File: rules

package info (click to toggle)
phpunit 5.4.6-2~deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,052 kB
  • ctags: 4,582
  • sloc: php: 20,208; xml: 685; makefile: 36
file content (48 lines) | stat: -rwxr-xr-x 1,224 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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/make -f

UPSTREAM := $(shell dpkg-parsechangelog | grep -E -e '^Version:' | sed -r 's/^[^:]+: (.*)-[^-]+$$/\1/')

%:
	dh $@ --with phpcomposer

override_dh_auto_build:
	# Build static classloader for shipping
	phpab --output src/Autoload.php \
		--template debian/Autoload.php.tpl src
	# Build classloader for tests
	mkdir --parents vendor
	phpab \
		--output vendor/autoload.php \
		--template debian/autoload.php.tpl \
		--exclude tests/_files/BankAccountTest2.php \
		tests
	# Workaround to ensure the local class takes precedence during tests.
	ln -s src PHPUnit

override_dh_auto_clean:
	rm -rf vendor

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	./phpunit
else
	@echo "** tests disabled"
endif

override_dh_installman:
	mkdir --parent $(CURDIR)/debian/tmp
	help2man \
		--help-option=\  \
		--version-string=$(UPSTREAM) \
		--no-info \
		--include=$(CURDIR)/debian/phpunit.1.in \
		"./phpunit --help|tail -n+3|sed 's/^       phpunit/   or: phpunit/'" \
		> $(CURDIR)/debian/tmp/phpunit.1
	dh_installman

override_dh_installchangelogs:
	for i in $$(ls ChangeLog-*.md -r); do cat $$i >> CHANGELOG; done
	dh_installchangelogs

get-orig-source:
	uscan --rename --verbose --force