diff options
author | James P. Harvey | 2019-08-18 22:27:30 -0400 |
---|---|---|
committer | James P. Harvey | 2019-08-18 23:09:19 -0400 |
commit | b57d20780988b607b21b2bd1856e5fa5797b453c (patch) | |
tree | 8091b4cc51bcd9228477103f8539fcb792fca802 | |
download | aur-b57d20780988b607b21b2bd1856e5fa5797b453c.tar.gz |
Clone from core/gpm, and rename to gpm-vm.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 0001-glibc-sigemptyset.patch | 29 | ||||
-rw-r--r-- | PKGBUILD | 65 | ||||
-rw-r--r-- | gpm.service | 12 | ||||
-rwxr-xr-x | gpm.sh | 3 |
5 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..293624822967 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = gpm-vm + pkgdesc = A mouse server for the console and xterm (for QEMU/VirtualBox) + pkgver = 1.20.7.r27.g1fd1941 + pkgrel = 1 + url = https://www.nico.schottelius.org/software/gpm/ + arch = x86_64 + license = GPL + makedepends = git + depends = bash + depends = procps-ng + provides = gpm + conflicts = gpm + options = !makeflags + source = git+https://github.com/telmich/gpm.git#commit=1fd19417b8a4dd9945347e98dfa97e4cfd798d77 + source = 0001-glibc-sigemptyset.patch + source = gpm.sh + source = gpm.service + sha256sums = SKIP + sha256sums = 61f901aae46ff79679a058758151dc93901dcd9ea938fabb0765554993b8cb09 + sha256sums = f41e90dcf6c0c6c4b8eff1c69039a20eb6b38ea851ffd1fa47ba311bf83d6ed8 + sha256sums = dc7d2463f6670ff2c1646a571ffad51f7c603793c25c6f685efad13cbb444034 + +pkgname = gpm-vm + diff --git a/0001-glibc-sigemptyset.patch b/0001-glibc-sigemptyset.patch new file mode 100644 index 000000000000..083e62c0e049 --- /dev/null +++ b/0001-glibc-sigemptyset.patch @@ -0,0 +1,29 @@ +From fdc42770596e25749f7e2ce0ea97882177397167 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 25 Jun 2017 07:25:33 -0700 +Subject: [PATCH] Use sigemptyset API instead of __sigemptyset + +__sigemptyset has been removed from glibc public +API headers in upcoming (2.26) release onwards + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/prog/gpm-root.y | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y +index 5126c65..76c896c 100644 +--- a/src/prog/gpm-root.y ++++ b/src/prog/gpm-root.y +@@ -1196,11 +1196,7 @@ int main(int argc, char **argv) + LOG_DAEMON : LOG_USER); + /* reap your zombies */ + childaction.sa_handler=reap_children; +-#if defined(__GLIBC__) +- __sigemptyset(&childaction.sa_mask); +-#else /* __GLIBC__ */ + sigemptyset(&childaction.sa_mask); +-#endif /* __GLIBC__ */ + childaction.sa_flags=0; + sigaction(SIGCHLD,&childaction,NULL); + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5f7a0d97c7c3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Eric BĂ©langer <eric@archlinux.org> + +pkgname=gpm-vm +_pkgname=gpm +pkgver=1.20.7.r27.g1fd1941 +_commit='1fd19417b8a4dd9945347e98dfa97e4cfd798d77' +pkgrel=1 +pkgdesc='A mouse server for the console and xterm (for QEMU/VirtualBox)' +arch=('x86_64') +url='https://www.nico.schottelius.org/software/gpm/' +license=('GPL') +depends=('bash' 'procps-ng') +makedepends=('git') +options=('!makeflags') +source=("git+https://github.com/telmich/gpm.git#commit=${_commit}" + '0001-glibc-sigemptyset.patch' + 'gpm.sh' + 'gpm.service') +sha256sums=('SKIP' + '61f901aae46ff79679a058758151dc93901dcd9ea938fabb0765554993b8cb09' + 'f41e90dcf6c0c6c4b8eff1c69039a20eb6b38ea851ffd1fa47ba311bf83d6ed8' + 'dc7d2463f6670ff2c1646a571ffad51f7c603793c25c6f685efad13cbb444034') +provides=('gpm') +conflicts=('gpm') + +pkgver() { + cd "${srcdir}/${_pkgname}" + + GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)" + printf '%s.r%s.g%s' \ + "${GITTAG}" \ + "$(git rev-list --count ${GITTAG}..)" \ + "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${_pkgname}" + + patch -Np1 < ../0001-glibc-sigemptyset.patch + + ./autogen.sh +} + +build() { + cd "${srcdir}/${_pkgname}" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --sbindir=/usr/bin + make +} + +package() { + cd "${srcdir}/${_pkgname}" + + make DESTDIR="${pkgdir}" install + install -D -m0755 ../gpm.sh "${pkgdir}/etc/profile.d/gpm.sh" + install -D -m0644 ../gpm.service "${pkgdir}/usr/lib/systemd/system/gpm.service" + +# library fixes + cd "${pkgdir}/usr/lib/" + ln -s libgpm.so.2.* libgpm.so + chmod 0755 "${pkgdir}"/usr/lib/libgpm.so.* +} diff --git a/gpm.service b/gpm.service new file mode 100644 index 000000000000..6d4d403a7410 --- /dev/null +++ b/gpm.service @@ -0,0 +1,12 @@ +[Unit] +Description=Virtual console mouse server +Requires=systemd-udevd.service +After=systemd-udevd.service +ConditionPathExists=/dev/input/mice + +[Service] +Type=forking +ExecStart=/usr/bin/gpm -m /dev/input/mice -t imps2 + +[Install] +WantedBy=multi-user.target diff --git a/gpm.sh b/gpm.sh new file mode 100755 index 000000000000..1aea57256295 --- /dev/null +++ b/gpm.sh @@ -0,0 +1,3 @@ +case $( /usr/bin/tty ) in + /dev/tty[0-9]*) [ -n "$(pidof -s gpm)" ] && /usr/bin/disable-paste ;; +esac |