makedeb
author cli
Thu, 20 Aug 2009 16:57:38 +0200
changeset 14 efce4ec25564
parent 3 2fdc9cc89502
permissions -rwxr-xr-x
Fix #548: API change; changed parameter type of Storage.getGroupsForList()
     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