Code

rules: Do not remove AUTHORS from the package.
[pkg-ncmpc.git] / debian / rules
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                         --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
44 build: build-stamp
46 build-stamp: config.status
47         dh_testdir
48         
49         $(MAKE)
50         
51         touch build-stamp
53 clean:
54         dh_testdir
55         dh_testroot
56         rm -f build-stamp
57         
58         [ ! -f Makefile ] || $(MAKE) distclean
59         
60         dh_clean
62 install: build
63         dh_testdir
64         dh_testroot
65         dh_clean -k
66         dh_installdirs -a
67         
68         $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc
69         
70         mkdir debian/ncmpc/usr/share/doc/ncmpc/examples
71         mv debian/ncmpc/usr/share/doc/ncmpc/*.sample \
72                 debian/ncmpc/usr/share/doc/ncmpc/examples
73         mv debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
74                 debian/ncmpc/usr/share/doc/ncmpc/examples
76 binary-indep:
77         # nothing to do here
79 binary-arch: build install
80         dh_testdir
81         dh_testroot
82         dh_installchangelogs -a
83         dh_installdocs -A -a NEWS README
84         dh_installmenu -a
85         dh_link -a
86         dh_strip -a
87         dh_compress -a
88         dh_fixperms -a
89         dh_installdeb -a
90         dh_shlibdeps -a
91         dh_gencontrol -a
92         dh_md5sums -a
93         dh_builddeb -a
95 binary: binary-arch binary-indep
96 .PHONY: build clean binary-indep binary-arch binary install