5 system('rm -rf build');
8 #- copy stuff and remove unneeded
9 system('cp -a ../* build');
10 system('mv build/ext/libadds.so build/lib/booh');
11 system('rm -rf build/ext build/icons');
13 #- need a version.rb file
14 output('build/lib/booh/version.rb', q{
16 $VERSION = IO.readlines("#{ENV['BOOH_TOPDIR']}/VERSION").join.chomp
19 #- need a config.rb file to locate data through FPATH
20 output('build/lib/booh/config.rb', q{
22 $FPATH = ENV['BOOH_TOPDIR'] + '/data/booh'
25 #- launch all programs with "launch.sh" to properly set the topdir and libdir
26 output('build/launch.sh', q{#!/bin/sh
28 echo '********* WARNING ********
29 * To run properly, you first need to install ruby, ruby-gettext (libgettext-ruby),
30 * ruby-gtk2 (libgtk2-ruby), exif, libexiv2, convert/identify (ImageMagick),
33 * You will see some failure now (or during startup check) if some are missing.
34 **************************
37 bin=`echo $0 | sed -e 's|.*/||'`
38 export BOOH_TOPDIR=`readlink -f "$0" | sed -re 's|/[^/]+$||'`
40 ruby -I $BOOH_TOPDIR/lib $BOOH_TOPDIR/bin/$bin $*
42 chmod 0755, 'build/launch.sh';
44 foreach my $binary (glob('build/bin/*')) {
46 system("ln -s launch.sh build/$binary");
49 #- find other binaries and MO files
50 substInFile { s|call_backend\("booh-backend|call_backend(ENV['BOOH_TOPDIR'] + "/booh-backend| } 'build/bin/booh';
51 substInFile { s|cmd = "booh-|cmd = ENV['BOOH_TOPDIR'] + "/booh-| } 'build/lib/booh/booh-lib.rb';
52 -f 'build/data/locale/fr/LC_MESSAGES/booh.mo' or die "MO files missing";
53 substInFile { s|bindtextdomain\("booh"\)|bindtextdomain("booh", { :path => ENV['BOOH_TOPDIR'] + '/data/locale' })| } 'build/lib/booh/booh-lib.rb';