[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#88029: allow rules file to be non-makefile



On Wed, Feb 28, 2001 at 01:02:00PM -0800, Sean 'Shaleh' Perry wrote:
> > I would like to propose that the debian/rules file is allowed to be
> > non-makefile. Any kind of a program that can do the required stuff can be a
> > debian/rules file. We shouldn't prohibit it when someone e.g. writes a short
> > shell script or another interpreted script, as long as it works.
> 
> I am against this.  Grab the shoop package for an example of what this will
> lead to.

This example actually shows that bluntly prohibiting something like that is
futile. :)

> Debian developers should be able to read and if need be NMU another developers
> package.  Allowing rules files to be arbitrary code makes this harder.

Makefiles are already arbitrary code. You can write a makefile rules file
that would use shoop stuff -- which would be perfectly conformant, but would
that make it any easier to edit (for the uninitiated)?

Imagine a rules file like this:

#!/bin/sh -e

case "$1" in
 build)
  dh_testdir
  if echo "$DEB_BUILD_OPTIONS" | grep -q debug; then
    make CFLAGS="-g"
  else
    make
  fi
 ;;
 clean)
  dh_testdir
  dh_testroot
  make clean
  rm -f leftover_junk.file
  dh_clean
 ;;
 binary|binary-arch)
  dh_testdir
  dh_testroot
  make install prefix=`pwd`/debian/tmp/usr
  dh_installdocs README
  if echo "$DEB_BUILD_OPTIONS" | grep -vq nostrip; then
    dh_strip
    strip --strip-unneeded `pwd`/debian/tmp/usr/lib/foo/plugin/*.foo
  fi
  dh_compress
  dh_fixperms
  dh_installdeb
  dh_shlibdeps
  dh_gencontrol
  dh_builddeb
 ;;
esac

How is that hard to NMU? Unless of course the developer in question doesn't
know a thing about shell scripting. :|

-- 
Digital Electronic Being Intended for Assassination and Nullification



Reply to: