File: rules

package info (click to toggle)
liblocale-gettext-perl 1.07-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 140 kB
  • ctags: 21
  • sloc: perl: 248; makefile: 16
file content (27 lines) | stat: -rwxr-xr-x 919 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_BUILD_GNU_TYPE      := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE       := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  PERL_VER := $(shell perl -MConfig -e'print "$$Config{version}\n"')
  export PERL5LIB=/usr/lib/$(DEB_HOST_GNU_TYPE)/perl/cross-config-$(PERL_VER)
  CONFIGPM := $(PERL5LIB)/Config.pm
  CONFIGHEAVY := $(PERL5LIB)/Config_heavy.pl

  # sanity check, should be satisfied by the perl-cross-config build dependency
  ifneq ($(CONFIGPM):$(CONFIGHEAVY),$(wildcard $(CONFIGPM)):$(wildcard $(CONFIGHEAVY)))
    $(error Config.pm & Config_heavy.pl for cross building not found in $(PERL5LIB))
  endif
endif

%:
	dh $@

# The generated ${perl:Depends} must be on perl-base and not perl as the
# package is part of the base system
override_dh_perl:
	dh_perl -d