X-Git-Url: https://git.tokkee.org/?p=pkg-ncmpc.git;a=blobdiff_plain;f=debian%2Frules;h=042e001a95056c29fe03b619e3bc9ac79d91178e;hp=13e0953dc70a04355eeb02f6c1aad6bc88629e69;hb=36e2ba48bd36f862eacf06fb5d875bd9744a2af3;hpb=c5e9338cfc2ce685552868aad8eafee0302f04a5 diff --git a/debian/rules b/debian/rules index 13e0953..042e001 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # debian/rules for ncmpc # -# Written by Sebastian Harl +# Written by Sebastian Harl # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -11,17 +11,20 @@ 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 dh_testdir - CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ + ./configure --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ --mandir=\$${prefix}/share/man \ --disable-mini \ @@ -34,19 +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 \ - --with-ncursesw + --enable-documentation \ + --with-ncursesw \ + 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 @@ -59,24 +70,47 @@ clean: dh_clean -install: build +install-indep: + dh_testdir + dh_testroot + dh_prep + dh_installdirs -i + + mkdir -p debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/ + cp lyrics/* debian/ncmpc-lyrics/usr/lib/ncmpc/lyrics/ + +install-arch: build dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs -a $(MAKE) install DESTDIR=$(CURDIR)/debian/ncmpc + rm -rf debian/ncmpc/usr/lib/ncmpc/lyrics/ + # fail if any of these directories is not empty + rmdir debian/ncmpc/usr/lib/ncmpc/ + rmdir debian/ncmpc/usr/lib/ + mkdir debian/ncmpc/usr/share/doc/ncmpc/examples mv debian/ncmpc/usr/share/doc/ncmpc/*.sample \ debian/ncmpc/usr/share/doc/ncmpc/examples mv debian/ncmpc/usr/share/doc/ncmpc/ncmpc.lirc \ debian/ncmpc/usr/share/doc/ncmpc/examples -binary-indep: - # nothing to do here +binary-indep: install-indep + dh_testdir + dh_testroot + dh_installchangelogs -i + dh_installdocs -A -i NEWS README AUTHORS + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i -binary-arch: build install +binary-arch: build install-arch dh_testdir dh_testroot dh_installchangelogs -a @@ -93,5 +127,5 @@ binary-arch: build install dh_builddeb -a binary: binary-arch binary-indep -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary-arch binary install-indep install-arch