File: rules

package info (click to toggle)
php-dompdf 3.1.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,900 kB
  • sloc: php: 26,940; sh: 118; xml: 100; makefile: 31
file content (46 lines) | stat: -rwxr-xr-x 1,586 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
#!/usr/bin/make -f

%:
	dh $@

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

execute_before_dh_auto_build:
	# Link all fonts that would be linked at install time
	debian/bin/install-local-fonts.sh

	# The file lib/fonts/installed-fonts.dist.json was dfsg removed, add it back
	# Last checked: 07/2024 for 3.0.0, in sync with upstream
	debian/bin/create-fonts-list.sh

override_dh_auto_build:
	phpab --output src/autoload.php \
		--template debian/autoload.package.php.tpl \
		src/
	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/
	debian/bin/generate-font-metrics.sh

override_dh_auto_test:
	phpabtpl \
		--require mockery/mockery --require symfony/process \
		--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 --display-deprecations --display-phpunit-deprecations --do-not-cache-result --bootstrap tests/autoload.php
	# Dompdf test requires installed-fonts.dist.json in the installed paths
	phpunit --no-coverage --display-deprecations --display-phpunit-deprecations --do-not-cache-result --bootstrap tests/autoload.php debian/tests/CpdfTest.php

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