author | cli |
Thu, 20 Aug 2009 18:41:21 +0200 | |
changeset 15 | f2293e8566f5 |
parent 3 | 2fdc9cc89502 |
permissions | -rwxr-xr-x |
chris@1 | 1 |
#!/bin/bash -x |
chris@1 | 2 |
PACKAGE_ROOT=sonews |
chris@1 | 3 |
|
chris@1 | 4 |
# Compile classes |
chris@1 | 5 |
scons |
chris@1 | 6 |
|
chris@1 | 7 |
# Create JAR files; this cannot be done with SCons, |
chris@1 | 8 |
# because Scons looses inner classes. |
chris@1 | 9 |
jar -cf sonews.jar -C classes/ org/ |
chris@3 | 10 |
jar -ufe sonews.jar org.sonews.Main |
chris@1 | 11 |
jar -cf test.jar -C classes/ test/ |
chris@1 | 12 |
jar -ufe test.jar test.TestBench |
chris@1 | 13 |
jar -cf sonews-helpers.jar helpers/ |
chris@1 | 14 |
|
chris@1 | 15 |
# Create faked root for packaging |
chris@1 | 16 |
sudo rm -r $PACKAGE_ROOT/ |
chris@1 | 17 |
mkdir -p $PACKAGE_ROOT/usr/share/java |
chris@1 | 18 |
mkdir -p $PACKAGE_ROOT/usr/bin |
chris@1 | 19 |
mkdir -p $PACKAGE_ROOT/etc/sonews |
chris@1 | 20 |
mkdir -p $PACKAGE_ROOT/usr/share/doc/sonews/ |
chris@1 | 21 |
cp -r DEBIAN $PACKAGE_ROOT/ |
chris@1 | 22 |
cp helpers/sonews $PACKAGE_ROOT/usr/bin/sonews |
chris@1 | 23 |
cp helpers/sonews.conf.sample $PACKAGE_ROOT/etc/sonews/sonews.conf |
chris@1 | 24 |
cp helpers/copyright $PACKAGE_ROOT/usr/share/doc/sonews/ |
chris@1 | 25 |
cp sonews*.jar $PACKAGE_ROOT/usr/share/java/ |
chris@1 | 26 |
|
chris@1 | 27 |
sudo chown root:root -R $PACKAGE_ROOT/ |
chris@1 | 28 |
|
chris@1 | 29 |
dpkg-deb --build $PACKAGE_ROOT |
chris@1 | 30 |
|
chris@1 | 31 |
# Cleanup |
chris@1 | 32 |
sudo rm -r $PACKAGE_ROOT |
chris@1 | 33 |
rm -r classes/ |
chris@1 | 34 |
|
chris@1 | 35 |
# Check debs |
chris@1 | 36 |
lintian sonews.deb |