File: rules

package info (click to toggle)
taglib-sharp 2.0.3.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,120 kB
  • ctags: 3,330
  • sloc: cs: 26,081; sh: 3,439; makefile: 283
file content (64 lines) | stat: -rwxr-xr-x 2,306 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
63
64
#!/usr/bin/make -f
# -*- makefile -*-

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

MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..

DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)   
DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//')

PACKAGES = $(shell sed -n 's/^Package: //p' $(DEBIAN_DIR)/control)

# provide patch and unpatch targets
include /usr/share/quilt/quilt.make
include /usr/share/cli-common/cli.make

DEB_ABI_VERSION = 2.0

get-orig-source:
	uscan \
		--package $(DEB_SOURCE_NAME) \
		--watchfile $(DEBIAN_DIR)/watch \
		--upstream-version $(VERSION) \
		--download-version $(VERSION) \
		--destdir . \
		--force-download \
		--rename \
		--repack
	if [ -d $(DEB_SOURCE_NAME)-$(VERSION) ]; then \
		echo "$(DEB_SOURCE_NAME)-$(VERSION) is in the way, bailing out!"; \
		exit 1; \
	fi
	tar -xzf $(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
	rm $(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
	rm -r $(DEB_SOURCE_NAME)-$(VERSION)/tests/samples/
	tar -czf $(DEB_SOURCE_NAME)_$(VERSION)+dfsg.orig.tar.gz $(DEB_SOURCE_NAME)-$(VERSION)
	rm -r $(DEB_SOURCE_NAME)-$(VERSION)

override_dh_auto_configure:
	dh_auto_configure -- --prefix=/usr MCS=/usr/bin/mono-csc

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/tmp/usr/lib/cli/taglib-sharp-$(DEB_ABI_VERSION) debian/tmp/usr/share/pkgconfig
	cp src/taglib-sharp.dll debian/tmp/usr/lib/cli/taglib-sharp-$(DEB_ABI_VERSION)/
	cp src/taglib-sharp.dll.mdb debian/tmp/usr/lib/cli/taglib-sharp-$(DEB_ABI_VERSION)/
	cp src/policy.2.0.taglib-sharp.dll debian/tmp/usr/lib/cli/taglib-sharp-$(DEB_ABI_VERSION)/
	cp src/policy.2.0.taglib-sharp.config debian/tmp/usr/lib/cli/taglib-sharp-$(DEB_ABI_VERSION)/

# The -V is there for a reason. Check the changelog for more info. If you dare
# touch this, prepare for the consequences. Breaking the world is one. Me (or
# other taglib-sharp rdeps' maintainers) finding creative ways to cook you alive
# if the breakages come back to me is another. You've been warned.
override_dh_makeclilibs:
	dh_makeclilibs -V

%:
	dh --with=quilt $@

.PHONY: get-orig-source