#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 VER := $(shell dh_testdir && ls build/dist/klone-core-*.tar* | head -n 1 | perl -ne 'print $$1 if /klone-core-(.*)\.tar\.gz/;') build: build-stamp build-stamp: dh_testdir tar zxf "build/dist/klone-core-$(VER).tar.gz" test -e "klone-source" || ln -s . klone-source test -e "build/dist/klone-core-$(VER).tar.gz.orig" || mv "build/dist/klone-core-$(VER).tar.gz" "build/dist/klone-core-$(VER).tar.gz.orig" test -L "build/dist/klone-core-$(VER).tar.gz" || ln -s "/usr/src/klone-core-$(VER).tar.gz" "build/dist/klone-core-$(VER).tar.gz" tar cf debian/klone-source.tar.bz2 --bzip2 --exclude=klone-source/klone-source --exclude=klone-source/debian --exclude=klone-source/build/dist/klone-*orig --exclude="klone-core-$(VER)" klone-source/* test ! -L "build/dist/klone-core-$(VER).tar.gz" || rm "build/dist/klone-core-$(VER).tar.gz" test ! -e "build/dist/klone-core-$(VER).tar.gz.orig" || mv "build/dist/klone-core-$(VER).tar.gz.orig" "build/dist/klone-core-$(VER).tar.gz" rm -f klone-source touch build-stamp clean: dh_testdir dh_testroot rm -f debian/klone-source.tar.bz2 klone-source rm -f build-stamp rm -rf klone-core-* dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs -XMakefile -XCVS dh_installexamples dh_install dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install unapply-patches