debian swirl logo

Back to the packages list jblas

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

JAVA_HOME            := /usr/lib/jvm/default-java
DEB_ANT_BUILDFILE    := build.xml
DEB_ANT_BUILD_TARGET := minimal-jar javadoc
DEB_ANT_CLEAN_TARGET := clean clean-jars
DEB_ANT_CHECK_TARGET := test
DEB_JARS := ant-nodeps.jar junit4.jar ant-junit4.jar ant-junit.jar

# tell CDBS to be more verbose
DEB_VERBOSE_ALL := true

# override DEB_ANT_INVOKE
#DEB_ANT_INVOKE := export LOCPATH=$(CURDIR)/debian/tmp/locale/ && export LC_ALL=en_US.UTF-8 && $(DEB_ANT_INVOKE)

clean::
		make clean || true
		rm -rf target

debian/stamp-ant-build: debian/stamp-jblas-build
debian/stamp-jblas-build:
		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:/usr/lib/atlas
	export LOCPATH= $(CURDIR)/debian/tmp/locale/ && \
		export LC_ALL= en_US.UTF-8 && \
			make
		touch $@

debian/stamp-ant-check:
	# the tests need to be able to find the JNI libs
ifeq ($(DEB_BUILD_ARCH_CPU),powerpc)
	export LD_LIBRARY_PATH= $(CURDIR)/src/main/resources/lib/dynamic/Linux/ppc \
               && $(DEB_ANT_INVOKE) $(DEB_ANT_CHECK_TARGET)
else
	export LD_LIBRARY_PATH= $(CURDIR)/src/main/resources/lib/dynamic/Linux/$(DEB_BUILD_ARCH_CPU) \
			&& $(DEB_ANT_INVOKE) $(DEB_ANT_CHECK_TARGET)
endif
		touch $@

install/jblas::
		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_UPSTREAM_VERSION)-SNAPSHOT.jar debian/jblas/usr/share/java/jblas-$(DEB_UPSTREAM_VERSION)-SNAPSHOT.jar
		dh_link -pjblas /usr/share/java/jblas-$(DEB_UPSTREAM_VERSION)-SNAPSHOT.jar /usr/share/java/jblas.jar

install/jblas-doc:: debian/stamp-install-jblas-doc
debian/stamp-install-jblas-doc:
	#install javadoc javadoc
		install -m755 -d debian/jblas-doc/usr/share/doc/jblas-doc
		cp -r javadoc debian/jblas-doc/usr/share/doc/jblas-doc/
		touch $@

get-orig-source:
		-uscan --rename --upstream-version 0
		@echo successfully retrieved upstream tarball

Builds:

jblas-doc
fast linear algebra library for java
jblas
fast linear algebra library for java