[BACK]Return to rules CVS log [TXT][DIR] Up to [Development] / xfs-cmds / xfsprogs / debian

File: [Development] / xfs-cmds / xfsprogs / debian / rules (download)

Revision 1.23, Wed Feb 15 14:32:13 2006 UTC (11 years, 8 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.22: +10 -7 lines

Debian packaging updates for xfsprogs.
Merge of master-melb:xfs-cmds:25203a by kenmcd.

#!/usr/bin/make -f

package = xfsprogs
develop = xfslibs-dev
bootpkg = xfsprogs-udeb

version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
udebpkg = $(bootpkg)_$(version)_$(target).udeb

dirme  = debian/$(package)
dirdev = debian/$(develop)
dirdi  = debian/$(bootpkg)
pkgme  = DIST_ROOT=`pwd`/$(dirme);  export DIST_ROOT;
pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
pkgdi  = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
stdenv = @GZIP=-q; export GZIP;

options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
	  INSTALL_USER=root INSTALL_GROUP=root \
	  LOCAL_CONFIGURE_OPTIONS=--enable-readline=yes ;
diopts  = $(options) \
	  export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--enable-gettext=no" ;
checkdir = test -f debian/rules
checkver = rm -f debian/compat && echo 5 > debian/compat

build: built
built: dibuild config
	@echo "== dpkg-buildpackage: build" 1>&2
	$(MAKE) default
	touch built

config: .census
.census:
	@echo "== dpkg-buildpackage: configure" 1>&2
	$(checkdir)
	$(options) $(MAKE) configure
	touch .census

dibuild:
	$(checkdir)
	@echo "== dpkg-buildpackage: installer" 1>&2
	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
		$(diopts) $(MAKE) configure; \
		for dir in include libxfs libdisk mkfs; do \
			$(MAKE) -C $$dir; \
		done; \
		mv mkfs/mkfs.xfs mkfs/mkfs.xfs-$(bootpkg); \
		$(MAKE) distclean; \
	fi

clean:
	@echo "== dpkg-buildpackage: clean" 1>&2
	$(checkdir)
	-rm -f built .census mkfs/mkfs.xfs-$(bootpkg)
	$(MAKE) distclean
	-rm -rf $(dirme) $(dirdev) $(dirdi)
	-rm -f debian/*substvars debian/files* debian/*.debhelper debian/compat

binary-indep:

binary-arch: checkroot built
	@echo "== dpkg-buildpackage: binary-arch" 1>&2
	$(checkdir)
	$(checkver)
	-rm -rf $(dirme) $(dirdev) $(dirdi)
	$(pkgme)  $(MAKE) -C . install
	$(pkgdev) $(MAKE) -C . install-dev
	$(pkgdi)  $(MAKE) -C debian install-d-i
	$(pkgme)  $(MAKE) -C build src-manifest

	dh_installdocs -p$(package) -p$(develop)
	dh_installchangelogs -N$(bootpkg)
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs -p$(package)
	dh_installdeb -N$(bootpkg)
	dh_shlibdeps
	dh_gencontrol -N$(bootpkg)
	dh_gencontrol -p$(bootpkg) -- -n$(udebpkg)

	dh_md5sums -N$(bootpkg)
	dh_builddeb -N$(bootpkg)
	dh_builddeb -p$(bootpkg) --filename=$(udebpkg)

binary: binary-indep binary-arch

checkroot:
	test 0 -eq `id -u`

.PHONY: binary binary-arch binary-indep clean checkroot