summaryrefslogtreecommitdiff
path: root/tools/gator/debian/scripts/do-packaging
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2012-05-17 11:55:16 +0100
committerJon Medhurst <tixy@linaro.org>2012-05-23 09:07:43 +0100
commit75ae3ec8fe927285d2220acb87a2fa087b9d5f47 (patch)
tree000071d4ba72312df1576dfe12fd89eaea724273 /tools/gator/debian/scripts/do-packaging
parent2934a4eeb47b768fd30a4aa061c8d1deaa5499dd (diff)
gator: ubuntu: Add DKMS package
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'tools/gator/debian/scripts/do-packaging')
-rwxr-xr-xtools/gator/debian/scripts/do-packaging24
1 files changed, 20 insertions, 4 deletions
diff --git a/tools/gator/debian/scripts/do-packaging b/tools/gator/debian/scripts/do-packaging
index 9562f2a685b..5eaa338eb97 100755
--- a/tools/gator/debian/scripts/do-packaging
+++ b/tools/gator/debian/scripts/do-packaging
@@ -16,6 +16,11 @@ do
OPT_SIGN=y
continue
fi
+ if [ "$OPT" == "--no-git-clean" ]
+ then
+ OPT_NO_GIT_CLEAN=y
+ continue
+ fi
echo $0: Unknown option: "$OPT" 1>&2
exit 1
done
@@ -25,9 +30,17 @@ done
# Clean working dirctory
#
-git reset --hard HEAD
-git clean -dfx ..
+if [ ! $OPT_NO_GIT_CLEAN ]
+then
+ git reset --hard HEAD
+ git clean -dfx ..
+fi
+git checkout debian/changelog
+if [ ! -d module ]
+then
+ ln -s ../../drivers/gator module
+fi
#
# Update changelog
@@ -59,7 +72,10 @@ sed -i -e "s%CHANGE_MSG%$CHANGE_MSG%" debian/changelog
echo $CHANGE_MSG
-VERSION="$(sed -n '1s/.*(\(.*\)).*/\1/p' debian/changelog)"
+FULL_VERSION="$(sed -n '1s/.*(\(.*\)).*/\1/p' debian/changelog)"
+VERSION="$(echo $FULL_VERSION | sed 's/\([0-9.]*\).*/\1/')"
+sed "s/__VERSION__/$VERSION/g" debian/dkms.conf.in > debian/dkms.conf
+sed "s/__VERSION__/$VERSION/g" debian/gator-module-dkms.install.in > debian/gator-module-dkms.install
#
@@ -69,7 +85,7 @@ VERSION="$(sed -n '1s/.*(\(.*\)).*/\1/p' debian/changelog)"
if [ $OPT_COMMIT ]
then
git add debian/changelog
- git commit -s -m "gator-$VERSION: Automated packaging"
+ git commit -s -m "gator-$FULL_VERSION: Automated packaging"
fi