[Build-common-hackers] Bug#280365: DEB_AUTO_CLEANUP_RCS
Robert Millan
Robert Millan <rmh@debian.org>, 280365@bugs.debian.org
Mon, 08 Nov 2004 23:26:10 +0100
This is a multi-part MIME message sent by reportbug.
--===============1138888733==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Package: cdbs
Version: 0.4.25-1
Severity: wishlist
Tags: patch
This patch implements DEB_AUTO_CLEANUP_RCS. When enabled, this will make cdbs
cleanup files left by RCS systems (CVS, .cvsignore, etc) automaticaly after
unpacking the source tarball.
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i386)
Kernel: GNU/kFreeBSD 5.2.1-7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
-- no debconf information
--===============1138888733==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cdbs.diff"
diff -ur cdbs-0.4.25.old/1/rules/tarball.mk.in cdbs-0.4.25/1/rules/tarball.mk.in
--- cdbs-0.4.25.old/1/rules/tarball.mk.in 2004-09-24 19:01:16.000000000 +0200
+++ cdbs-0.4.25/1/rules/tarball.mk.in 2004-11-08 23:14:49.000000000 +0100
@@ -64,7 +64,21 @@
_cdbs_tar_verbose = -v
endif
+ifeq (, $(_cdbs_bootstrap))
+ifeq ($(DEB_AUTO_CLEANUP_RCS), yes)
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= x.y)
+endif
+endif
+
pre-build:: $(_cdbs_tarball_stamps)
+ifeq ($(DEB_AUTO_CLEANUP_RCS), yes)
+ for i in CVS .svn \{arch\} .arch-ids ; do \
+ find $(DEB_SRCDIR) -type d -name $$i | xargs rm -rf ; \
+ done
+ for i in .cvsignore svn-commit.tmp .arch-inventory ; do \
+ find $(DEB_SRCDIR) -type f -name $$i | xargs rm -f ; \
+ done
+endif
$(addsuffix .gz,$(_cdbs_tarball_stamp_base)) $(addsuffix .tgz,$(_cdbs_tarball_stamp_base)):
tar -C $(_cdbs_tarball_dir) $(_cdbs_tar_verbose) -xzf $(patsubst stamp-%,%,$(notdir $@))
--===============1138888733==--