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