File: rules

package info (click to toggle)
viva 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,440 kB
  • ctags: 632
  • sloc: cpp: 2,992; ansic: 1,578; makefile: 37
file content (55 lines) | stat: -rwxr-xr-x 1,730 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DH_OPTIONS=

%:
	dh $@ $(DH_OPTIONS)

.PHONE: override_dh_auto_install
override_dh_auto_install:
	dh_auto_install 
	chrpath -d debian/viva/usr/bin/viva
	chrpath -d debian/viva/usr/bin/vv_treemap

.PHONY: override_dh_shlibdeps
override_dh_shlibdeps:
	dh_shlibdeps -a -- --warnings=7

#.PHONY: override_dh_install
#override_dh_install:
#	dh_install --fail-missing --sourcedir=debian/viva

clean:
	dh clean $(DH_OPTIONS)
	$(RM) -r build
	$(RM) -r stamp-*
	# if this is a git repository, restore removed files that would have
	# been ignored by dpkg-source
	-test -d .git && git checkout -- $$(git status | \
		sed -e '/^#[[:space:]]*deleted:[[:space:]]*/s/^#[[:space:]]*deleted:[[:space:]]*//p;d' | \
		grep -v '^debian/')

DEB_SOURCE := $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //')
DEB_VERSION := $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //')
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
GIT_URL = https://github.com/schnorr/viva.git

get-orig-source::
	set -e; if echo $(DEB_VERSION) | grep -c "git"; \
	then \
	        git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\([0-9]*\)*\.\(.*\)-.*$$/\2/g'`; \
	else \
	        git_version=$(DEB_UPSTREAM_VERSION); \
	fi; \
	tmpdir=`mktemp -d -t`; \
	cd $$tmpdir; \
	echo "checkout upstream repository ..."; \
	git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \
	cd `ls | head -n 1`; git checkout -b orig $$git_version; cd ..; \
	tar --exclude=.git -czvf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \
	cd $(CURDIR); \
	rm -rf $$tmpdir