File: rules

package info (click to toggle)
libcoverart 1.0.0%2Bgit20150706-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 456 kB
  • sloc: cpp: 2,213; ansic: 303; sh: 91; xml: 63; makefile: 28
file content (37 lines) | stat: -rwxr-xr-x 1,163 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH)

override_dh_auto_build-indep:
	dh_auto_build -- docs
	find obj-*/docs -name *.md5 -delete

override_dh_auto_test-indep override_dh_auto_install-indep:
	# no tests and install for indep

override_dh_installchangelogs:
	dh_installchangelogs NEWS.txt

DEB_DEBDIR=$(dir $(firstword $(MAKEFILE_LIST)))
DEB_UPSTREAM_VER=$(shell dpkg-parsechangelog -l$(DEB_DEBDIR)/changelog \
	| sed -ne 's/^Version: \(.*\)-[^-]*/\1/p' | sed -ne 's/^\([^+]*\)+git.*/\1/p')
COMMIT=3e8e68e971f632dd85788e738d3e5a3bd3d08b07
get-orig-source:
	TMPD=`mktemp -d` && \
		git clone https://github.com/metabrainz/libcoverart \
			"$$TMPD/libcoverart" && \
		git --git-dir="$$TMPD/libcoverart/.git" archive \
			--prefix=libcoverart/ $(COMMIT) | \
			xz > $$TMPD/libcoverart.tar.xz && \
		CDATE=`git --git-dir="$$TMPD/libcoverart/.git" show \
			--format=format:%ci -s $(COMMIT) | \
			awk '{ gsub(/-/,""); print $$1 }'` && \
		mv $$TMPD/libcoverart.tar.xz \
			libcoverart_$(DEB_UPSTREAM_VER)+git$$CDATE.orig.tar.xz && \
		rm -rf $$TMPD