debian swirl logo

Back to the packages list mysql-connector-java

#!/usr/bin/make -f

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

VERSION := $(shell dpkg-parsechangelog | grep ^Version: | sed 's/Version: //' | cut -f1 -d- | cut -f1 -d+)

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

DEB_JARS := ant ant-launcher ant-junit junit ant-contrib slf4j-api
DEB_ANT_ARGS := -Dcom.mysql.jdbc.java6.javac=$(JAVA_HOME)/bin/javac \
    -Dcom.mysql.jdbc.java6.rtjar=$(JAVA_HOME)/jre/lib/rt.jar \
    -Dsnapshot.version= \
    -Dcom.mysql.jdbc.extra.libs=lib \
    -Dant.build.javac.source=1.6 \
    -Dant.build.javac.target=1.6

pre-build::
		mkdir -p lib
		ln -f -s /usr/share/java/ant-contrib.jar lib/ant-contrib.jar

binary-post-install/libmysql-java::
		mh_installpoms -plibmysql-java -e$(VERSION)
		mh_installjar -plibmysql-java -e$(VERSION) -l src/doc/sources/pom.xml build/mysql-connector-java-$(VERSION)/mysql-connector-java-$(VERSION)-bin.jar
	# compat link?
		dh_link -plibmysql-java usr/share/java/mysql-connector-java.jar usr/share/java/mysql.jar

clean::
		rm -rf dist lib
		rm -f build-stamp
		mh_clean

get-orig-source:
		uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename

Builds:

libmysql-java
java database (jdbc) driver for mysql