File: rules

package info (click to toggle)
lv2 1.14.0~dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,532 kB
  • sloc: python: 16,370; ansic: 4,992; xml: 182; sh: 76; makefile: 45
file content (62 lines) | stat: -rwxr-xr-x 1,970 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
60
61
62
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/architecture.mk

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

WAF = ./waf

PLUGINS = $(shell cd plugins && find . -mindepth 1 -maxdepth 1 -type d -exec basename {} \;)

%:
	dh $@

override_dh_auto_configure:
	$(WAF) configure --prefix=/usr \
		--mandir=/usr/share/man \
		--strict

override_dh_auto_build:
	$(WAF)

override_dh_auto_clean:
	$(WAF) clean || true
	find -name "*.pyc" -delete
	dh_auto_clean

override_dh_auto_install:
	$(WAF) install --destdir=$(CURDIR)/debian/tmp

override_dh_install:
	dh_install
	for plugin in `cat debian/lv2-examples.install`; do \
		rm -rf debian/lv2-dev/$$plugin ; \
	done
	# move .pc files to a multiarch directory
	mkdir debian/lv2-dev/usr/lib/$(DEB_HOST_MULTIARCH)
	mv debian/lv2-dev/usr/lib/pkgconfig debian/lv2-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig

override_dh_installchangelogs:
	dh_installchangelogs NEWS

# get-orig-source to drop waf
get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=.
	tar -xf $(pkg)_$(upstream_version).orig.tar.bz2
	mv $(pkg)-$(upstream_version) $(pkg)-$(dfsg_version)
	cd $(pkg)-$(dfsg_version) ; python waf --help > /dev/null
	mv $(pkg)-$(dfsg_version)/.waf-*/* $(pkg)-$(dfsg_version)
	sed -i '/^#==>$$/,$$d' $(pkg)-$(dfsg_version)/waf
	rmdir $(pkg)-$(dfsg_version)/.waf-*
	find $(pkg)-$(dfsg_version)/ -name '*.pyc' -delete
	rm $(pkg)-$(dfsg_version)/plugins/*/waf
	tar cf $(pkg)_$(dfsg_version).orig.tar $(pkg)-$(dfsg_version)
	bzip2 -9f $(pkg)_$(dfsg_version).orig.tar
	rm -rf $(pkg)-$(dfsg_version)
	mv $(pkg)_$(dfsg_version).orig.tar.bz2 ../$(pkg)_$(dfsg_version).orig.tar.bz2
	mv $(pkg)_$(upstream_version).orig.tar.bz2 ../$(pkg)_$(upstream_version).orig.tar.bz2