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 CFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 CFLAGS += -O0
18 else
19 CFLAGS += -O2
20 endif
22 config.status: configure
23 dh_testdir
24 ./configure --host=$(DEB_HOST_GNU_TYPE) \
25 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
26 --mandir=\$${prefix}/share/man \
27 --disable-mini \
28 --enable-wide \
29 --enable-multibyte \
30 --enable-locale \
31 --enable-nls \
32 --enable-colors \
33 --enable-lirc \
34 --enable-help-screen \
35 --enable-mouse \
36 --enable-artist-screen \
37 --enable-search-screen \
38 --enable-song-screen \
39 --enable-key-screen \
40 --enable-lyrics-screen \
41 --enable-outputs-screen \
42 --with-ncursesw \
43 CFLAGS="$(CFLAGS)"
45 build: build-stamp
47 build-stamp: config.status
48 dh_testdir
50 $(MAKE)
52 touch build-stamp
54 clean:
55 dh_testdir
56 dh_testroot
57 rm -f build-stamp
59 [ ! -f Makefile ] || $(MAKE) distclean
61 dh_clean
63 install-indep:
64 dh_testdir
65 dh_testroot
66 dh_prep
67 dh_installdirs -i
69 mkdir -p debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
70 cp lyrics/* debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
72 install-arch: build
73 dh_testdir
74 dh_testroot
75 dh_prep
76 dh_installdirs -a
78 $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc
80 rm -rf debian/ncmpc/usr/lib/ncmpc/lyrics/
81 # fail if any of these directories is not empty
82 rmdir debian/ncmpc/usr/lib/ncmpc/
83 rmdir debian/ncmpc/usr/lib/
85 mkdir debian/ncmpc/usr/share/doc/ncmpc/examples
86 mv debian/ncmpc/usr/share/doc/ncmpc/*.sample \
87 debian/ncmpc/usr/share/doc/ncmpc/examples
88 mv debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
89 debian/ncmpc/usr/share/doc/ncmpc/examples
91 binary-indep: install-indep
92 dh_testdir
93 dh_testroot
94 dh_installchangelogs -i
95 dh_installdocs -A -i NEWS README AUTHORS
96 dh_compress -i
97 dh_fixperms -i
98 dh_installdeb -i
99 dh_gencontrol -i
100 dh_md5sums -i
101 dh_builddeb -i
103 binary-arch: build install-arch
104 dh_testdir
105 dh_testroot
106 dh_installchangelogs -a
107 dh_installdocs -A -a NEWS README
108 dh_installmenu -a
109 dh_link -a
110 dh_strip -a
111 dh_compress -a
112 dh_fixperms -a
113 dh_installdeb -a
114 dh_shlibdeps -a
115 dh_gencontrol -a
116 dh_md5sums -a
117 dh_builddeb -a
119 binary: binary-arch binary-indep
120 .PHONY: build clean binary-indep binary-arch binary install-indep install-arch