diff options
-rw-r--r-- | tools/gator/Makefile | 4 | ||||
-rw-r--r-- | tools/gator/debian/changelog | 98 | ||||
-rw-r--r-- | tools/gator/debian/compat | 1 | ||||
-rw-r--r-- | tools/gator/debian/control | 28 | ||||
-rw-r--r-- | tools/gator/debian/copyright | 15 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.install | 1 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.postrm | 41 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.preinst | 36 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.upstart | 10 | ||||
-rwxr-xr-x | tools/gator/debian/rules | 15 | ||||
-rwxr-xr-x | tools/gator/debian/scripts/do-packaging | 86 |
11 files changed, 335 insertions, 0 deletions
diff --git a/tools/gator/Makefile b/tools/gator/Makefile new file mode 100644 index 00000000000..4ab73b0ebed --- /dev/null +++ b/tools/gator/Makefile @@ -0,0 +1,4 @@ +all: + $(MAKE) -C daemon $@ +clean: + $(MAKE) -C daemon $@ diff --git a/tools/gator/debian/changelog b/tools/gator/debian/changelog new file mode 100644 index 00000000000..dd0b63c549f --- /dev/null +++ b/tools/gator/debian/changelog @@ -0,0 +1,98 @@ +gator (5.10.0) precise; urgency=low + + * New release from ARM. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Thu, 10 May 2012 16:47:32 +0000 + +gator (5.9.7) precise; urgency=low + + * New source and binary package layout with automated packaging scripts. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 2 May 2012 17:01:18 +0000 + +gator-daemon (5.9-6) precise; urgency=low + + * Remove Depends: gator-module* as Linaro kernels should + now all contain the required module. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 25 Apr 2012 18:06:28 +0000 + +gator-daemon (5.9-5) precise; urgency=low + + * Move to armhf and Precise + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 25 Apr 2012 10:16:00 +0000 + +gator-daemon (5.9-4) oneiric; urgency=low + + * Add alternative Depends on gator-module-in-tree. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Fri, 16 Mar 2012 18:24:27 +0000 + +gator-daemon (5.9-3) oneiric; urgency=low + + * Add missing build depends: 'quilt'. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Thu, 23 Feb 2012 13:59:08 +0000 + +gator-daemon (5.9-2) oneiric; urgency=low + + [ Wade Cherry ] + * Fix counters initialisation + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Thu, 23 Feb 2012 12:06:33 +0000 + +gator-daemon (5.9-1) oneiric; urgency=low + + * New upstream release (DS-5.9) + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Mon, 20 Feb 2012 10:35:47 +0000 + +gator-daemon (5.9~rc1-1) oneiric; urgency=low + + * New upstream release (DS-5.9) + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 15 Feb 2012 14:38:26 +0000 + +gator-daemon (5.8-1) oneiric; urgency=low + + * New upstream release + + -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Fri, 25 Nov 2011 12:41:57 -0200 + +gator-daemon (5.8~rc2-1) oneiric; urgency=low + + * New upstream version (DS-5.8~rc2) + + -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Wed, 16 Nov 2011 15:30:07 -0200 + +gator-daemon (5.7-2) natty; urgency=low + + * Package now depends on the new gator-module meta package + + -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Mon, 10 Oct 2011 23:39:34 -0300 + +gator-daemon (5.7-1) natty; urgency=low + + * Updated to DS-5.7 release + * Added sources (GPLv2) + + -- Pawel Moll <pawel.moll@arm.com> Fri, 30 Sep 2011 16:02:05 +0100 + +gator-daemon (5.6-2) natty; urgency=low + + * Added dependency on 5.6 version of the gator-module[-dkms] + + -- Pawel Moll <pawel.moll@arm.com> Tue, 13 Sep 2011 15:59:37 +0100 + +gator-daemon (5.6-1) natty; urgency=low + + * Updated to DS-5.6 release + + -- Pawel Moll <pawel.moll@arm.com> Wed, 03 Aug 2011 11:54:40 +0100 + +gator-daemon (5.5-1) natty; urgency=low + + * Initial release + + -- Pawel Moll <pawel.moll@arm.com> Mon, 06 Jun 2011 18:42:31 +0100 diff --git a/tools/gator/debian/compat b/tools/gator/debian/compat new file mode 100644 index 00000000000..45a4fb75db8 --- /dev/null +++ b/tools/gator/debian/compat @@ -0,0 +1 @@ +8 diff --git a/tools/gator/debian/control b/tools/gator/debian/control new file mode 100644 index 00000000000..b6defbc6d02 --- /dev/null +++ b/tools/gator/debian/control @@ -0,0 +1,28 @@ +Source: gator +Section: devel +Priority: extra +Maintainer: Pawel Moll <pawel.moll@arm.com> +Build-Depends: debhelper (>= 7.0.5), vim-common +Standards-Version: 3.9.2 +Homepage: http://www.arm.com/ds-5 + +Package: gator +Architecture: armhf +Depends: ${misc:Depends}, gator-daemon (>= 5.9.0) +Description: ARM Streamline gator + This meta-package depends on gator target packages required to use + ARM Streamline Performance Analyzer. + +Package: gator-daemon +Architecture: armhf +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: ARM Streamline gator daemon + The target-side daemon gathering data for ARM Streamline + Performance Analyzer. + +Package: arm-ds5-target +Architecture: armhf +Depends: ${misc:Depends}, gdbserver (>= 6.8), openssh-server | ssh-server, gator (>= 5.9.0) +Description: ARM DS-5 target dependencies + This meta-package depends on all components required to receive + full ARM DS-5 experience. diff --git a/tools/gator/debian/copyright b/tools/gator/debian/copyright new file mode 100644 index 00000000000..3ed568c02e8 --- /dev/null +++ b/tools/gator/debian/copyright @@ -0,0 +1,15 @@ +Files: * +Copyright: 2010-2012 ARM Ltd. +License: GPL-2 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + with your system, in /usr/share/common-licenses/GPL-2. If not, see + <http://www.gnu.org/licenses/>. diff --git a/tools/gator/debian/gator-daemon.install b/tools/gator/debian/gator-daemon.install new file mode 100644 index 00000000000..7b0d218c425 --- /dev/null +++ b/tools/gator/debian/gator-daemon.install @@ -0,0 +1 @@ +daemon/gatord /usr/sbin/ diff --git a/tools/gator/debian/gator-daemon.postrm b/tools/gator/debian/gator-daemon.postrm new file mode 100644 index 00000000000..97518f4e1a1 --- /dev/null +++ b/tools/gator/debian/gator-daemon.postrm @@ -0,0 +1,41 @@ +#!/bin/sh +# postrm script for gator-daemon +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <overwriter> +# <overwriter-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -rf /var/lib/gatord/ + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/tools/gator/debian/gator-daemon.preinst b/tools/gator/debian/gator-daemon.preinst new file mode 100644 index 00000000000..bb2dc7e5fe7 --- /dev/null +++ b/tools/gator/debian/gator-daemon.preinst @@ -0,0 +1,36 @@ +#!/bin/sh +# preinst script for gator-daemon +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <new-preinst> `install' +# * <new-preinst> `install' <old-version> +# * <new-preinst> `upgrade' <old-version> +# * <old-preinst> `abort-upgrade' <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + mkdir -p /var/lib/gatord/ + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/tools/gator/debian/gator-daemon.upstart b/tools/gator/debian/gator-daemon.upstart new file mode 100644 index 00000000000..1564efc5339 --- /dev/null +++ b/tools/gator/debian/gator-daemon.upstart @@ -0,0 +1,10 @@ +description "Load gator driver module and launch gator daemon" +author "Pawel Moll <pawel.moll@arm.com>" + +start on filesystem + +exec /usr/sbin/gatord -c /var/lib/gatord/configuration.xml + +pre-start script + modprobe -q gator || true +end script diff --git a/tools/gator/debian/rules b/tools/gator/debian/rules new file mode 100755 index 00000000000..c747748ff83 --- /dev/null +++ b/tools/gator/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)- +endif + +export CROSS_COMPILE + +export DH_OPTIONS + +%: + dh $@ diff --git a/tools/gator/debian/scripts/do-packaging b/tools/gator/debian/scripts/do-packaging new file mode 100755 index 00000000000..9562f2a685b --- /dev/null +++ b/tools/gator/debian/scripts/do-packaging @@ -0,0 +1,86 @@ +#!/bin/bash + +set -e + +while [ $1 ] +do + OPT=$1 + shift + if [ "$OPT" == "--commit" ] + then + OPT_COMMIT=y + continue + fi + if [ "$OPT" == "--sign" ] + then + OPT_SIGN=y + continue + fi + echo $0: Unknown option: "$OPT" 1>&2 + exit 1 +done + + +# +# Clean working dirctory +# + +git reset --hard HEAD +git clean -dfx .. + + +# +# Update changelog +# + +if [ "$DEBEMAIL" == "" -o "$DEBFULLNAME" == "" ] +then + export DEBEMAIL='jon.medhurst@linaro.org' + export DEBFULLNAME='Jon Medhurst (Tixy)' +fi +dch -i -c debian/changelog CHANGE_MSG + +TIMESTAMP="$(date -u +%Y%m%d%H%M%S)" +sed -i -e "1 s/ubuntu1/-$TIMESTAMP/" debian/changelog + +GIT_COMMIT="$(git rev-parse HEAD)" +GIT_REMOTE_AND_BRANCH="$(git show-ref | sed -n 's,'$GIT_COMMIT'.*refs/remotes/\(.*\),\1,p' | sed -n 1p)" +GIT_REMOTE=$(echo $GIT_REMOTE_AND_BRANCH | awk -F/ '{print $1}') +GIT_BRANCH=$(echo $GIT_REMOTE_AND_BRANCH | awk -F/ '{print $2}') +GIT_URL="$(git remote -v show $GIT_REMOTE | sed -n 's/.*Fetch URL: \(.*\)/\1/p')" +GIT_TAG="$(git describe --exact-match --tags $GIT_COMMIT 2>/dev/null || echo "")" + +CHANGE_MSG="Automatically packaged from git repository:\n" +CHANGE_MSG="$CHANGE_MSG URL: $GIT_URL\n" +CHANGE_MSG="$CHANGE_MSG Tag: $GIT_TAG\n" +CHANGE_MSG="$CHANGE_MSG Branch: $GIT_BRANCH\n" +CHANGE_MSG="$CHANGE_MSG Commit: $GIT_COMMIT" +sed -i -e "s%CHANGE_MSG%$CHANGE_MSG%" debian/changelog + +echo $CHANGE_MSG + +VERSION="$(sed -n '1s/.*(\(.*\)).*/\1/p' debian/changelog)" + + +# +# Commit changes +# + +if [ $OPT_COMMIT ] +then + git add debian/changelog + git commit -s -m "gator-$VERSION: Automated packaging" +fi + + +# +# Build packages +# + +if [ ! $OPT_SIGN ] +then + DEBUILD_SIGN="-us -uc" +fi + +debuild $DEBUILD_SIGN -aarmhf -b +debuild --no-tgz-check $DEBUILD_SIGN -S |