Code

rules: Do not install leoslyrics plugins.
[pkg-ncmpc.git] / debian / rules
index 9296d1515d69ec46b4f40a81b853f5fca5c2c0e1..56a9065319950a6f224d533522c0907b5a2caf15 100755 (executable)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS = -Wall -g
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += -Wall
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
+CHECK = check
+
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+       CHECK =
 endif
 
 config.status: configure
@@ -34,20 +37,27 @@ config.status: configure
                        --enable-help-screen \
                        --enable-mouse \
                        --enable-artist-screen \
+                       --enable-chat-screen \
                        --enable-search-screen \
                        --enable-song-screen \
                        --enable-key-screen \
                        --enable-lyrics-screen \
                        --enable-outputs-screen \
+                       --enable-documentation \
                        --with-ncursesw \
-                       CFLAGS="$(CFLAGS)"
+                       CPPFLAGS="$(CPPFLAGS)" \
+                       CFLAGS="$(CFLAGS)" \
+                       LDFLAGS="$(LDFLAGS)"
 
-build: build-stamp
+build: build-arch build-indep
+build-indep:
+build-arch: build-stamp
 
 build-stamp: config.status
        dh_testdir
        
        $(MAKE)
+       test -z '$(CHECK)' || make $(CHECK)
        
        touch build-stamp
 
@@ -68,6 +78,8 @@ install-indep:
        
        mkdir -p debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
        cp lyrics/* debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/
+       # Leo's Lyrics's API seems to be down; https://bugs.debian.org/654243
+       rm -f debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/*leoslyrics*
 
 install-arch: build
        dh_testdir