From 1c72b25e1ee042e2a8e8a16eec7239c98e6cd892 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Thu, 9 Jun 2011 15:39:49 -0700 Subject: [PATCH] pkg: fix up debian package to actually work A number of changes have left the debian package broken including the javalibdir changes and version bumps. Fix these minor issues. Then I also automated the version number creation so that every time you call pkg/build-debian.sh it generates a new version number if the HEAD has moved. It is a little hacky but solves the version bumping issue for now. --- .gitignore | 1 + configure.in | 6 ++++++ pkg/build-debian.sh | 9 +++++++++ pkg/debian/changelog | 18 +++--------------- pkg/debian/rules | 2 +- pkg/debian/stratcon.install | 4 ++-- src/java/Makefile.in | 2 +- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 5de098e8b..7abd1c9b1 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ test/test-stratcon.crt test/test-stratcon.csr test/test-stratcon.key test/t/logs +pkg/debian/changelog diff --git a/configure.in b/configure.in index 6e44d1311..4aebdfb70 100755 --- a/configure.in +++ b/configure.in @@ -660,6 +660,12 @@ AC_DEFINE_UNQUOTED(MODULES_DIR, "${fullpath}/noit") MODULES_DIR=${fullpath}/noit AC_SUBST(MODULES_DIR) +JAVA_LIB_DIR="$prefix/java" +AC_ARG_WITH(java-libdir, + [--with-javalibdir=PFX prefix to install java libs (optional)], + [JAVA_LIB_DIR=$withval],) +AC_SUBST(JAVA_LIB_DIR) + AC_MSG_CHECKING([Resolving sysconfdir path...]) fullpath=$sysconfdir while test "x$temppath" != "x$fullpath" ; do diff --git a/pkg/build-debian.sh b/pkg/build-debian.sh index a7df77766..1f271da2d 100755 --- a/pkg/build-debian.sh +++ b/pkg/build-debian.sh @@ -4,6 +4,15 @@ set -e ln -sf pkg/debian debian +HEADFILE="pkg/HEAD" +HEAD=`git log -1 HEAD --pretty=%h` +[ -f $HEADFILE ] && OLDHEAD=`cat $HEADFILE` + +if [ "x$HEAD" != "x$OLDHEAD" ]; then + dch -v `date +"%Y%m%d%H%M%S"` "HEAD `git log -1 HEAD --abbrev-commit --pretty=oneline`" + echo $HEAD > $HEADFILE +fi + dpkg-buildpackage -rfakeroot -tc rm debian diff --git a/pkg/debian/changelog b/pkg/debian/changelog index 5166e632f..533dec76f 100644 --- a/pkg/debian/changelog +++ b/pkg/debian/changelog @@ -1,17 +1,5 @@ -reconnoiter (0.0.1+20110411) lucid; urgency=low +reconnoiter (20110609153158) lucid; urgency=low - * New git snapshot + * HEAD d3e7ae2 buildtools: fix == bashism in mkversion.sh - -- Thom May Mon, 11 Apr 2011 06:10:07 -0700 - -reconnoiter (0.0.1+20110204) lucid; urgency=low - - * New svn snapshot - - -- Thom May Fri, 04 Feb 2011 03:03:38 -0800 - -reconnoiter (0.0.1+20110125) lucid; urgency=low - - * First upload. - - -- Thom May Tue, 25 Jan 2011 16:14:40 +0000 + -- Brandon Philips Thu, 09 Jun 2011 15:31:58 -0700 diff --git a/pkg/debian/rules b/pkg/debian/rules index 05e112e52..0fd00b9f5 100755 --- a/pkg/debian/rules +++ b/pkg/debian/rules @@ -10,7 +10,7 @@ build: build-stamp build-stamp: autoconf - ./configure --prefix=/usr --libexecdir=/usr/lib --sysconfdir=/etc/reconnoiter --localstatedir=/var/lib/reconnoiter --datarootdir=/usr/share + ./configure --prefix=/usr --libexecdir=/usr/lib --sysconfdir=/etc/reconnoiter --localstatedir=/var/lib/reconnoiter --datarootdir=/usr/share --with-java-libdir=/usr/share/java $(MAKE) touch $@ diff --git a/pkg/debian/stratcon.install b/pkg/debian/stratcon.install index b658e50f1..a282325b6 100644 --- a/pkg/debian/stratcon.install +++ b/pkg/debian/stratcon.install @@ -7,9 +7,9 @@ usr/share/java/lib/cglib-nodep-2.2.jar usr/share/java/lib/commons-dbcp-1.2.2.jar usr/share/java/lib/commons-io-1.2.jar usr/share/java/lib/commons-pool-1.4.jar -usr/share/java/lib/esper-3.5.0.jar +usr/share/java/lib/esper-4.1.0.jar usr/share/java/lib/postgresql-8.3-604.jdbc3.jar -usr/share/java/lib/rabbitmq-client.jar +usr/share/java/lib/rabbitmq-client-2.4.1.jar usr/share/java/lib/spring-beans-2.5.5.jar usr/share/java/lib/spring-context-2.5.5.jar usr/share/java/reconnoiter.jar diff --git a/src/java/Makefile.in b/src/java/Makefile.in index 2e6dae711..2ecce5b31 100644 --- a/src/java/Makefile.in +++ b/src/java/Makefile.in @@ -10,7 +10,7 @@ exec_prefix=@exec_prefix@ bindir=@bindir@ sbindir=@sbindir@ libdir=@libdir@ -javalibdir=@prefix@/java +javalibdir=@JAVA_LIB_DIR@ includedir=${prefix}/include libexecdir=@libexecdir@ localstatedir=@localstatedir@