__chmod=`which chmod`
__grep=`which grep`
__egrep=`which egrep`
+__debsign=`which debsign`
# git definitions
__git_clone="$__git clone -q"
function clone_repository() {
local repo
repo=$1
- `$__git_clone $repo.git >> $__output_file 2>&1 `
+ $__git_clone $repo.git >> $__output_file 2>&1
return $?
}
fi
cd $repo
- `$__git_pull >> $__output_file 2>&1`
+ $__git_pull >> $__output_file 2>&1
cd - > /dev/null 2>&1
return 0
fi
cd $repo
- `$__git_reset >> $__output_file 2>&1`
- `$__git_clean >> $__output_file 2>&1`
+ $__git_reset >> $__output_file 2>&1
+ $__git_clean >> $__output_file 2>&1
cd - > /dev/null 2>&1
return 0
cat << EOF > $dir/sbox_build_pkgs
#!/bin/bash
+export DEBFULLNAME="$DEBFULLNAME"
+export DEBEMAIL="$DEBEMAIL"
+
cd $dir/`basename $dir`
-NOCONFIGURE=1 ./autogen.sh >> $dir/sbox_build_pkgs.log 2>&1 || exit 1
+
+if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh >> $dir/sbox_build_pkgs.log 2>&1 || exit 1
+fi
+
+VERSION=\`$__sbox_dpkg_parsechangelog | grep Version: | cut -d" " -f2 | cut -d- -f1\`
+REVISION=\`$__sbox_dpkg_parsechangelog | grep Version: | cut -d- -f2\`
+
+$__sbox_dch -v \$VERSION+cvs$__today-\$REVISION -D $__distro "Snapshot CVS release of $__today" >> $dir/sbox_build_pkgs.log 2>&1 || exit 1
$__sbox_dpkg_buildpackage $__build_pkg_options >> $dir/sbox_build_pkgs.log 2>&1
exit \$?
EOF
- `$__chmod 755 $dir/sbox_build_pkgs`
- `$__sbox $dir/sbox_build_pkgs`
+ $__chmod 755 $dir/sbox_build_pkgs
+ $__sbox $dir/sbox_build_pkgs
return $?
}
exit \$?
EOF
- `$__chmod 755 $dir/sbox_install_pkgs`
- `$__sbox $dir/sbox_install_pkgs` || return 1
+ $__chmod 755 $dir/sbox_install_pkgs
+ $__sbox $dir/sbox_install_pkgs || return 1
for package in $dir/*.deb; do
pkg=`basename $package | cut -d_ -f1`
EOF
__installed_packages=""
- `$__chmod 755 /tmp/sbox_uninstall_pkgs`
- `$__sbox /tmp/sbox_uninstall_pkgs`
+ $__chmod 755 /tmp/sbox_uninstall_pkgs
+ $__sbox /tmp/sbox_uninstall_pkgs
return $?
}
+function sign_pkgs() {
+ local dir
+ dir=$1
+
+ cd $dir
+ $__debsign *.changes >> $dir/sign_pkgs.log 2>&1 || return 1
+
+ cd - > /dev/null 2>&1
+
+ return 0
+}
+
function get_sources() {
local modules
local repo
log_to_file "setup_distro(): pkg_dir..........: $__pkg_dir"
fi
- log_to_file "setup_distro(): Returning $ret"
-
return $ret
}
__sbox_maemo3_debian_bin_path="/scratchbox/devkits/maemo3-debian/bin"
__sbox_dpkg="$__sbox_maemo3_debian_bin_path/dpkg"
__sbox_dpkg_buildpackage="$__sbox_dpkg-buildpackage"
+ __sbox_dpkg_parsechangelog="$__sbox_dpkg-parsechangelog"
__sbox_debian_sarge_bin_path="/scratchbox/devkits/debian-sarge/bin"
__sbox_dch="$__sbox_debian_sarge_bin_path/dch"
local target
target=$1
- `$__sbox_sb_conf select $target`
+ $__sbox_sb_conf select $target >> $__output_file 2>&1
return $?
}
build_pkg /tmp/$module
msg_end $?
+ msg_begin " Signing $module packages"
+ sign_pkgs /tmp/$module
+ msg_end $?
+
msg_begin " Installing $module packages"
install_pkgs /tmp/$module
msg_end $?