1 #!/usr/bin/make -f
2 # debian/rules for ncmpc
3 #
4 # Written by Sebastian Harl <sh@tokkee.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 CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
25 --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
26 --mandir=\$${prefix}/share/man \
27 --enable-wide \
28 --enable-nls \
29 --enable-colors \
30 --enable-lirc \
31 --enable-help-screen \
32 --enable-mouse \
33 --enable-artist-screen \
34 --enable-search-screen \
35 --enable-song-screen \
36 --enable-key-screen \
37 --enable-lyrics-screen \
38 --with-ncursesw
40 build: build-stamp
42 build-stamp: config.status
43 dh_testdir
45 $(MAKE)
47 touch build-stamp
49 clean:
50 dh_testdir
51 dh_testroot
52 rm -f build-stamp
54 [ ! -f Makefile ] || $(MAKE) distclean
56 dh_clean
58 install: build
59 dh_testdir
60 dh_testroot
61 dh_clean -k
62 dh_installdirs -a
64 $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc
66 mkdir $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/examples
67 mv $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/*.sample \
68 $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/examples
69 mv $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
70 $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/examples
71 rm $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/AUTHORS
73 binary-indep:
74 # nothing to do here
76 binary-arch: build install
77 dh_testdir
78 dh_testroot
79 dh_installchangelogs -a
80 dh_installdocs -A -a NEWS README
81 dh_installmenu -a
82 dh_link -a
83 dh_strip -a
84 dh_compress -a
85 dh_fixperms -a
86 dh_installdeb -a
87 dh_shlibdeps -a
88 dh_gencontrol -a
89 dh_md5sums -a
90 dh_builddeb -a
92 binary: binary-arch binary-indep
93 .PHONY: build clean binary-indep binary-arch binary install