File: rules

package info (click to toggle)
nekobee 0.1.8~repack1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 1,176 kB
  • ctags: 1,680
  • sloc: python: 11,173; ansic: 4,425; makefile: 37; sh: 1
file content (50 lines) | stat: -rwxr-xr-x 1,565 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
#!/usr/bin/make -f

upstream_version ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)(\+dfsg\d+)?.*$$/\1/p')
dfsg_version = $(upstream_version)~repack1
pkg = $(shell dpkg-parsechangelog | sed -ne 's/^Source: //p')

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

LDFLAGS+=-Wl,--as-needed

export LINKFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -lm

WAF = ./waf

%:
	dh $@

override_dh_auto_configure:
	$(WAF) configure   --prefix=/usr

override_dh_auto_build:
	$(WAF)

override_dh_auto_clean:
	$(WAF) distclean
	find -name "*.pyc" -delete
	dh_auto_clean

override_dh_auto_install:
	$(WAF) install --destdir=$(CURDIR)/debian/tmp
	mkdir $(CURDIR)/debian/tmp/usr/bin
	cp debian/nekobee.sh $(CURDIR)/debian/tmp/usr/bin/nekobee

# get-orig-source to drop upstream .gitignore file and get rid of waf blob
get-orig-source:
	uscan --force-download
	tar xf ../$(upstream_version).tar.gz
	rm ../$(upstream_version).tar.gz \
	../$(pkg)_$(upstream_version).orig.tar.gz
	rm -fR $(pkg)-$(upstream_version)/.git
	rm -fR $(pkg)-$(upstream_version)/.gitignore
	cd $(pkg)-$(upstream_version) ; python waf --help > /dev/null
	mv $(pkg)-$(upstream_version)/.waf-*/* $(pkg)-$(upstream_version)
	sed -i '/^#==>$$/,$$d' $(pkg)-$(upstream_version)/waf
	rmdir $(pkg)-$(upstream_version)/.waf-*
	find $(pkg)-$(upstream_version)/ -name '*.pyc' -delete
	tar cf $(pkg)_$(dfsg_version).orig.tar $(pkg)-$(upstream_version)
	xz -zf $(pkg)_$(dfsg_version).orig.tar
	rm -rf $(pkg)-$(upstream_version)
	mv $(pkg)_$(dfsg_version).orig.tar.xz ../$(pkg)_$(dfsg_version).orig.tar.xz