File: rules

package info (click to toggle)
snappy-java 1.1.2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,964 kB
  • ctags: 591
  • sloc: java: 4,322; sh: 437; xml: 431; cpp: 215; makefile: 146; python: 118
file content (41 lines) | stat: -rwxr-xr-x 1,125 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
36
37
38
39
40
41
#!/usr/bin/make -f

export JAVA_HOME := /usr/lib/jvm/default-java
DEB_HOST_MULTIARCH   = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_UPSTREAM_VERSION = $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

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

%:
	dh $@ --buildsystem=maven

override_dh_auto_configure:
	sed -e 's/%VERSION%/$(DEB_UPSTREAM_VERSION)/g' debian/pom.xml > pom.xml
	dh_auto_configure

override_dh_auto_build-arch:
	# Build the JNI bindings
	mkdir -p target
	gcc $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
	    -I$(JAVA_HOME)/include/ \
	    -I$(JAVA_HOME)/include/linux \
	    -fPIC -shared -Wall -g \
	    -o target/libsnappyjava.so \
	    src/main/java/org/xerial/snappy/SnappyNative.cpp -lsnappy

override_dh_auto_test-arch:

override_dh_auto_install-indep:
	dh_auto_install
	dh_installchangelogs -plibsnappy-java Milestone.md

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

override_dh_auto_clean:
	-dh_auto_clean
	rm -f pom.xml

get-orig-source:
	uscan --download-current-version --rename --force-download