File: rules

package info (click to toggle)
lz4-java 1.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,164 kB
  • sloc: java: 4,569; xml: 366; ansic: 260; makefile: 26
file content (35 lines) | stat: -rwxr-xr-x 937 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export JAVA_HOME := /usr/lib/jvm/default-java

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --buildsystem=ivy --with maven-repo-helper

override_dh_auto_build-indep:
	dh_auto_build -- bundle makepom -Dskip.jni=true
	mv dist/lz4-java-*.pom dist/lz4-java.pom

override_dh_auto_build-arch:
	dh_auto_build -- compile-java
	gcc $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
	    -I$(JAVA_HOME)/include/ \
	    -I$(JAVA_HOME)/include/linux \
	    -Ibuild/jni-headers \
	    -fPIC -shared -Wall -g \
	    -o build/liblz4-java.so \
	    src/jni/net_jpountz_lz4_LZ4JNI.c \
	    src/jni/net_jpountz_xxhash_XXHashJNI.c \
	    -llz4 -lxxhash

override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_build -- test -Dskip.jni=true
endif

override_dh_auto_install-arch:
	dh_install -pliblz4-jni build/*.so usr/lib/$(DEB_HOST_MULTIARCH)/jni