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