File: rules

package info (click to toggle)
lwjgl 2.7.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,268 kB
  • ctags: 17,488
  • sloc: java: 50,977; ansic: 7,841; xml: 1,460; lisp: 74; makefile: 33; sh: 2
file content (44 lines) | stat: -rwxr-xr-x 1,572 bytes parent folder | download
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
#!/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-7-openjdk-$(DEB_BUILD_ARCH)
export PATH:=$(JAVA_HOME)/bin:$(PATH)

# 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 doc bin libs dist res temp
	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)