File: rules

package info (click to toggle)
php-codecoverage 2.0.11%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,060 kB
  • ctags: 2,614
  • sloc: php: 5,143; xml: 119; makefile: 34
file content (44 lines) | stat: -rwxr-xr-x 1,298 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
#!/usr/bin/make -f
%:
	dh $@ --with phpcomposer

TEMPL	= /CodeCoverage/Report/HTML/Renderer/Template/
JSROOT	= $(CURDIR)/debian/php-codecoverage/usr/share/php/PHP$(TEMPL)js/

override_dh_auto_build:
	phpab --output $(CURDIR)/src/CodeCoverage/Autoload.php \
		--basedir $(CURDIR)/src/CodeCoverage $(CURDIR)/src

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
else
	@echo "** tests disabled"
endif

override_dh_install:
	dh_install
	# Minify JavaScript files from source
	for i in d3 nv.d3 respond ; do \
		rm $(JSROOT)$${i}.min.js ; \
		uglifyjs -o $(JSROOT)$${i}.min.js \
		$(CURDIR)/debian/missing-sources/$${i}.js ; \
	done

override_dh_installchangelogs:
	dh_installchangelogs debian/upstream/changelog

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

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