File: rules

package info (click to toggle)
phpmd 2.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,296 kB
  • sloc: php: 16,210; xml: 2,808; makefile: 26
file content (34 lines) | stat: -rwxr-xr-x 915 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
#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_build:
	phpabtpl composer.json > debian/autoload.php.tpl
	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