2a47178a5a614ad5481ccbf771bab6b48f45e4fa
1 #!/usr/bin/make -f
2 # debian/rules for ncmpc
3 #
4 # Written by Sebastian Harl <tokkee@debian.org>
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
15 CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
16 CFLAGS += -Wall
17 LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
19 CHECK = check
21 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
22 CHECK =
23 endif
25 config.status: configure
26 dh_testdir
27 dh_autoreconf
28 ./configure --host=$(DEB_HOST_GNU_TYPE) \
29 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
30 --mandir=\$${prefix}/share/man \
31 --disable-mini \
32 --enable-wide \
33 --enable-multibyte \
34 --enable-locale \
35 --enable-nls \
36 --enable-colors \
37 --enable-lirc \
38 --enable-help-screen \
39 --enable-mouse \
40 --enable-artist-screen \
41 --enable-chat-screen \
42 --enable-search-screen \
43 --enable-song-screen \
44 --enable-key-screen \
45 --enable-lyrics-screen \
46 --enable-outputs-screen \
47 --enable-documentation \
48 --with-ncursesw \
49 CPPFLAGS="$(CPPFLAGS)" \
50 CFLAGS="$(CFLAGS)" \
51 LDFLAGS="$(LDFLAGS)"
53 build: build-arch build-indep
54 build-indep:
55 build-arch: build-stamp
57 build-stamp: config.status
58 dh_testdir
60 $(MAKE)
61 test -z '$(CHECK)' || make $(CHECK)
63 touch build-stamp
65 clean:
66 dh_testdir
67 dh_testroot
68 rm -f build-stamp
70 [ ! -f Makefile ] || $(MAKE) distclean
72 dh_clean
74 install-indep:
75 dh_testdir
76 dh_testroot
77 dh_prep
78 dh_installdirs -i
80 mkdir -p debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
81 cp lyrics/* debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
83 install-arch: build
84 dh_testdir
85 dh_testroot
86 dh_prep
87 dh_installdirs -a
89 $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc
91 rm -rf debian/ncmpc/usr/lib/ncmpc/lyrics/
92 # fail if any of these directories is not empty
93 rmdir debian/ncmpc/usr/lib/ncmpc/
94 rmdir debian/ncmpc/usr/lib/
96 mkdir debian/ncmpc/usr/share/doc/ncmpc/examples
97 mv debian/ncmpc/usr/share/doc/ncmpc/*.sample \
98 debian/ncmpc/usr/share/doc/ncmpc/examples
99 mv debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
100 debian/ncmpc/usr/share/doc/ncmpc/examples
102 binary-indep: install-indep
103 dh_testdir
104 dh_testroot
105 dh_installchangelogs -i
106 dh_installdocs -A -i NEWS README AUTHORS
107 dh_compress -i
108 dh_fixperms -i
109 dh_installdeb -i
110 dh_gencontrol -i
111 dh_md5sums -i
112 dh_builddeb -i
114 binary-arch: build install-arch
115 dh_testdir
116 dh_testroot
117 dh_installchangelogs -a
118 dh_installdocs -A -a NEWS README
119 dh_installmenu -a
120 dh_link -a
121 dh_strip -a
122 dh_compress -a
123 dh_fixperms -a
124 dh_installdeb -a
125 dh_shlibdeps -a
126 dh_gencontrol -a
127 dh_md5sums -a
128 dh_builddeb -a
130 binary: binary-arch binary-indep
131 .PHONY: build clean binary-indep binary-arch binary install-indep install-arch