File: rules

package info (click to toggle)
phpmd 2.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,428 kB
  • sloc: php: 14,037; xml: 1,619; makefile: 25
file content (33 lines) | stat: -rwxr-xr-x 884 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
#!/usr/bin/make -f

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

%:
	dh $@ --with phpcomposer

override_dh_auto_build:
	phpab \
		--output src/main/php/PHPMD/autoload.php \
		--template debian/autoload.php.tpl \
		src/main/php/PHPMD
	mkdir --parents vendor src/main/php/data/PHPMD
	cp debian/autoload.php vendor
	ln -s ../../../resources src/main/php/data/PHPMD

override_dh_auto_clean:

override_dh_auto_test:
	phpunit --include-path src/main/php

execute_after_dh_install:
	sed -i s,@package_version@,$(UPSTREAM),	 debian/phpmd/usr/bin/phpmd \
		debian/phpmd/usr/share/php/PHPMD/TextUI/Command.php

execute_before_dh_installman:
	mkdir $(CURDIR)/debian/tmp
	cd debian/phpmd/usr/share/php && \
        help2man --no-info --no-discard-stderr \
        --name='PHPMD command line interface' \
        ../../bin/phpmd \
        > $(CURDIR)/debian/tmp/phpmd.1