#!/bin/sh
# get source for jebl-lib from SVN
NAME=jebl2

rm -f ../detail
mkdir -p ../tarballs
cd ../tarballs
# svn export concerves time stamps of the files, checkout does not
REV=`LC_ALL=C svn export http://${NAME}.googlecode.com/svn/trunk/ ${NAME} | tail -n 1 | sed 's/^.*revision \([0-9]\+\)./\1/'`
VERSION=0.0.r${REV}

find ${NAME} -name .svn -type d -exec rm -rf \{\} \;
rm -f ${NAME}/lib/*.jar
mv ${NAME} ${NAME}-${VERSION}

GZIP="--best --no-name" XZ_OPT="-6v" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.xz "${NAME}-${VERSION}"
rm -rf "${NAME}-${VERSION}"
