Package: dwm Version: 4.7-2 Severity: minor Tags: patch As the subject says, the clean target of debian/rules does not work after invocation of build target, only after the install target. After the build target, the clean target completes correctly, but leaves patch-stamp untouched. See the log:
[EMAIL PROTECTED]:/usr/local/src/dwm/orig/dwm-4.7$ debian/rules build test -d debian/patched || install -d debian/patched dpatch apply-all applying patch 01-x-terminal-emulator to ./ ... ok. applying patch 02-font to ./ ... ok. dpatch cat-all >>patch-stampT mv -f patch-stampT patch-stamp dh_testdir # Building package CFLAGS="-Wall -g -O2" /usr/bin/make PREFIX=/usr make[1]: Entrando no diretório /usr/local/src/dwm/orig/dwm-4.7' dwm build options: CFLAGS = -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="4.7" LDFLAGS = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 CC = cc CC dwm.c CC -o dwm make[1]: Saindo do diretório /usr/local/src/dwm/orig/dwm-4.7' touch build-stamp [EMAIL PROTECTED]:/usr/local/src/dwm/orig/dwm-4.7$ fakeroot debian/rules clean dh_testdir dh_testroot rm -f build-stamp # Cleaning package [ ! -f Makefile ] || /usr/bin/make clean make[1]: Entrando no diretório /usr/local/src/dwm/orig/dwm-4.7' cleaning make[1]: Saindo do diretório /usr/local/src/dwm/orig/dwm-4.7' rm -f debian/postinst debian/prerm mv config.default.h config.h mv: impossível fazer stat em config.default.h': Arquivo ou diretório não encontrado make: [clean] Erro 1 (ignorado) dpatch deapply-all reverting patch 02-font from ./ ... ok. reverting patch 01-x-terminal-emulator from ./ ... ok. dh_clean [EMAIL PROTECTED]:/usr/local/src/dwm/orig/dwm-4.7$ ls config.def.h config.h config.mk debian dwm.1 dwm.c LICENSE Makefile patch-stamp README While trying to fix it, I fixed what I think is also a bug: the alternative binaries were build in the install target instead of in the build target. Cheers, Tiago Saboga. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.22sofocles1 (SMP w/1 CPU core) Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages dwm depends on: ii libc6 2.7-4 GNU C Library: Shared libraries ii libx11-6 2:1.0.3-7 X11 client-side library Versions of packages dwm recommends: ii dwm-tools 26-1 dynamic window manager (tools) -- no debconf information
--- debian/rules 2008-01-04 13:21:07.000000000 -0200 +++ /usr/local/src/dwm/work/dwm-4.7/debian/rules 2008-01-03 23:16:46.000000000 -0200 @@ -17,12 +17,25 @@ build-stamp: patch-stamp dh_testdir - # Building package - CFLAGS="$(CFLAGS)" $(MAKE) PREFIX=/usr + # Building alternatives + mkdir bin + mkdir man + cp config.h debian/config/config.default.h + + set -e; for ALTERNATIVE in debian/config/*; \ + do \ + ALTERNATIVE_NAME=`basename $$ALTERNATIVE | sed -e 's/config.//' -e 's/.h//'`; \ + $(MAKE) clean; \ + cp $$ALTERNATIVE config.h; \ + CFLAGS="$(CFLAGS)" $(MAKE) PREFIX=/usr; \ + mv dwm bin/dwm.$$ALTERNATIVE_NAME; \ + ln -s dwm.1.gz man/dwm.$$ALTERNATIVE_NAME.1.gz; \ + done touch build-stamp -clean: +clean: clean-patched unpatch +clean-patched: dh_testdir dh_testroot rm -f build-stamp @@ -31,8 +44,7 @@ [ ! -f Makefile ] || $(MAKE) clean rm -f debian/postinst debian/prerm -mv config.default.h config.h - - dpatch deapply-all + -rm -r bin man dh_clean @@ -41,27 +53,16 @@ dh_testroot dh_clean -k dh_installdirs - - # Installing package - $(MAKE) install DESTDIR=$(CURDIR)/debian/dwm PREFIX=/usr - mv debian/dwm/usr/bin/dwm debian/dwm/usr/bin/dwm.default - ln -s dwm.1.gz debian/dwm/usr/share/man/man1/dwm.default.1.gz - - # Building alternatives - cp config.h config.default.h - - set -e; for ALTERNATIVE in debian/config/*; \ - do \ - $(MAKE) clean; \ - cp $$ALTERNATIVE config.h; \ - CFLAGS="$(CFLAGS)" $(MAKE) PREFIX=/usr; \ - install -m 0755 dwm debian/dwm/usr/bin/dwm.`basename $$ALTERNATIVE | sed -e 's/config.//' -e 's/.h//'`; \ - ln -s dwm.1.gz debian/dwm/usr/share/man/man1/dwm.`basename $$ALTERNATIVE | sed -e 's/config.//' -e 's/.h//'`.1.gz; \ - done + dh_install + dh_installman dwm.1 # Configuring maintainer scripts - sed -e 's/@ALTERNATIVES@/web/' debian/postinst.in > debian/postinst; \ - sed -e 's/@ALTERNATIVES@/web/' debian/prerm.in > debian/prerm; \ + for ALTERNATIVE in bin/*; \ + do \ + ALTERNATIVES="$$ALTERNATIVES `basename $$ALTERNATIVE | sed -e 's/dwm.//'`"; \ + done; \ + sed -e "s/@ALTERNATIVES@/$$ALTERNATIVES/" debian/postinst.in > debian/postinst; \ + sed -e "s/@ALTERNATIVES@/$$ALTERNATIVES/" debian/prerm.in > debian/prerm; \ # Installing desktop file install -D -m 0644 debian/desktop/dwm debian/dwm/usr/share/xsessions/dwm.desktop