File: rules

package info (click to toggle)
xerial-sqlite-jdbc 3.46.1.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,244 kB
  • sloc: java: 18,649; sh: 2,890; ansic: 2,830; xml: 455; makefile: 198
file content (47 lines) | stat: -rwxr-xr-x 1,415 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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

JAVA_HOME=/usr/lib/jvm/default-java
include /usr/share/dpkg/architecture.mk


%:
	dh $@ --buildsystem=maven --with javahelper

override_dh_auto_clean:
	dh_auto_clean
	if [ -e VERSION.old ]; then mv VERSION.old VERSION; fi
	if [ -e debian/maven.properties ]; then rm debian/maven.properties; fi
	# Cleaning the native part.
	$(MAKE) clean

override_dh_auto_configure:
	# Setting the version of installed sqlite3 lib in the VERSION file, using dpkg
	# to get this version number.
	# Also putting it in d/maven.properties...
	cp VERSION VERSION.old
	sqliteVersion=$$(dpkg -s libsqlite3-dev | grep "Version" | sed 's/Version: \(.*\)-.*/\1/') && \
	        echo "version=$$sqliteVersion" > VERSION && \
	        echo "sqlite.version=$$sqliteVersion" > debian/maven.properties
	# Together with the architecture.
	echo "build.architecture=$$(arch)" >> debian/maven.properties
	dh_auto_configure

override_dh_auto_build-arch:
	# Build JNI
	export JAVA_HOME=$(JAVA_HOME) && \
	        export DEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH) && \
	        $(MAKE)

override_dh_auto_test-arch:

override_dh_auto_test-indep: override_dh_auto_build-arch
	# ensure the native library is run before running the tests.
	dh_auto_test -i

override_dh_auto_install-arch:
	dh_install -p libxerial-sqlite-jdbc-jni