summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2012-04-13 19:31:00 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2012-04-13 19:31:00 +0300
commitb354b37ce40fbd7cf87a9fd8fb5dd79b26b9d4f2 (patch)
tree93fe1e79fc824809c696a512c6ba8df7fb031652
downloadlibjpeg-turbo-ci-b354b37ce40fbd7cf87a9fd8fb5dd79b26b9d4f2.tar.gz
Initial libjpeg-turbo CI script
-rwxr-xr-xlibjpeg-turbo-ci.sh65
1 files changed, 65 insertions, 0 deletions
diff --git a/libjpeg-turbo-ci.sh b/libjpeg-turbo-ci.sh
new file mode 100755
index 0000000..5116c7c
--- /dev/null
+++ b/libjpeg-turbo-ci.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+set -e
+
+pkg_source=libjpeg-turbo
+base_version=1.2.1
+pkg_repository=git://git.linaro.org/people/tomgall/${pkg_source}-leb/${pkg_source}.git_commit
+
+git clone ${pkg_repository}
+
+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
+
+pkg_version=${base_version}+git${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}"
+
+ # checkout packaging branch
+ #git clone ...debian
+ #rm -rf ${pkg_dir}/debian
+ #mv debian ${pkg_dir}
+
+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 <linaro-pkg@lists.launchpad.net> ${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
+
+# FIXME: Automatic signing and upload to Linaro Staging Overlay PPA
+#
+#[ppa-linaro-staging-overlay-${distribution}]
+#fqdn = ppa.launchpad.net
+#method = ftp
+#incoming = ~linaro-maintainers/staging-overlay/ubuntu/${distribution}
+#login = anonymous
+#allow_unsigned_uploads = 0
+#
+#keyid=YOURKEYID
+#debsign -k{keyid} ${pkg_source}_${pkg_version_dpkg}_source.changes
+#dput ppa-linaro-staging-overlay-${distribution} ${pkg_source}_${pkg_version_dpkg}_source.changes