summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2012-12-25 16:33:38 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2012-12-25 16:33:38 +0200
commit4e5ad32b4cc002364e7f36e87d2e6419ffef8b55 (patch)
treef56eec51b1f2c7ca6a440e039334c25013319bcd
parentd5cf866a087b872feb66278c346723b595199a39 (diff)
downloadgrub-4e5ad32b4cc002364e7f36e87d2e6419ffef8b55.tar.gz
Add GRUB packaging script
-rwxr-xr-xgrub-pkg.sh54
-rwxr-xr-xgrub.sh2
2 files changed, 55 insertions, 1 deletions
diff --git a/grub-pkg.sh b/grub-pkg.sh
new file mode 100755
index 0000000..bb9fc79
--- /dev/null
+++ b/grub-pkg.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+set -e
+
+pkg_source=linaro-grub
+pkg_repository=http://bazaar.launchpad.net/~leif-lindholm/linaro-grub/arm-uboot
+
+packaging_dir=grub/debian
+packaging_repository=git://git.linaro.org/ci/grub.git
+packaging_commit=`cd grub && git log -n1 --pretty=format:%h`
+
+bzr_commit=`bzr revno ${pkg_repository}`
+if [ -z "${bzr_commit}" ]; then
+ echo "Invalid bzr revision: ${bzr_commit}" >&2
+ exit 1
+fi
+
+base_version=2.00
+pkg_version=${base_version}+bzr${bzr_commit}+`date +%Y%m%d`
+pkg_dir=${pkg_source}-${pkg_version}
+
+tar -jxf ${pkg_source}_${pkg_version}.orig.tar.bz2
+mkdir ${pkg_dir}/debian
+
+distributions=(quantal)
+currentdate=`date -R`
+for distribution in ${distributions[@]}; do
+ echo "Prepare ${pkg_version} for ${distribution}"
+
+cat > ${pkg_dir}/debian/changelog << EOF
+${pkg_source} (1:${pkg_version}-0linaro1) ${distribution}; urgency=low
+
+ * CI - ${pkg_source} snapshot:
+ - repository: ${pkg_repository}
+ - commit: ${bzr_commit}
+ - build: ${BUILD_URL}
+
+ - debian/ repository: ${packaging_repository}
+ - debian/ commit: ${packaging_commit}
+
+ -- Linaro Packagers <linaro-pkg@lists.launchpad.net> ${currentdate}
+
+EOF
+
+ cat ${packaging_dir}/changelog >> ${pkg_dir}/debian/changelog
+ rm -f ${packaging_dir}/changelog
+ cp -a ${packaging_dir}/* ${pkg_dir}/debian/
+
+ cd ${pkg_dir}
+ dpkg-buildpackage -us -uc -rfakeroot -S
+ cd ..
+done
+
+rm -rf ${pkg_dir}
diff --git a/grub.sh b/grub.sh
index f532533..0d9927c 100755
--- a/grub.sh
+++ b/grub.sh
@@ -6,7 +6,6 @@
set -e
pkg_source=linaro-grub
-base_version=2.00
pkg_repository=http://bazaar.launchpad.net/~leif-lindholm/linaro-grub/arm-uboot
bzr_commit=`bzr revno ${pkg_repository}`
@@ -15,6 +14,7 @@ if [ -z "${bzr_commit}" ]; then
exit 1
fi
+base_version=2.00
pkg_version=${base_version}+bzr${bzr_commit}+`date +%Y%m%d`
pkg_dir=${pkg_source}-${pkg_version}