[Build-common-hackers] Bug#276599: embed shell commands in control.in

Robert Millan Robert Millan <rmh@debian.org>, 276599@bugs.debian.org
Fri, 15 Oct 2004 01:49:49 +0200


This is a multi-part MIME message sent by reportbug.

--===============0317396363==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: cdbs
Version: 0.4.24-1
Severity: wishlist
Tags: patch

This patch improves the DEB_AUTO_UPDATE_DEBIAN_CONTROL feature so that you
can embed shell commands in control.in.  For example, your control.in could
include hacks like:

  Build-Depends: libgpm-dev [`type-handling any linux-gnu`]

-- 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 (ignored: LC_ALL set to C)

-- no debconf information

--===============0317396363==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="shell.diff"

diff -ur cdbs-0.4.23.old/1/rules/buildcore.mk.in cdbs-0.4.23/1/rules/buildcore.mk.in
--- cdbs-0.4.23.old/1/rules/buildcore.mk.in	2004-09-24 19:42:07.000000000 +0200
+++ cdbs-0.4.23/1/rules/buildcore.mk.in	2004-10-15 01:24:24.000000000 +0200
@@ -105,6 +105,7 @@
 ifneq ($(DEB_AUTO_UPDATE_DEBIAN_CONTROL),)
 	cat debian/control.in \
 	| sed "s/@cdbs@/$(CDBS_BUILD_DEPENDS)/g" \
+	| sed -e "s/^/echo \"/g" -e "s/$$/\"/g" | $(SHELL) \
 	> debian/control
 endif
 

--===============0317396363==--