File: rules

package info (click to toggle)
libjogl2-java 2.5.0%2Bdfsg-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 54,660 kB
  • sloc: java: 244,913; ansic: 82,750; xml: 7,686; objc: 4,857; sh: 3,026; cpp: 139; makefile: 50; awk: 46; perl: 27
file content (72 lines) | stat: -rwxr-xr-x 2,580 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
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
#!/usr/bin/make -f

export LC_ALL=C.UTF-8

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

JAVA_HOME            := /usr/lib/jvm/default-java/
ENABLE_BUILD_HELP_ARCHS := amd64 i386
DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -n -e 's/+dfsg.*$$//p')

# Providing the hardening CPPFLAGS to the ant cc task.
ARGS_FOR_COMPILER=$(shell COMPILERARGS=""; \
    for arg in $(CPPFLAGS) $(CFLAGS); do\
        COMPILERARGS="$${COMPILERARGS}<compilerarg value=\\\"$$arg\\\" \/> " ;\
    done; \
    echo "$${COMPILERARGS}")

# Providing the hardening LDFLAGS to the ant cc task.
ARGS_FOR_LINKER=$(shell LINKERARGS=""; \
    for arg in $(LDFLAGS); do\
        LINKERARGS="$${LINKERARGS}<linkerarg value=\\\"$$arg\\\" \/> " ;\
    done; \
    echo "$${LINKERARGS}")


%:
	dh $@ --with maven_repo_helper

override_dh_auto_configure:
	# Customizing headers provided by the JDK, to make them fit Gluegen
	debian/customizeJdkHeaders
	mv src/nativewindow/classes/com/jogamp/nativewindow/javafx debian/
	dh_auto_configure
	# Providing the hardening CPPFLAGS and LDFLAGS to the ant cc tasks.
	for sub in jogl nativewindow newt; do\
	    mv make/build-$$sub.xml make/build-$$sub.xml.old;\
	    sed 's!#COMPILER_ARGS#!$(ARGS_FOR_COMPILER)!; s!#LINKER_ARGS#!$(ARGS_FOR_LINKER)!' make/build-$$sub.xml.old > make/build-$$sub.xml;\
	done

# Disable the build of the help on slow archs. It takes forever (a few hours)
execute_before_dh_auto_build-indep:
ifneq (,$(findstring $(DEB_HOST_ARCH),$(ENABLE_BUILD_HELP_ARCHS)))
	ant -Duser.name debian -propertyfile debian/ant.properties -buildfile make/build.xml javadoc.all
else
# Exclude binary doc package from the build. See debhelper manpage.
export DH_OPTIONS += -Nlibjogl2-java-doc
endif

override_dh_auto_build:
	ant -Duser.name debian -propertyfile debian/ant.properties -buildfile make/build.xml

override_mh_install:
	mh_install -plibjogl2-java

override_dh_clean:
	$(RM) -r build build-temp gluegen-build jdkHeaders
	# Restoring the make/build-*.xml files
	for sub in jogl nativewindow newt; do \
	    if [ -e "make/build-$$sub.xml.old" ]; then \
	        mv make/build-$$sub.xml.old make/build-$$sub.xml; \
	    fi; \
	done
	-mv debian/javafx src/nativewindow/classes/com/jogamp/nativewindow/
	dh_clean

get-orig-pom:
	wget https://repo1.maven.org/maven2/org/jogamp/jogl/jogl-all/$(DEB_STRIPPED_UPSTREAM_VERSION)/jogl-all-$(DEB_STRIPPED_UPSTREAM_VERSION).pom -O debian/pom.xml