File: rules

package info (click to toggle)
repetier-host 0.85%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 13,748 kB
  • ctags: 3,632
  • sloc: cs: 32,082; xml: 7,149; makefile: 39; sh: 13
file content (54 lines) | stat: -rwxr-xr-x 2,110 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/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)"