File: rules

package info (click to toggle)
libcoverart 1.0.0%2Bgit20140109-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 424 kB
  • ctags: 285
  • sloc: cpp: 2,213; ansic: 303; xml: 63; makefile: 47
file content (60 lines) | stat: -rwxr-xr-x 1,759 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
#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

%:
	dh $@ --parallel --builddirectory=$(CURDIR)

override_dh_auto_clean:
	dh_auto_clean
	rm -rf docs
	# This needs to be fixed in upstream's build system.
	rm -f CMakeCache.txt \
		Doxyfile \
		Makefile \
		config.h \
		install_manifest.txt \
		libcoverart.pc \
		ImportExecutables.cmake
	find -name CMakeFiles -print | xargs /bin/rm -rf
	find -name Makefile -delete
	find -name cmake_install.cmake -delete

override_dh_auto_configure:
	dh_auto_configure -- \
		-DLIB_SUFFIX=/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_build-indep:
	$(MAKE) docs
	rm docs/jquery.js
	ln -s /usr/share/javascript/jquery/jquery.js docs/jquery.js

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

override_dh_strip:
	dh_strip --dbg-package=libcoverart-dbg

override_dh_makeshlibs:
	dh_makeshlibs -V 'libcoverart0 (>= 1.0)'

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=39dd2c520b6c225b3c3186553bfe89f37f403a41
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