Skip to content

Commit

Permalink
pkg: fix up debian package to actually work
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Brandon Philips committed Jun 9, 2011
1 parent d3e7ae2 commit 1c72b25
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ test/test-stratcon.crt
test/test-stratcon.csr
test/test-stratcon.key
test/t/logs
pkg/debian/changelog
6 changes: 6 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions pkg/build-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 3 additions & 15 deletions pkg/debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> Mon, 11 Apr 2011 06:10:07 -0700

reconnoiter (0.0.1+20110204) lucid; urgency=low

* New svn snapshot

-- Thom May <[email protected]> Fri, 04 Feb 2011 03:03:38 -0800

reconnoiter (0.0.1+20110125) lucid; urgency=low

* First upload.

-- Thom May <[email protected]> Tue, 25 Jan 2011 16:14:40 +0000
-- Brandon Philips <[email protected]> Thu, 09 Jun 2011 15:31:58 -0700
2 changes: 1 addition & 1 deletion pkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@

Expand Down
4 changes: 2 additions & 2 deletions pkg/debian/stratcon.install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/java/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand Down

0 comments on commit 1c72b25

Please sign in to comment.