File: rules

package info (click to toggle)
libjson-validator-perl 4.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 828 kB
  • sloc: perl: 2,816; makefile: 14
file content (19 lines) | stat: -rwxr-xr-x 591 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/make -f

SKIP_TESTS=$(shell cat debian/tests/pkg-perl/smoke-skip)
TEST_FILES = $(filter-out $(SKIP_TESTS), $(wildcard t/*.t))

%:
	dh $@

override_dh_auto_test:
	RES_OPTIONS=attempts:0 http_proxy= dh_auto_test -- TEST_FILES="$(TEST_FILES)"

override_dh_install:
	dh_install
	find /usr/share/openapi-specification/schemas -name schema.json \
		| while read SCHEMA; \
		  do jq '.["id"]' $${SCHEMA} | tr -d '"' \
			| perl -pe 's/#?\n$$//' | md5sum | cut -d ' ' -f 1 \
			| xargs -i ln -s $${SCHEMA} debian/libjson-validator-perl/usr/share/perl5/JSON/Validator/cache/{}; \
		  done