Package list lwjgl / 8e15984 debian / rules
8e15984

Tree @8e15984 (Download .tar.gz)

rules @8e15984raw · history · blame

#!/usr/bin/make -f

NAME    := $(shell dpkg-parsechangelog| sed -n '/^Source/{s/Source: \(.*\)/\1/p}')
VERSION := $(shell dpkg-parsechangelog| sed -n '/^Version/{s/Version: \(.*\)-[0-9]*$$/\1/;s/+dfsg//p}')
TMPDIR  := $(NAME)-$(VERSION)
TAR     := ../$(NAME)_$(VERSION).orig.tar.gz
TARDFSG := ../$(NAME)_$(VERSION)+dfsg.orig.tar.gz

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

# NOTE: jutils is explicitly included here (without a depends in our control
# file) because jinput.jar lacks jutils in its own "Class-Path" (bug #626002)
export CLASSPATH=/usr/share/java/jinput.jar:/usr/share/java/jutils.jar

%:
	dh $@

override_dh_auto_build:
	ant jars
	ant compile_native 
	ant javadoc

override_dh_auto_install:
	jh_installjavadoc -plib$(NAME)-java-doc doc/javadoc

override_dh_auto_clean:
	find src/native/ -name '*org_lwjgl_*.h' -delete
	rm -rf src/native/generated/* src/generated/*
	rm -rf doc/javadoc bin temp
	rm -f libs/*.jar libs/linux/*
	jh_clean

get-orig-source:
	rm -f $(TAR)
	uscan --verbose --download-version $(VERSION) \
		--force-download --repack --no-symlink --rename
	mkdir $(TMPDIR) && tar -C $(TMPDIR) -zxf $(TAR) && rm $(TAR)
	cd $(TMPDIR) && find . -type f -exec fromdos {} \;
	echo "The following files will not be included in Debian tarball:"
	cd $(TMPDIR) && find . \( -name '*.class' -o -name '*.jar' \
		-o -path './src/generated/*' -o -path './src/native/generated/*' \) \
		-print -delete
	ZIP=--best tar --exclude-vcs --exclude src/generated \
		--exclude src/native/generated -zcf $(TARDFSG) $(TMPDIR)
	rm -rf $(TMPDIR)