aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gpm
diff options
context:
space:
mode:
Diffstat (limited to 'testing/gpm')
-rw-r--r--testing/gpm/APKBUILD71
-rw-r--r--testing/gpm/error-format.patch13
-rw-r--r--testing/gpm/gpm.confd8
-rw-r--r--testing/gpm/gpm.initd28
4 files changed, 120 insertions, 0 deletions
diff --git a/testing/gpm/APKBUILD b/testing/gpm/APKBUILD
new file mode 100644
index 0000000000..17cb942613
--- /dev/null
+++ b/testing/gpm/APKBUILD
@@ -0,0 +1,71 @@
+# Contributor: Jeff Pohlmeyer <yetanothergeek@gmail.com>
+# Maintainer: Jeff Pohlmeyer <yetanothergeek@gmail.com>
+pkgname=gpm
+pkgver=1.20.7
+pkgrel=0
+pkgdesc="A mouse server for the console"
+url="http://www.nico.schottelius.org/software/gpm/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev texinfo autoconf automake libtool bison"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.nico.schottelius.org/software/gpm/archives/gpm-$pkgver.tar.bz2
+ error-format.patch
+ gpm.initd
+ gpm.confd
+ "
+
+_builddir="$srcdir"/gpm-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+
+ chmod 755 "$pkgdir"/usr/lib/libgpm.so.*
+}
+
+md5sums="bf84143905a6a903dbd4d4b911a2a2b8 gpm-1.20.7.tar.bz2
+ba7ffe9a3b6e3f672081a5b7d17f4766 error-format.patch
+0eeefbbd956ee14cb20161d5a7a5bdc6 gpm.initd
+2243adac99a888b0598d6b9233862788 gpm.confd"
+sha256sums="f011b7dc7afb824e0a017b89b7300514e772853ece7fc4ee640310889411a48d gpm-1.20.7.tar.bz2
+290e032640c8cfb95d5a8dddfd99e11887100b08750b9f5ceaec6e3209e3ebf3 error-format.patch
+41849c683967590db3217dd231df3fdf83ecdf01c657221ff4cbe45aa63d498f gpm.initd
+daad6a5d900215b27ad86d1352724fea2df39581e1ae6e808f627d6f8bab3b2e gpm.confd"
+sha512sums="51c1141ed502f8b6bc846485a8e315bafe3cf2b7c9d1ea8a710d9748ff2058f29c7ab5715fc1730a8437c613181d2050f37b134e9288c69ba8ff7fb0be7ec0d1 gpm-1.20.7.tar.bz2
+caad0472374b9bb9bdf8f31480f88895b2d65dc0565611932fa185592ffcc18065bb66b433f54f0df9f6173056b6c34ec5d57f79bd19f38edefeca57603bc76c error-format.patch
+81b0854b6d8b3fcf5a26690b9cb17878af412e773726cdd7c3e90504e85fd5aff0614c171757256c832e20521a734d353f4c38684ab5f749f20dbc497cc680e5 gpm.initd
+25a7ebc60df8e9dda197ae7cf18fdb036793e15aeb06757a872ad25b8ad28cd0686e7ef89a47ee677ae6bfee980abd3777e89be84b2a2611141dc688c20c3ed6 gpm.confd"
diff --git a/testing/gpm/error-format.patch b/testing/gpm/error-format.patch
new file mode 100644
index 0000000000..8c9628f492
--- /dev/null
+++ b/testing/gpm/error-format.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/report-lib.c b/src/lib/report-lib.c
+index c0ae086..1b9754d 100644
+--- a/src/lib/report-lib.c
++++ b/src/lib/report-lib.c
+@@ -47,7 +47,7 @@ void gpm_report(int line, char *file, int stat, char *text, ... )
+ log_level = LOG_CRIT; break;
+ }
+ #ifdef HAVE_VSYSLOG
+- syslog(log_level, string);
++ syslog(log_level, "%s", string);
+ vsyslog(log_level, text, ap);
+ #else
+ fprintf(stderr,"%s[%s(%d)]:\n",string,file,line);
diff --git a/testing/gpm/gpm.confd b/testing/gpm/gpm.confd
new file mode 100644
index 0000000000..a3c6be6eda
--- /dev/null
+++ b/testing/gpm/gpm.confd
@@ -0,0 +1,8 @@
+# gpm conf.d file for alpine linux
+
+#
+# Specify gpm mouse daemon options here.
+#
+
+gpm_opts="-m /dev/input/mice -t imps2"
+
diff --git a/testing/gpm/gpm.initd b/testing/gpm/gpm.initd
new file mode 100644
index 0000000000..207b4c046c
--- /dev/null
+++ b/testing/gpm/gpm.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# gpm init.d file for alpine linux.
+
+name=gpm
+daemon=/usr/sbin/${name}
+
+depend() {
+ after localmount
+ use hotplug logger
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${name}.pid \
+ --exec ${daemon} -- ${gpm_opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/${name}.pid \
+ --exec ${daemon}
+ eend $?
+}
+