makedeb
author cli
Wed Aug 26 10:55:59 2009 +0200 (2009-08-26)
changeset 23 e4345a26f81f
parent 2 1090e2141798
permissions -rwxr-xr-x
Proper reply on XDAEMON GROUPADD if group already existing (#551).
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