File: rules

package info (click to toggle)
pangzero 1.4.1%2Bgit20121103-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,644 kB
  • ctags: 340
  • sloc: perl: 4,105; makefile: 24
file content (30 lines) | stat: -rwxr-xr-x 1,030 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
#!/usr/bin/make -f
PKD := $(abspath $(dir $(MAKEFILE_LIST)))
VER := $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | cut -d- -f1)
PKG := pangzero
UURL := https://github.com/kthakore/pangzero.git
COMMIT := 422ce004be3b32de4f301feb83c0731f18779aad


%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- --install_path script=/usr/games

.PHONY: get-orig-source
## http://wiki.debian.org/onlyjob/get-orig-source
get-orig-source:
	@echo "# Cloning upstream git repository..."
	git clone $(UURL) $(PKG)-$(VER) \
	|| $(RM) -r $(PKG)-$(VER)
	cd $(PKG)-$(VER) \
	&& git checkout -b debiansource $(COMMIT) \
	&& echo "# Setting times..." \
	&& for F in $$(git ls-tree -r --name-only HEAD); \
	do touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; done \
	&& $(RM) -r .git .git*
	@echo "# Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
	| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
	&& $(RM) -r "$(PKG)-$(VER)"