From 1e47072b9098083f91191b6994361fc286514b71 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 22 Jun 2009 23:42:23 +0200 Subject: [PATCH] Added support for OpenJDK. * debian/rules: - Pass appropriate JAVAC, JAVA_CPPFLAGS and JAVA_LDFLAGS variables to configure, using OpenJDK found in /usr/lib/jvm/java-6-openjdk. The archdir mapping used by the openjdk-6 Debian package is used to find libjvm.so in JAVA_HOME/jre/lib/ARCHDIR/server. * debian/control: - Build-depend on openjdk-6-jdk. * debian/collectd.install: - Install collectd-java.5. --- debian/changelog | 10 +++++++++- debian/collectd.install | 1 + debian/control | 2 +- debian/rules | 16 +++++++++++++++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index cc36aed..84a095e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,16 @@ collectd (4.7.1-1) unstable; urgency=low - Install collectd-unixsock.py to /usr/share/doc/collectd/examples/. - Pass CPPFLAGS and CFLAGS as arguments to configure instead of setting them in the environment - this is the recommended way. + - Pass appropriate JAVAC, JAVA_CPPFLAGS and JAVA_LDFLAGS variables to + configure, using OpenJDK found in /usr/lib/jvm/java-6-openjdk. The + archdir mapping used by the openjdk-6 Debian package is used to find + libjvm.so in JAVA_HOME/jre/lib/ARCHDIR/server. + * debian/control: + - Build-depend on openjdk-6-jdk. + * debian/collectd.install: + - Install collectd-java.5. - -- Sebastian Harl Mon, 22 Jun 2009 20:04:32 +0200 + -- Sebastian Harl Mon, 22 Jun 2009 23:37:08 +0200 collectd (4.6.3-1) unstable; urgency=low diff --git a/debian/collectd.install b/debian/collectd.install index 390f812..877c815 100644 --- a/debian/collectd.install +++ b/debian/collectd.install @@ -11,6 +11,7 @@ usr/share/man/man3/Collectd::Unixsock.3pm usr/share/man/man5/collectd-unixsock.5 usr/share/man/man5/collectd-email.5 usr/share/man/man5/collectd-exec.5 +usr/share/man/man5/collectd-java.5 usr/share/man/man5/collectd.conf.5 usr/share/man/man5/collectd-snmp.5 usr/share/man/man5/collectd-perl.5 diff --git a/debian/control b/debian/control index 31af514..d626dcf 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: collectd Section: utils Priority: optional Maintainer: Sebastian Harl -Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch, bison, flex, autotools-dev, pkg-config, linux-libc-dev (>= 2.6.25-4) | linux-libc-dev (<< 2.6.25-1), libcurl4-gnutls-dev (>= 7.18.2-5) | libcurl4-gnutls-dev (<= 7.18.2-1) | libcurl3-gnutls-dev, libmysqlclient15-dev, librrd-dev | librrd2-dev, libsensors-dev, liboping-dev (>= 0.3.3), libpcap0.8-dev | libpcap-dev, iptables-dev (>= 1.4.3.2-2), libupsclient1-dev, libperl-dev, iproute-dev [!alpha !amd64 !hppa !ia64 !ppc64 !mips !mipsel], libsnmp-dev | libsnmp9-dev, libvirt-dev (>= 0.4.0-6) [amd64 i386 powerpc], libxml2-dev, libhal-dev, libopenipmi-dev (>= 2.0.14-1~), libglib2.0-dev, libnotify-dev, libesmtp-dev, libpq-dev, libdbi0-dev, libmemcached-dev +Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch, bison, flex, autotools-dev, pkg-config, linux-libc-dev (>= 2.6.25-4) | linux-libc-dev (<< 2.6.25-1), libcurl4-gnutls-dev (>= 7.18.2-5) | libcurl4-gnutls-dev (<= 7.18.2-1) | libcurl3-gnutls-dev, libmysqlclient15-dev, librrd-dev | librrd2-dev, libsensors-dev, liboping-dev (>= 0.3.3), libpcap0.8-dev | libpcap-dev, iptables-dev (>= 1.4.3.2-2), libupsclient1-dev, libperl-dev, iproute-dev [!alpha !amd64 !hppa !ia64 !ppc64 !mips !mipsel], libsnmp-dev | libsnmp9-dev, libvirt-dev (>= 0.4.0-6) [amd64 i386 powerpc], libxml2-dev, libhal-dev, libopenipmi-dev (>= 2.0.14-1~), libglib2.0-dev, libnotify-dev, libesmtp-dev, libpq-dev, libdbi0-dev, libmemcached-dev, openjdk-6-jdk Build-Conflicts: libpthread-dev Standards-Version: 3.8.1 Homepage: http://collectd.org/ diff --git a/debian/rules b/debian/rules index 6f97f9e..de40b96 100755 --- a/debian/rules +++ b/debian/rules @@ -32,6 +32,18 @@ else CFLAGS += -O2 endif +# The archdir map has been copied from openjdk-6's debian/rules. +JAVA_ARCHDIR_MAP = alpha=alpha arm=arm armel=arm amd64=amd64 hppa=parisc \ + i386=i386 lpia=i386 m68k=m68k mips=mips mipsel=mipsel \ + powerpc=ppc sparc=sparc s390=s390 ia64=ia64 +JAVA_ARCHDIR = $(strip $(patsubst $(DEB_BUILD_ARCH)=%, %, \ + $(filter $(DEB_BUILD_ARCH)=%, $(JAVA_ARCHDIR_MAP)))) +JAVA_HOME = /usr/lib/jvm/java-6-openjdk + +JAVAC = $(JAVA_HOME)/bin/javac +JAVA_CPPFLAGS = -I$(JAVA_HOME)/include +JAVA_LDFLAGS = -L$(JAVA_HOME)/jre/lib/$(JAVA_ARCHDIR)/server + include /usr/share/dpatch/dpatch.make confflags = --host=$(DEB_HOST_GNU_TYPE) \ @@ -72,7 +84,9 @@ endif config.status: configure $(DPATCH_STAMPFN) dh_testdir - ./configure $(confflags) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" + ./configure $(confflags) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + JAVAC="$(JAVAC)" JAVA_CPPFLAGS="$(JAVA_CPPFLAGS)" \ + JAVA_LDFLAGS="$(JAVA_LDFLAGS)" build: build-stamp -- 2.30.2