Package list lwjgl / debian/2.4.2+dfsg-3 debian / rules
debian/2.4.2+dfsg-3

Tree @debian/2.4.2+dfsg-3 (Download .tar.gz)

rules @debian/2.4.2+dfsg-3raw · 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/default-java

%:
	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/*

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)
	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)