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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
#!/usr/bin/make -f
include /usr/share/dpatch/dpatch.make
export DH_OPTIONS
export JAVA_HOME=/usr/lib/jvm/java-gcj
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
export ANT_OPTS=-Dcompile.debug=true -Dcompile.optimize=false
else
export ANT_OPTS=-Dcompile.debug=true -Dcompile.optimize=true
endif
upstream:
# Requires: unzip
VERSION=`dpkg-parsechangelog | awk '/Version:/ {print $$2}' | sed 's/-[0-9]*$$//g'`; \
TAR=robocode_$$VERSION.orig.tar; \
ZIP=robocode-src-$$VERSION.zip; \
TEMPDIR=`mktemp -d`; \
cd $$TEMPDIR; \
mkdir robocode; \
cd robocode; \
wget http://heanet.dl.sourceforge.net/sourceforge/robocode/$$ZIP; \
unzip $$ZIP; \
find . -depth -type d -name "CVS" | xargs rm -rf; \
find . -type f -name "jikes*.jar" | xargs rm -rf; \
rm $$ZIP ;\
cd ..; \
tar cvvf $$TAR robocode; \
gzip -9 $$TAR; \
rm -rf robocode/; \
echo "Upstream tarball: $$TEMPDIR/$$TAR.gz"
build: patch build-stamp
build-stamp:
ant -f build/build.xml
touch $@
clean: unpatch
dh_testdir
dh_testroot
rm -rf build-stamp
ant clean -f build/build.xml
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs -i
dh_install
# Create icon for .desktop file
mkdir -p debian/robocode/usr/share/pixmaps
convert robocode/resources/icons/robocode-icon.png -resize 32x32 \
debian/robocode/usr/share/pixmaps/robocode.xpm
# Remove empty "package-list" files
find debian/robocode-doc -type f -size 0 | xargs rm -vf
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs robocode/resources/versions.txt
dh_installdocs
dh_installman
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: build install
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install patch unpatch upstream
|