File: rules

package info (click to toggle)
xsddiagram 1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 2,184 kB
  • ctags: 1,092
  • sloc: cs: 9,274; sh: 42; makefile: 26; xml: 3
file content (37 lines) | stat: -rwxr-xr-x 1,181 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
#!/usr/bin/make -f

VER_FULL = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)

UPSTREAM_SRC = XSDDiagram-2013-01-23-$(VER_FULL)-Source
DEBIAN_SRC_DIR = xsddiagram-$(VER_FULL)
DEBIAN_SRC_TAR = xsddiagram_$(VER_FULL).orig.tar.gz

$(UPSTREAM_SRC).zip:
	wget http://regis.cosnier.free.fr/soft/xsddiagram/$@

get-orig-source: $(UPSTREAM_SRC).zip
	mkdir $(DEBIAN_SRC_DIR)
	unzip $(UPSTREAM_SRC).zip -d $(DEBIAN_SRC_DIR)
	# remove junk files:
	find $(DEBIAN_SRC_DIR) -name "*.exe" -delete
	find $(DEBIAN_SRC_DIR) -name "*.pdb" -delete
	GZIP="--best --no-name" tar czf $(DEBIAN_SRC_TAR) $(DEBIAN_SRC_DIR)
	rm -rf $(DEBIAN_SRC_DIR)

debian/xsddiagram.1:
	help2man -n "Xml Schema Definition (XSD) diagram viewer" \
		--help-option=-h --output=debian/xsddiagram.1 \
		--no-info --version-string=$(VER_FULL) xsddiagram
	dos2unix debian/xsddiagram.1

override_dh_auto_clean:
	MONO_IOMAP=all xbuild $(CURDIR)/XSDDiagram2010.sln /target:Clean

override_dh_auto_build:
	MONO_IOMAP=all xbuild $(CURDIR)/XSDDiagram2010.sln

override_dh_auto_install:
	install -D -m0755 $(CURDIR)/debian/xsddiagram.sh $(CURDIR)/debian/xsddiagram/usr/bin/xsddiagram

%:
	dh $@ --with cli