File: rules

package info (click to toggle)
libwx-perl 1%3A0.9928-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,300 kB
  • ctags: 2,322
  • sloc: cpp: 11,044; perl: 8,646; ansic: 710; makefile: 48
file content (39 lines) | stat: -rwxr-xr-x 1,187 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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/make -f

PACKAGE=$(shell dh_listpackages)
TMP     =$(CURDIR)/debian/$(PACKAGE)

DEBIAN_TARGETS := clean binary binary-arch binary-indep build build-arch build-indep

ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')

_DETECTION_CMD := perl -MAlien::wxWidgets -e '$$key = Alien::wxWidgets->key; $$key =~ s/_/-/g; print "$$key";'

$(DEBIAN_TARGETS):
	dh $@ --parallel

override_dh_auto_test:
	xvfb-run -a dh_auto_test --max-parallel=1

override_dh_auto_install:
	dh_auto_install

	# fix permissions
	find $(TMP)/$(ARCHLIB)/Wx -type f -perm /755 -print0 | xargs -r0 chmod -v 664

	# remove bogus man page
	rm -vf "$(TMP)/usr/share/man/man3/Wx::build::MakeMaker::Win32_MSVC.3pm"

override_dh_installexamples:
	dh_installexamples
	chmod 0644 $(TMP)/usr/share/doc/$(PACKAGE)/examples/README.txt
	find $(TMP)/usr/share/doc/$(PACKAGE)/examples -name '*.pl' -exec chmod 0755 {} \;

get_perl_wx_version:
	: $(eval PERL_WX_VERSION := $(shell $(_DETECTION_CMD)))
	@echo PERL_WX_VERSION detected as $(PERL_WX_VERSION)

override_dh_gencontrol: get_perl_wx_version
	dh_gencontrol -- -V'wxperl:Depends=wxperl-$(PERL_WX_VERSION)'

.PHONY: $(DEBIAN_TARGETS) get_perl_wx_version