File: rules

package info (click to toggle)
php-codecoverage 4.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,524 kB
  • ctags: 2,641
  • sloc: php: 5,670; xml: 439; makefile: 33; sh: 5
file content (43 lines) | stat: -rwxr-xr-x 1,398 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
#!/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
	for i in d3 holder nv.d3 respond ; 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

override_dh_auto_clean:
	rm -rf build/coverage
	rm -rf build/logs

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
	ln -s /usr/share/twitter-bootstrap/files/html5shiv/html5shiv.min.js $(CURDIR)/src$(TEMPL)js
	phpunit --configuration build/phpunit.xml
else
	@echo "** tests disabled"
endif

override_dh_installchangelogs:
	for i in $$(ls ChangeLog-*.md -r) debian/upstream/changelog; do cat $$i >> CHANGELOG && echo '' >> CHANGELOG; done
	dh_installchangelogs

override_dh_link:
	rm -r $(CURDIR)/debian/php-codecoverage/usr/share/php/SebastianBergmann/CodeCoverage$(TEMPL)fonts
	dh_link

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