Code

rules: Removed trailing whitespace.
[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 $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/examples
71         mv $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/*.sample \
72                 $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/examples
73         mv $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
74                 $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/examples
75         rm $(CURDIR)/debian/ncmpc/usr/share/doc/ncmpc/AUTHORS
76         
77 binary-indep:
78         # nothing to do here
80 binary-arch: build install
81         dh_testdir
82         dh_testroot
83         dh_installchangelogs -a
84         dh_installdocs -A -a NEWS README
85         dh_installmenu -a
86         dh_link -a
87         dh_strip -a
88         dh_compress -a
89         dh_fixperms -a
90         dh_installdeb -a
91         dh_shlibdeps -a
92         dh_gencontrol -a
93         dh_md5sums -a
94         dh_builddeb -a
96 binary: binary-arch binary-indep
97 .PHONY: build clean binary-indep binary-arch binary install