makedeb
author cli
Sun, 09 May 2010 12:38:46 +0200
changeset 30 146b3275b792
parent 3 2fdc9cc89502
permissions -rwxr-xr-x
The StorageBackendException is catched two times so that the user see the "500 internal server error" only at the second catch (probably fixes #5).
     1 #!/bin/bash -x
     2 PACKAGE_ROOT=sonews
     3 
     4 # Compile classes 
     5 scons
     6 
     7 # Create JAR files; this cannot be done with SCons,
     8 # because Scons looses inner classes.
     9 jar -cf sonews.jar -C classes/ org/
    10 jar -ufe sonews.jar org.sonews.Main
    11 jar -cf test.jar -C classes/ test/ 
    12 jar -ufe test.jar test.TestBench
    13 jar -cf sonews-helpers.jar helpers/
    14 
    15 # Create faked root for packaging
    16 sudo rm -r $PACKAGE_ROOT/
    17 mkdir -p $PACKAGE_ROOT/usr/share/java
    18 mkdir -p $PACKAGE_ROOT/usr/bin
    19 mkdir -p $PACKAGE_ROOT/etc/sonews
    20 mkdir -p $PACKAGE_ROOT/usr/share/doc/sonews/
    21 cp -r DEBIAN $PACKAGE_ROOT/
    22 cp helpers/sonews $PACKAGE_ROOT/usr/bin/sonews
    23 cp helpers/sonews.conf.sample $PACKAGE_ROOT/etc/sonews/sonews.conf
    24 cp helpers/copyright $PACKAGE_ROOT/usr/share/doc/sonews/
    25 cp sonews*.jar $PACKAGE_ROOT/usr/share/java/
    26 
    27 sudo chown root:root -R $PACKAGE_ROOT/
    28 
    29 dpkg-deb --build $PACKAGE_ROOT
    30 
    31 # Cleanup
    32 sudo rm -r $PACKAGE_ROOT
    33 rm -r classes/
    34 
    35 # Check debs
    36 lintian sonews.deb