File: rules

package info (click to toggle)
cmus 2.7.1%2Bgit20160225-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,820 kB
  • sloc: ansic: 35,866; sh: 1,548; makefile: 260; python: 159
file content (60 lines) | stat: -rwxr-xr-x 1,853 bytes parent folder | download | duplicates (2)
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
# -*- makefile -*-

LDFLAGS+=-Wl,--as-needed
CFLAGS+=-I/usr/include/ncursesw

suggested_deps = pulse roar jack

EXTRA_CMUS_DIR_OP_PLUGINS = debian/cmus/usr/lib/cmus/op/
EXTRA_CMUS_PLUGINS := $(foreach plugin,$(suggested_deps),$(plugin).so)

%:
	dh $@ --with bash-completion

override_dh_auto_configure:
	./configure \
		prefix=/usr \
		CONFIG_ARTS=n \
		DEBUG=0

override_dh_auto_build:
	# Pass V=2 to make to enable verbose build logs, which is useful for
	# porters, sorting out build hardening issues, etc.
	dh_auto_build -- V=2

override_dh_install:
	dh_install -pcmus
	dh_movefiles -pcmus-plugin-ffmpeg --sourcedir=debian/cmus/ \
		/usr/lib/cmus/ip/ffmpeg.so

override_dh_installdocs:
	dh_installdocs
	# do not install zsh and bash completion twice
	rm debian/cmus/usr/share/doc/cmus/contrib/_cmus \
		debian/cmus/usr/share/doc/cmus/contrib/cmus.bash-completion

override_dh_shlibdeps:
	dh_shlibdeps -pcmus $(foreach plugin,$(EXTRA_CMUS_PLUGINS),-X$(plugin))
	dpkg-shlibdeps -O -dSuggests \
		$(foreach plugin,$(EXTRA_CMUS_PLUGINS),$(EXTRA_CMUS_DIR_OP_PLUGINS)$(plugin)) \
		>> debian/cmus.substvars
	dh_shlibdeps --remaining-packages

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