diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /core/gpm |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'core/gpm')
-rw-r--r-- | core/gpm/PKGBUILD | 39 | ||||
-rwxr-xr-x | core/gpm/gpm | 41 | ||||
-rw-r--r-- | core/gpm/gpm.conf.d | 4 | ||||
-rw-r--r-- | core/gpm/gpm.install | 16 | ||||
-rwxr-xr-x | core/gpm/gpm.sh | 3 |
5 files changed, 103 insertions, 0 deletions
diff --git a/core/gpm/PKGBUILD b/core/gpm/PKGBUILD new file mode 100644 index 000000000..f0284fc2e --- /dev/null +++ b/core/gpm/PKGBUILD @@ -0,0 +1,39 @@ +# $Id: PKGBUILD 100083 2010-11-20 08:19:49Z eric $ +# Maintainer: Eric Belanger <eric@archlinux.org> + +pkgname=gpm +pkgver=1.20.6 +pkgrel=6 +pkgdesc="A mouse server for the console and xterm" +arch=('i686' 'x86_64') +url="http://www.nico.schottelius.org/software/gpm/" +license=('GPL') +depends=('ncurses' 'bash') +backup=('etc/conf.d/gpm') +options=('!makeflags') +install=gpm.install +source=(http://www.nico.schottelius.org/software/gpm/archives/${pkgname}-${pkgver}.tar.bz2 \ + gpm gpm.conf.d gpm.sh) +md5sums=('6b534da16dc1b28ba828dea89e520f6f' '945ecde0836687e05c13ea837092ea6c'\ + 'f436a1277571f2ae8bfa9bf2ef32f7a5' 'e391fe4599ce102615f9cd449c380d41') +sha1sums=('f3bb9272878b7934968381c8b25edab359114150' '19e1feb1493373512a77801699df012d186336ea'\ + '4c31cb7dd51cee4d16d3f7a8956e6d87fac1ad86' '88fe5ff10916c68a87abc8418a56eb0073f69fa9') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m755 ../gpm "${pkgdir}/etc/rc.d/gpm" + install -D -m644 ../gpm.conf.d "${pkgdir}/etc/conf.d/gpm" + install -D -m755 ../gpm.sh "${pkgdir}/etc/profile.d/gpm.sh" + +# library fixes + cd "${pkgdir}/usr/lib/" + ln -s libgpm.so.2.* libgpm.so + chmod 755 "${pkgdir}"/usr/lib/libgpm.so.* +} diff --git a/core/gpm/gpm b/core/gpm/gpm new file mode 100755 index 000000000..7b5213dd7 --- /dev/null +++ b/core/gpm/gpm @@ -0,0 +1,41 @@ +#!/bin/bash + +# source application-specific settings +GPM_ARGS= +[ -f /etc/conf.d/gpm ] && . /etc/conf.d/gpm + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=$(pidof -o %PPID /usr/sbin/gpm) +case "$1" in + start) + stat_busy "Starting GPM Daemon" + [ -z "$PID" ] && /usr/sbin/gpm ${GPM_ARGS} + PID=$(pidof -o %PPID /usr/sbin/gpm) + if [ -z "$PID" ]; then + stat_fail + else + add_daemon gpm + stat_done + fi + ;; + stop) + stat_busy "Stopping GPM Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon gpm + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/core/gpm/gpm.conf.d b/core/gpm/gpm.conf.d new file mode 100644 index 000000000..ab43bb7eb --- /dev/null +++ b/core/gpm/gpm.conf.d @@ -0,0 +1,4 @@ +# +# Parameters to be passed to gpm +# +GPM_ARGS="-m /dev/input/mice -t imps2" diff --git a/core/gpm/gpm.install b/core/gpm/gpm.install new file mode 100644 index 000000000..2a1519a6c --- /dev/null +++ b/core/gpm/gpm.install @@ -0,0 +1,16 @@ +infodir=/usr/share/info +file=gpm.info.gz + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file $infodir/dir 2> /dev/null +} diff --git a/core/gpm/gpm.sh b/core/gpm/gpm.sh new file mode 100755 index 000000000..af35a5f33 --- /dev/null +++ b/core/gpm/gpm.sh @@ -0,0 +1,3 @@ +case $( /usr/bin/tty ) in + /dev/tty[0-9]*) [ -n "$(pgrep gpm)" ] && /usr/bin/disable-paste ;; +esac |