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

Re: Does debhelper handle build-indep ?



Hello !

I have implemented build-arch/build-indep in my package.
Here is the skeleton of my debian/rules files.
If Bug #72335 go into policy, it will be helpful to have a template file,
so I will appreciate your suggestions and comment about it, and especially
problems because they will be in my package also!

Bill.


#!/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
# arch and indep build  by ballombe@debian.org 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 --prefix=/usr

	touch config-stamp
build-arch: build-arch-stamp
build-arch-stamp: config
	
	$(MAKE) bin

build-indep: build-indep-stamp
build-indep-stamp: config
	$(MAKE) doc
clean:
	dh_testdir
	dh_testroot
	
	rm -f build-arch-stamp build-indep-stamp config-stamp
	$(MAKE) clean
	
	dh_clean

install: install-indep install-arch
install-indep:
	dh_testdir
	dh_testroot
	dh_clean -k -i
	dh_installdirs -i
	$(MAKE) install-doc DESTDIR=`pwd`/debian/xxx-doc/
	
	dh_movefiles -i
install-arch:
	dh_testdir
	dh_testroot
	dh_clean -k -a
	dh_installdirs -a
	$(MAKE) install-bin DESTDIR=`pwd`/debian/tmp
	
	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 
	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_shlddibdeps
	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

Reply to: