#!/bin/bash set -e pkg_source=libjpeg-turbo pkg_repository=git://git.linaro.org/people/tomgall/${pkg_source}-leb/${pkg_source}.git git clone ${pkg_repository} cd ${pkg_source} git checkout -b linaro-leb origin/Linaro-LEB cd .. git_commit=`cd ${pkg_source} && git log -n1 --pretty=format:%h` if [ -z "${git_commit}" ]; then echo "Invalid git revision: ${git_commit}" >&2 exit 1 fi base_version=`cd ${pkg_source}/branches/1.2.x && dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d '-'` pkg_version=${base_version}~ci${BUILD_NUMBER}+`date +%Y%m%d`+${git_commit} pkg_dir=${pkg_source}-${pkg_version} cp -a ${pkg_source}/branches/1.2.x ${pkg_dir} tar --exclude-vcs --exclude=debian -jcf ${pkg_source}_${pkg_version}.orig.tar.bz2 ${pkg_dir} distributions=(precise) currentdate=`date -R` for distribution in ${distributions[@]}; do echo "Prepare ${pkg_version} for ${distribution}" cat > ${pkg_dir}/debian/changelog << EOF ${pkg_source} (${pkg_version}-0linaro1) ${distribution}; urgency=low * CI - ${pkg_source} snapshot: - repository: ${pkg_repository} - commit: ${git_commit} - build: ${BUILD_URL} -- Linaro Packagers ${currentdate} EOF cat ${pkg_source}/branches/1.2.x/debian/changelog >> ${pkg_dir}/debian/changelog dpkg-source -b ${pkg_dir} cd ${pkg_dir} pkg_version_dpkg=`dpkg-parsechangelog | sed -n 's/^Version: //p'` dpkg-genchanges -S > ../${pkg_source}_${pkg_version_dpkg}_source.changes cd .. done rm -rf ${pkg_source} ${pkg_dir} keyid=B86C70FE debsign -k${keyid} ${pkg_source}_${pkg_version_dpkg}_source.changes dput ppa-linaro-staging-overlay-${distribution} ${pkg_source}_${pkg_version_dpkg}_source.changes # debsign/gpg and dput are assumed configured on the build system #[ppa-linaro-staging-overlay-${distribution}] #fqdn = ppa.launchpad.net #method = ftp #incoming = ~linaro-maintainers/staging-overlay/ubuntu/${distribution} #login = anonymous