File: rules

package info (click to toggle)
php-codecoverage 6.1.4+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,324 kB
  • sloc: php: 5,958; xml: 924; makefile: 28; sh: 5
file content (37 lines) | stat: -rwxr-xr-x 1,147 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
#!/usr/bin/make -f
%:
	dh $@ --with phpcomposer

TEMPL	= /Report/Html/Renderer/Template/

override_dh_auto_build:
	phpab --output $(CURDIR)/src/autoload.php \
		--template $(CURDIR)/debian/autoload.php.tpl \
		$(CURDIR)/src
	# Minify JavaScript files from source
	mkdir --parents build
	for i in d3 nv.d3 popper ; do \
		uglifyjs -o build/$${i}.min.js \
		$(CURDIR)/debian/missing-sources/$${i}.js ; \
	done
	# Minify CSS file from source
	cssmin < debian/missing-sources/nv.d3.css > build/nv.d3.min.css
	# Workaround to ensure the local class takes precedence during tests.
	mkdir --parents SebastianBergmann
	ln -s ../src SebastianBergmann/CodeCoverage

override_dh_auto_clean:
	rm -rf build SebastianBergmann

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	ln -s /usr/share/javascript/bootstrap/css/bootstrap.min.css $(CURDIR)/src$(TEMPL)css
	ln -s /usr/share/javascript/bootstrap/js/bootstrap.min.js $(CURDIR)/src$(TEMPL)js
	ln -s /usr/share/javascript/jquery/jquery.min.js $(CURDIR)/src$(TEMPL)js
	phpunit
else
	@echo "** tests disabled"
endif

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog-*.md