File: rules

package info (click to toggle)
mpdris2 0.7%2Bgit20160917-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 324 kB
  • ctags: 208
  • sloc: python: 1,083; makefile: 84; sh: 5
file content (59 lines) | stat: -rwxr-xr-x 1,666 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f

# must be before including anything
debian_dir := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))

include /usr/share/dpkg/default.mk

%:
	dh $@ --with autoreconf,python3 --parallel

override_dh_autoreconf:
	NOCONFIGURE=1 dh_autoreconf ./autogen.sh --

override_dh_auto_configure:
	dh_auto_configure \
		PYTHON=/usr/bin/python3 \
		$(NULL)

override_dh_auto_build:
	dh_auto_build
	sed -e 's!@docdir@!/usr/share/doc/mpdris2!' \
		< debian/mpDris2.1.in \
		> debian/mpDris2.1

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp
	sed -i -e '1s,.*,#!/usr/bin/python3,' debian/tmp/usr/bin/mpDris2

override_dh_install:
	rm -f debian/tmp/usr/share/doc/mpdris2/COPYING
	dh_install --fail-missing

#-- orig tarball for snapshots ----------------------------------------

ORIG_REPO ?= https://github.com/eonpatapon/mpDris2.git
ORIG_RELEASE = 0.7
ORIG_SUFFIX = +git20160917
ORIG_COMMIT = 3c3fe123ce838a2ce5aea2b28ff0c418834a908f

# can't use DEB_SOURCE because this is meant to be invokable from anywhere
get-orig-source:
	set -e; \
	$(debian_dir)/git-archive-orig.py \
		--debian-dir=$(debian_dir) \
		$(ORIG_REPO) \
		$(ORIG_COMMIT) \
		"$$(cd "$(debian_dir)"/.. && dpkg-parsechangelog -SSource)" \
		$(ORIG_RELEASE)$(ORIG_SUFFIX) \
		$(NULL)

# to be invoked from a git checkout with upstream github as a remote;
# tarball ends up in ../build-area
maintainer-get-orig-source:
	set -e; \
	cd ../build-area; \
	$(MAKE) -f $(debian_dir)/rules get-orig-source \
		ORIG_REPO=$(debian_dir)/../.git
	@echo "try using:"
	@echo "gbp import-orig --upstream-vcs-tag=${ORIG_COMMIT} ../build-area/${DEB_SOURCE}_${ORIG_RELEASE}${ORIG_SUFFIX}.orig.tar.xz"