#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 %: dh $@ --with=cli override_dh_auto_configure: ln -s $(CURDIR)/src/RepetierHost/view/utils/ColorSlider.Designer.cs \ $(CURDIR)/src/RepetierHost/view/utils/ColorSlider.designer.cs dh_auto_configure override_dh_auto_build: repetier-host.1 dh_auto_build cd $(CURDIR)/src/RepetierHost; xbuild /p:TargetFrameworkVersion=v4.5 icotool -x src/RepetierHost/repetier-logo-trans32.ico DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0" repetier-host.1: debian/repetier-host.1.xml $(XP) $(DB2MAN) $< PKD = $(abspath $(dir $(MAKEFILE_LIST))) PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source)) UVER = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};') DTYPE = +dfsg VER ?= $(subst $(DTYPE),,$(UVER)) ## http://wiki.debian.org/onlyjob/get-orig-source .PHONY: get-orig-source get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE)) @ $(PKG)_$(VER)$(DTYPE).orig.tar.xz: @echo "# Downloading..." uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD) $(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..)) @echo "# Extracting..." mkdir $(PKG)-$(VER) \ && tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \ || $(RM) -r $(PKG)-$(VER) @echo "# Cleaning-up..." cd $(PKG)-$(VER) \ && find . -depth -type f -name '*.resources' -exec $(RM) -r {} \; -printf 'removed %p\n' \ && $(RM) -r -v \ *.dmg #$(RM) -v $(PKG)_$(VER).orig.tar.* @echo "# Packing..." find -L "$(PKG)-$(VER)" -xdev -type f -print | LC_ALL=C sort \ | XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \ && $(RM) -r "$(PKG)-$(VER)"