Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6 DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/docbook-xsl/manpages/docbook.xsl
7 XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
8 DEB_SOURCE := $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //')
9 DEB_VERSION := $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //')
10 DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')
11 SVN_URL = http://svn.sourceforge.jp/svnroot/charactermanaj/trunk
12 GIT_URL = git://git.sourceforge.jp/gitroot/charactermanaj/CharacterManaJ.git
13
14 %:
15 dh $@
16
17 override_dh_auto_build: icon.xpm charactermanaj.1
18 dh_auto_build
19
20 override_dh_auto_test:
21 env APPDATA=`mktemp -d` dh_auto_test
22
23 charactermanaj.1: debian/charactermanaj.1.xml
24 $(XP) $(DB2MAN) $<
25
26 icon.xpm: icon.ico
27 #winicontoppm -allicons -writeands icon.ico icon_tmp
28 icotool -x $<
29 pngtopnm icon_1_32x32x32.png > icon_tmp_xor_0.ppm
30 pngtopnm -alpha icon_1_32x32x32.png > icon_tmp_and_0.pbm
31 ppmtoxpm -name=charactermanaj_xpm -alphamask=icon_tmp_and_0.pbm \
32 icon_tmp_xor_0.ppm > $@
33
34 get-orig-source:
35 set -e; if echo $(DEB_VERSION) | grep -c "git"; \
36 then \
37 git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\([0-9]*\)*\.\(.*\)-.*$$/\2/g'`; \
38 else \
39 git_version=$(DEB_UPSTREAM_VERSION); \
40 fi; \
41 tmpdir=`mktemp -d -t`; \
42 cd $$tmpdir; \
43 echo "checkout upstream repository ..."; \
44 git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \
45 cd `ls | head -n 1`; git checkout -b orig $$git_version; cd ..; \
46 tar --exclude=.git --exclude='*.exe' --exclude='*.jar' -czvf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \
47 cd $(CURDIR); \
48 rm -rf $$tmpdir