File: rules

package info (click to toggle)
charactermanaj 0.998%2Bgit20150728.a826ad85-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,660 kB
  • sloc: java: 36,536; xml: 13,448; sh: 169; makefile: 34
file content (45 lines) | stat: -rwxr-xr-x 1,664 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl
XP     = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
DEB_SOURCE := $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //')
DEB_VERSION := $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //')
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
SVN_URL = http://svn.sourceforge.jp/svnroot/charactermanaj/trunk
GIT_URL = git://git.sourceforge.jp/gitroot/charactermanaj/CharacterManaJ.git
JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@ --with javahelper

override_dh_auto_build: icon.xpm charactermanaj.1
	dh_auto_build

override_dh_auto_clean:

charactermanaj.1: debian/charactermanaj.xml
	$(XP) $(DB2MAN) $<

icon.xpm: icon.ico
	winicontoppm -allicons -writeands icon.ico icon_tmp
	ppmtoxpm -name=charactermanaj_xpm -alphamask=icon_tmp_and_0.pbm \
		icon_tmp_xor_0.ppm > icon.xpm

get-orig-source:
	set -e; if echo $(DEB_VERSION) | grep -c "git"; \
	then \
		git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\([0-9]*\)*\.\(.*\)-.*$$/\2/g'`; \
	else \
		git_version=$(DEB_UPSTREAM_VERSION); \
	fi; \
	tmpdir=`mktemp -d -t`; \
	cd $$tmpdir; \
	echo "checkout upstream repository ..."; \
	git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \
	cd `ls | head -n 1`; git checkout -b orig $$git_version; cd ..; \
	tar --exclude=.git --exclude='*.exe' --exclude='*.jar' -czvf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \
	cd $(CURDIR); \
	rm -rf $$tmpdir