Code

control: Build-depend on libmpdclient-dev (>= 2.5~).
[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-search-screen \
46                         --enable-song-screen \
47                         --enable-key-screen \
48                         --enable-lyrics-screen \
49                         --enable-outputs-screen \
50                         --with-ncursesw \
51                         CFLAGS="$(CFLAGS)"
53 build: build-stamp
55 build-stamp: config.status
56         dh_testdir
57         
58         $(MAKE)
59         test -z '$(CHECK)' || make $(CHECK)
60         
61         touch build-stamp
63 clean: unpatch
64         dh_testdir
65         dh_testroot
66         rm -f build-stamp
67         
68         [ ! -f Makefile ] || $(MAKE) distclean
69         
70         dh_clean
72 install-indep:
73         dh_testdir
74         dh_testroot
75         dh_prep
76         dh_installdirs -i
77         
78         mkdir -p debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
79         cp lyrics/* debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
81 install-arch: build
82         dh_testdir
83         dh_testroot
84         dh_prep
85         dh_installdirs -a
86         
87         $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc
88         
89         rm -rf debian/ncmpc/usr/lib/ncmpc/lyrics/
90         # fail if any of these directories is not empty
91         rmdir debian/ncmpc/usr/lib/ncmpc/
92         rmdir debian/ncmpc/usr/lib/
93         
94         mkdir debian/ncmpc/usr/share/doc/ncmpc/examples
95         mv debian/ncmpc/usr/share/doc/ncmpc/*.sample \
96                 debian/ncmpc/usr/share/doc/ncmpc/examples
97         mv debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \
98                 debian/ncmpc/usr/share/doc/ncmpc/examples
100 binary-indep: install-indep
101         dh_testdir
102         dh_testroot
103         dh_installchangelogs -i
104         dh_installdocs -A -i NEWS README AUTHORS
105         dh_compress -i
106         dh_fixperms -i
107         dh_installdeb -i
108         dh_gencontrol -i
109         dh_md5sums -i
110         dh_builddeb -i
112 binary-arch: build install-arch
113         dh_testdir
114         dh_testroot
115         dh_installchangelogs -a
116         dh_installdocs -A -a NEWS README
117         dh_installmenu -a
118         dh_link -a
119         dh_strip -a
120         dh_compress -a
121         dh_fixperms -a
122         dh_installdeb -a
123         dh_shlibdeps -a
124         dh_gencontrol -a
125         dh_md5sums -a
126         dh_builddeb -a
128 binary: binary-arch binary-indep
129 .PHONY: build clean binary-indep binary-arch binary install-indep install-arch