makedeb
author cli
Mon Aug 24 13:00:05 2009 +0200 (2009-08-24)
changeset 20 6ae5e4f8329b
parent 2 1090e2141798
permissions -rwxr-xr-x
Add stubs for org.sonews.acl and add method "impliedCapability" for org.sonews.command.Command interface.
     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