makedeb
author chris <chris@marvin>
Wed, 01 Jul 2009 10:48:22 +0200
changeset 2 1090e2141798
parent 1 6fceb66e1ad7
child 3 2fdc9cc89502
permissions -rwxr-xr-x
sonews/0.5.1 fixes merged
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@1
    10
jar -ufe sonews.jar org.sonews.daemon.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@2
    14
jar -uf sonews.jar org/sonews/web/tmpl/*.tmpl
chris@1
    15
chris@1
    16
# Create faked root for packaging
chris@1
    17
sudo rm -r $PACKAGE_ROOT/
chris@1
    18
mkdir -p $PACKAGE_ROOT/usr/share/java
chris@1
    19
mkdir -p $PACKAGE_ROOT/usr/bin
chris@1
    20
mkdir -p $PACKAGE_ROOT/etc/sonews
chris@1
    21
mkdir -p $PACKAGE_ROOT/usr/share/doc/sonews/
chris@1
    22
cp -r DEBIAN $PACKAGE_ROOT/
chris@1
    23
cp helpers/sonews $PACKAGE_ROOT/usr/bin/sonews
chris@1
    24
cp helpers/sonews.conf.sample $PACKAGE_ROOT/etc/sonews/sonews.conf
chris@1
    25
cp helpers/copyright $PACKAGE_ROOT/usr/share/doc/sonews/
chris@1
    26
cp sonews*.jar $PACKAGE_ROOT/usr/share/java/
chris@1
    27
chris@1
    28
sudo chown root:root -R $PACKAGE_ROOT/
chris@1
    29
chris@1
    30
dpkg-deb --build $PACKAGE_ROOT
chris@1
    31
chris@1
    32
# Cleanup
chris@1
    33
sudo rm -r $PACKAGE_ROOT
chris@1
    34
rm -r classes/
chris@1
    35
chris@1
    36
# Create metapackage sonews-web
chris@1
    37
PACKAGE_ROOT=sonews-web
chris@1
    38
mkdir $PACKAGE_ROOT
chris@1
    39
cp -r DEBIAN-web $PACKAGE_ROOT/DEBIAN
chris@1
    40
dpkg-deb --build $PACKAGE_ROOT
chris@1
    41
rm -r $PACKAGE_ROOT
chris@1
    42
chris@1
    43
# Check debs
chris@1
    44
lintian sonews.deb
chris@1
    45
lintian sonews-web.deb