File: rules

package info (click to toggle)
choose-mirror 2.79%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,676 kB
  • sloc: perl: 1,192; ansic: 792; sh: 150; makefile: 132
file content (28 lines) | stat: -rwxr-xr-x 844 bytes parent folder | download | duplicates (6)
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
#! /usr/bin/make -f
%:
	dh $@

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

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS :=
else
CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc STRIP=$(DEB_HOST_GNU_TYPE)-strip
endif

override_dh_auto_build:
	# Don't try to sync the mirror masterlist during the build:
	$(MAKE) small $(CROSS) ONLINE=n

override_dh_auto_clean:
	rm -rf debian/locales debian/sort-tmp
	$(MAKE) clean check-masterlist

override_dh_installdebconf:
	dh_installdebconf
	# Sort mirror countries (including translations)
	# MUST be after dh_installdebconf
	./sort-templates
	# Make sure templates are not obviously broken (#834383):
	[ ! -d debian/choose-mirror-bin/DEBIAN ] || grep -qs '^Template:' debian/choose-mirror-bin/DEBIAN/templates