File: rules

package info (click to toggle)
libmusicbrainz5 5.1.0+git20150707-9
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 956 kB
  • sloc: cpp: 9,826; ansic: 923; xml: 352; sh: 91; 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

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

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
	rm -f obj-*/docs/*.md5

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

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=97f98a6e04d6ae0bc7c1a7f8003e25b6c364d59b
get-orig-source:
	TMPD=`mktemp -d` && \
		git clone https://github.com/metabrainz/libmusicbrainz \
			"$$TMPD/libmusicbrainz" && \
		git --git-dir="$$TMPD/libmusicbrainz/.git" archive \
			--prefix=libmusicbrainz/ $(COMMIT) | \
			xz > $$TMPD/libmusicbrainz.tar.xz && \
		CDATE=`git --git-dir="$$TMPD/libmusicbrainz/.git" show \
			--format=format:%ci -s $(COMMIT) | \
			awk '{ gsub(/-/,""); print $$1 }'` && \
		mv $$TMPD/libmusicbrainz.tar.xz \
			libmusicbrainz5_$(DEB_UPSTREAM_VER)+git$$CDATE.orig.tar.xz && \
		rm -rf $$TMPD