#!/bin/bash set -e export ROOT_DIR=$(readlink -e $(dirname $0)) pushd ${ROOT_DIR} source ${ROOT_DIR}/common_pkg_build # debuild default options DEB_OPTS="-us -uc" # Run parallel build by default ncpu=$(getconf _NPROCESSORS_ONLN) DEB_OPTS="$DEB_OPTS -j$ncpu" clone_repository # Also allow the user to create just the source package (skip build process) if [ "$1" == source ]; then prepare_tarball archive DEB_OPTS="-S $DEB_OPTS" else prepare_tarball fi cp ${ROOT_DIR}/${package}-${version}.tar.gz ${ROOT_DIR}/${package}_${version}.orig.tar.gz tar xzf ${package}_${version}.orig.tar.gz pushd ${ROOT_DIR}/${package}-${version} cp -r ${ROOT_DIR}/pkg/debian . if [ $(egrep "\.([a-z0-9]{8}\>|dirty)" .scmversion |wc -l) -gt 0 ]; then export DEBFULLNAME="LNG ODP" export DEBEMAIL="lng-odp@lists.linaro.org" dch --newversion ${version}-1 --urgency low "not a official release!" fi debuild $DEB_OPTS popd popd