File: rules

package info (click to toggle)
php-dompdf 2.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,176 kB
  • sloc: php: 22,518; sh: 91; xml: 80; makefile: 52
file content (64 lines) | stat: -rwxr-xr-x 3,656 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/make -f

%:
	dh $@

DEB_DIR=$(CURDIR)/debian/php-dompdf

execute_before_dh_auto_build:
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf lib/fonts/DejaVuSans-Bold.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSans-BoldOblique.ttf lib/fonts/DejaVuSans-BoldOblique.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSans-Oblique.ttf lib/fonts/DejaVuSans-Oblique.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf lib/fonts/DejaVuSans.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf lib/fonts/DejaVuSansMono-Bold.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSansMono-BoldOblique.ttf lib/fonts/DejaVuSansMono-BoldOblique.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf lib/fonts/DejaVuSansMono-Oblique.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf lib/fonts/DejaVuSansMono.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf lib/fonts/DejaVuSerif-Bold.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif-BoldItalic.ttf lib/fonts/DejaVuSerif-BoldItalic.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif-Italic.ttf lib/fonts/DejaVuSerif-Italic.ttf
	ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf lib/fonts/DejaVuSerif.ttf
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationMono-Bold.ttf -o lib/fonts/Courier-Bold.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationMono-BoldItalic.ttf -o lib/fonts/Courier-BoldOblique.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationMono-Italic.ttf -o lib/fonts/Courier-Oblique.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationMono-Regular.ttf -o lib/fonts/Courier.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSans-Bold.ttf -o lib/fonts/Helvetica-Bold.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSans-BoldItalic.ttf -o lib/fonts/Helvetica-BoldOblique.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSans-Italic.ttf -o lib/fonts/Helvetica-Oblique.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSans-Regular.ttf -o lib/fonts/Helvetica.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSerif-Bold.ttf -o lib/fonts/Times-Bold.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSerif-BoldItalic.ttf -o lib/fonts/Times-BoldItalic.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSerif-Italic.ttf -o lib/fonts/Times-Italic.afm
	ttf2afm /usr/share/fonts/truetype/liberation2/LiberationSerif-Regular.ttf -o lib/fonts/Times-Roman.afm
	# before building the package throw out installed-fonts.dist.json:
	# mk-origtargz ../php-dompdf_2.0.0+dfsg.orig.tar.xz
	debian/bin/create-fonts-list.sh

override_dh_auto_build:
	phpabtpl --require-file lib/Cpdf.php composer.json > debian/autoload.php.tpl
	phpab --output src/autoload.php \
		--template debian/autoload.php.tpl \
		src/

override_dh_auto_test:
	phpabtpl --require-file ../lib/Cpdf.php composer.json > debian/autoload.php.tpl
	mkdir -p vendor
	phpab --output vendor/autoload.php \
		--template debian/autoload.php.tpl \
		src/
	phpabtpl --require mockery/mockery --require-file ../vendor/autoload.php > debian/autoload.tests.php.tpl
	phpab --output tests/autoload.php \
		--template debian/autoload.tests.php.tpl \
		tests/

	phpunit --no-coverage --bootstrap tests/autoload.php
	phpunit --no-coverage --bootstrap tests/autoload.php debian/tests/

override_dh_installchangelogs:
	dh_installchangelogs debian/upstream/changelog

override_dh_fixperms:
	dh_fixperms
	#chown www-data:www-data	$(DEB_DIR)/var/cache/php-dompdf/fonts
	chmod 2775		$(DEB_DIR)/var/cache/php-dompdf/fonts
	chmod 2775		$(DEB_DIR)/var/cache/php-dompdf/tmp