Florian Hinzmann <[EMAIL PROTECTED]> wrote:
>I've found some time to clean up my packages finally. One
>thing to do make the Debian package build with or without
>stripping the binaries and with or without debugging symbols
>according to some environment variables. 
>
>I've once read about this being a requirement for some new 
>policy version, but I don't find this passage now!

Section 4.1 of policy 3.2.0.0/3.2.1.0, or section 11.1 of policy 3.2.1.2
now that the packaging manual has been merged.

Typically, something like this will do for building with or without
debugging symbols:

  ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  CFLAGS = -O2 -Wall
  else
  CFLAGS = -O2 -g -Wall
  endif

For deciding whether or not to strip the binaries, dh_strip with a
build-dependency on debhelper (>= 2.1.6) will do the job, or you could
do something like this:

  ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL = install -s
  else
  INSTALL = install
  endif

  install:
        $(INSTALL) foo debian/package/usr/bin/foo

HTH,

-- 
Colin Watson                                     [[EMAIL PROTECTED]]


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to