#!/usr/bin/make -f ifeq (experimental,$(shell dpkg-parsechangelog|grep ^Dist|cut -d ' ' -f 2)) DEB_BUILD_OPTIONS += nofinal nostrip endif include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/simple-patchsys.mk include /usr/share/cdbs/1/class/kde.mk XP = xsltproc --nonet --output debian/ DB2MAN = /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl %.1 : %.1.docbook $(XP) $(DB2MAN) $< clean:: -rm -f debian/konversation.1 -rm -f debian/konversation.substvars -find . -type d -a -name CVS -print0 | xargs -0 rm -rf pre-build:: echo DEB_BUILD_OPTIONS = $(DEB_BUILD_OPTIONS) ifeq (,$(TEST)) # To circumvent: fakeroot debian/rules TEST=1 binary [ ! -d debian/.svn ] [ ! -d ./CVS ] endif build/konversation:: debian/konversation.1 \ debian/konversationircprotocolhandler.1 install/konversation:: dh_installchangelogs -pkonversation src/ChangeLog install -m 755 -D \ debian/example-dcop-away.sh \ debian/konversation/usr/share/doc/konversation/examples/dcop-away.sh install -m 644 src/scripts/README \ debian/konversation/usr/share/doc/konversation/README.scripts $(patsubst %,binary-post-install/%,$(DEB_PACKAGES)):: # remove empty and unwanted files rm -f debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/{README,NEWS} find debian/$(cdbs_curpkg) -name "*.xcf" -print0 | xargs -0 -r rm ## private helper targets below here ## nwt_svn_pkg_root := http://svn.houseofnate.net/pkg-konversation # run "debian/rules freeze" after dch but before building the final package freeze: @[ -d debian/.svn ] @if svn diff debian/changelog 2>/dev/null | grep -q '.'; then \ svn ci debian/changelog -m "New build."; \ fi @if svn diff debian 2>/dev/null | grep -q '.'; then \ echo "Uncommitted changes exist in ./debian." 1>&2; \ svn diff debian; \ exit 1; \ fi @svn copy $(nwt_svn_pkg_root)/trunk \ $(nwt_svn_pkg_root)/tags/$(DEB_VERSION) -m 'Tagging release' @echo Tagged $(nwt_svn_pkg_root)/tags/$(DEB_VERSION) OK. @find debian -type d -name ".svn" -print0 | xargs -0 rm -rf @echo 'debian is no longer a working copy; ready to build.' ok: [ -d debian/.svn ] && svn ci debian/changelog -m 'New build tested ok' \ || true cl: test -x /usr/bin/cvs2cl && \ cvs2cl --fsf --follow TRUNK \ --log-opts '-d "> 1 week ago"' --stdout \ > /tmp/konversation-changelog.cvs .PHONY: publish freeze ok