File: rules

package info (click to toggle)
phpunit 9.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 24,872 kB
  • sloc: php: 47,103; xml: 1,386; makefile: 37; sh: 8
file content (49 lines) | stat: -rwxr-xr-x 1,709 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
49
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk
UPSTREAM := $(DEB_VERSION_UPSTREAM)

%:
	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 data
	phpab \
		--output vendor/autoload.php \
		--template debian/autoload.tests.php.tpl \
		--exclude tests/_files/BankAccountTest2.php \
		--exclude tests/end-to-end/migration/possibility-to-migrate-from-92-is-detected/src/Greeter.php \
		--exclude tests/end-to-end/migration/possibility-to-migrate-from-92-is-detected/tests/GreeterTest.php \
		--exclude tests/end-to-end/regression/Trac/783/OneTest.php \
		--exclude tests/end-to-end/regression/GitHub/2448/Test.php \
		--exclude tests/end-to-end/regression/GitHub/3889/MyIssue3889Test.php \
		--exclude tests/end-to-end/regression/GitHub/3904/Issue3904Test.php \
		--exclude tests/end-to-end/regression/GitHub/4376/tests/Test.php \
		tests
	# Workaround to ensure the local class takes precedence during tests.
	ln -s src PHPUnit
	# Mimic phpunit.xsd path
	ln -s .. data/PHPUnit

override_dh_auto_clean:

override_dh_auto_test:
	./phpunit

execute_before_dh_installman:
	mkdir --parent $(CURDIR)/debian/tmp
	help2man \
		--help-option=\  \
		--version-string=$(UPSTREAM) \
		--source="phpunit $(UPSTREAM)" \
		--no-info \
		--include=$(CURDIR)/debian/phpunit.1.in \
		"echo -n Usage: && ./phpunit --help|tail -n+4|sed 's/^  phpunit \[options\] <directory>/  or: phpunit [options] <directory>/'" \
		> $(CURDIR)/debian/tmp/phpunit.1

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