Code

rules: Enable chat-screen feature.
[pkg-ncmpc.git] / debian / rules
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 CHECK = check
24 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
25         CHECK =
26 endif
28 include /usr/share/dpatch/dpatch.make
30 config.status: configure $(DPATCH_STAMPFN)
31         dh_testdir
32         ./configure --host=$(DEB_HOST_GNU_TYPE) \
33                         --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
34                         --mandir=\$${prefix}/share/man \
35                         --disable-mini \
36                         --enable-wide \
37                         --enable-multibyte \
38                         --enable-locale \
39                         --enable-nls \
40                         --enable-colors \
41                         --enable-lirc \
42                         --enable-help-screen \
43                         --enable-mouse \
44                         --enable-artist-screen \
45                         --enable-chat-screen \
46                         --enable-search-screen \
47                         --enable-song-screen \
48                         --enable-key-screen \
49                         --enable-lyrics-screen \
50                         --enable-outputs-screen \
51                         --with-ncursesw \
52                         CFLAGS="$(CFLAGS)"
54 build: build-stamp
56 build-stamp: config.status
57         dh_testdir
58         
59         $(MAKE)
60         test -z '$(CHECK)' || make $(CHECK)
61         
62         touch build-stamp
64 clean: unpatch
65         dh_testdir
66         dh_testroot
67         rm -f build-stamp
68         
69         [ ! -f Makefile ] || $(MAKE) distclean
70         
71         dh_clean
73 install-indep:
74         dh_testdir
75         dh_testroot
76         dh_prep
77         dh_installdirs -i
78         
79         mkdir -p debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
80         cp lyrics/* debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
82 install-arch: build
83         dh_testdir
84         dh_testroot
85         dh_prep
86         dh_installdirs -a
87         
88         $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc
89         
90         rm -rf debian/ncmpc/usr/lib/ncmpc/lyrics/
91         # fail if any of these directories is not empty
92         rmdir debian/ncmpc/usr/lib/ncmpc/
93         rmdir debian/ncmpc/usr/lib/
94         
95         mkdir debian/ncmpc/usr/share/doc/ncmpc/examples
96         mv debian/ncmpc/usr/share/doc/ncmpc/*.sample \
97                 debian/ncmpc/usr/share/doc/ncmpc/examples
98         mv debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
99                 debian/ncmpc/usr/share/doc/ncmpc/examples
101 binary-indep: install-indep
102         dh_testdir
103         dh_testroot
104         dh_installchangelogs -i
105         dh_installdocs -A -i NEWS README AUTHORS
106         dh_compress -i
107         dh_fixperms -i
108         dh_installdeb -i
109         dh_gencontrol -i
110         dh_md5sums -i
111         dh_builddeb -i
113 binary-arch: build install-arch
114         dh_testdir
115         dh_testroot
116         dh_installchangelogs -a
117         dh_installdocs -A -a NEWS README
118         dh_installmenu -a
119         dh_link -a
120         dh_strip -a
121         dh_compress -a
122         dh_fixperms -a
123         dh_installdeb -a
124         dh_shlibdeps -a
125         dh_gencontrol -a
126         dh_md5sums -a
127         dh_builddeb -a
129 binary: binary-arch binary-indep
130 .PHONY: build clean binary-indep binary-arch binary install-indep install-arch