File: rules

package info (click to toggle)
jblas 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 1,612 kB
  • sloc: java: 11,783; ansic: 5,024; ruby: 2,379; xml: 333; makefile: 151; sh: 6
file content (50 lines) | stat: -rwxr-xr-x 1,909 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
#!/usr/bin/make -f

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
export JAVA_HOME := /usr/lib/jvm/default-java
export CLASSPATH := /usr/share/java/ant-nodeps.jar:/usr/share/java/junit4.jar:/usr/share/java/ant-junit4.jar:/usr/share/java/ant-junit.jar

%:
	dh $@ --buildsystem=ant

override_dh_auto_build:
	# Build the native libraries first
	mkdir -p debian/tmp/locale/
	localedef -f UTF-8 -i en_US ./debian/tmp/locale/en_US.UTF-8/
	export LOCPATH=$(CURDIR)/debian/tmp/locale/ && \
		export LC_ALL=en_US.UTF-8 && \
		./configure --libpath=/usr/lib/$(DEB_HOST_MULTIARCH):/usr/lib/$(DEB_HOST_MULTIARCH)/atlas
	export LOCPATH=$(CURDIR)/debian/tmp/locale/ && \
		export LC_ALL=en_US.UTF-8 && \
		$(MAKE)
	# Build the jar files
	dh_auto_build -- minimal-jar javadoc

override_dh_auto_clean:
	dh_auto_clean -- clean clean-jars

override_dh_install:
	install -m755 -d debian/jblas/usr/lib/jni
	install -m644 $(shell find ./src/main/resources/lib/dynamic -name '*.so') debian/jblas/usr/lib/jni
	install -m644 -D jblas-minimal-$(DEB_VERSION_UPSTREAM)-SNAPSHOT.jar \
		debian/jblas/usr/share/java/jblas-$(DEB_VERSION_UPSTREAM)-SNAPSHOT.jar

override_dh_link:
	dh_link
	dh_link -pjblas /usr/share/java/jblas-$(DEB_VERSION_UPSTREAM)-SNAPSHOT.jar /usr/share/java/jblas.jar

override_dh_auto_test:
	# the tests need to be able to find the JNI libs
ifeq ($(DEB_BUILD_ARCH),powerpc)
	export LD_LIBRARY_PATH=$(CURDIR)/src/main/resources/lib/dynamic/Linux/ppc
else ifeq ($(DEB_BUILD_ARCH),arm64)
	export LD_LIBRARY_PATH=$(CURDIR)/src/main/resources/lib/dynamic/Linux/aarch64
else ifeq ($(DEB_BUILD_ARCH),ppc64el)
	export LD_LIBRARY_PATH=$(CURDIR)/src/main/resources/lib/dynamic/Linux/ppc64
else
	export LD_LIBRARY_PATH=$(CURDIR)/src/main/resources/lib/dynamic/Linux/$(DEB_BUILD_ARCH)
endif
	dh_auto_test