I second the amended proposal.

I include a sort-of template for dh_make to help implementing it.

It may really save time to autobuilders, since more and more packages use
complex text-processing softwares to render theirs documentations, and this
often means several packages to be installed before building, and this already
take time. 

It has the added benefit that people needing to rebuild a package (against
others libs, say) will need  less packages installed in order to compile the
binary-arch target. Rebuilding the documentation is often less useful.

Regards,

Bill Allombert <[EMAIL PROTECTED]>

#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
#Architecture 
build: build-arch build-indep
config: config-stamp
config-stamp:
        dh_testdir
        
        #CONFIGURE#
        #Add here commands to configure the package.
        #./configure --prefix=/usr
        
        touch config-stamp
build-arch: build-arch-stamp
build-arch-stamp: config
        
        # Add here commands to compile the arch part of the package.
        #$(MAKE) 

build-indep: build-indep-stamp
build-indep-stamp: config
        
        # Add here commands to compile the indep part of the package.
        #$(MAKE) doc

clean:
        dh_testdir
        dh_testroot
        rm -f build-arch-stamp build-indep-stamp config-stamp

        # Add here commands to clean up after the build process.
        -#CLEAN#
        
        dh_clean

install: install-indep install-arch
install-indep:
        dh_testdir
        dh_testroot
        dh_clean -k -i
        dh_installdirs -i
        
        # Add here commands to install the indep part of the package into
        # debian/<package>-doc.
        #INSTALLDOC#
        
        dh_movefiles -i
install-arch:
        dh_testdir
        dh_testroot
        dh_clean -k -a
        dh_installdirs -a

        # Add here commands to install the arch part of the package into 
        # debian/tmp.
        #INSTALL#

        dh_movefiles -a
# Must not depend on anything. This is to be called by
# binary-arch/binary-multi
# in another 'make' thread.
binary-common:
        dh_testdir
        dh_testroot
#       dh_installdebconf       
        dh_installdocs
        dh_installexamples
        dh_installmenu
#       dh_installemacsen
#       dh_installpam
#       dh_installinit
        dh_installcron
#       dh_installmanpages
        dh_installinfo
#       dh_undocumented
        dh_installchangelogs #CHANGELOGS#
        dh_link
        dh_strip
        dh_compress 
        dh_fixperms
        # You may want to make some executables suid here.
        dh_suidregister
        dh_makeshlibs
        dh_installdeb
#       dh_perl
        dh_gencontrol
        dh_md5sums
        dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary config install 
install-indep install-arch

Attachment: pgpHB7Whc5zqU.pgp
Description: PGP signature

Reply via email to