Code

Remove dh_autoreconf which isn't needed anymore.
[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 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
15 CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
16 CFLAGS += -Wall
17 LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
19 CHECK = check
21 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
22         CHECK =
23 endif
25 config.status: configure
26         dh_testdir
27         ./configure --host=$(DEB_HOST_GNU_TYPE) \
28                         --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
29                         --mandir=\$${prefix}/share/man \
30                         --disable-mini \
31                         --enable-wide \
32                         --enable-multibyte \
33                         --enable-locale \
34                         --enable-nls \
35                         --enable-colors \
36                         --enable-lirc \
37                         --enable-help-screen \
38                         --enable-mouse \
39                         --enable-artist-screen \
40                         --enable-chat-screen \
41                         --enable-search-screen \
42                         --enable-song-screen \
43                         --enable-key-screen \
44                         --enable-lyrics-screen \
45                         --enable-outputs-screen \
46                         --enable-documentation \
47                         --with-ncursesw \
48                         CPPFLAGS="$(CPPFLAGS)" \
49                         CFLAGS="$(CFLAGS)" \
50                         LDFLAGS="$(LDFLAGS)"
52 build: build-arch build-indep
53 build-indep:
54 build-arch: 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:
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