summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortildearrow2018-12-08 21:25:05 -0500
committertildearrow2018-12-08 21:25:05 -0500
commit00a6a15c8968962da6269558404739f6a4ce0397 (patch)
treec9815fdf391926ec7970686d32e1bd569598831f
downloadaur-00a6a15c8968962da6269558404739f6a4ce0397.tar.gz
initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD31
-rw-r--r--imod.install23
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..59444434f7b8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = input-modifier
+ pkgdesc = uinput based key bindings and macros tool
+ pkgver = 1.3.1
+ pkgrel = 1
+ url = https://github.com/tildearrow/input-modifier
+ install = imod.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = cmake
+ depends = udev
+ source = https://github.com/tildearrow/input-modifier/archive/v1.3.1.tar.gz
+ sha256sums = 9f0f35b15af6f171ffa7ab23909c4b6fcc1acf92f83ef070d9b02123f34ae419
+
+pkgname = input-modifier
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a1ea5d3f978c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: tildearrow <acc12345acc at gmail dot com>
+# yes, I'm aware of the reference to $srcdir issue
+pkgname=input-modifier
+pkgver=1.3.1
+pkgrel=1
+pkgdesc="uinput based key bindings and macros tool"
+arch=('i686' 'x86_64')
+url="https://github.com/tildearrow/input-modifier"
+license=('GPL')
+depends=('udev')
+makedepends=('cmake')
+source=("https://github.com/tildearrow/input-modifier/archive/v$pkgver.tar.gz")
+sha256sums=('9f0f35b15af6f171ffa7ab23909c4b6fcc1acf92f83ef070d9b02123f34ae419')
+install=imod.install
+
+build() {
+ cd "$pkgname-$pkgver"
+ if [ -e build ]
+ then rm -rf build
+ fi
+ mkdir build && cd build
+ cmake -DCMAKE_INSTALL_PREFIX="/usr" ..
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver/build"
+ make DESTDIR="$pkgdir/" install
+ # unneeded. to be fixed for 1.3.2
+ rm "$pkgdir/usr/lib/udev/rules.d/98-imod-ubuntu14.rules"
+}
diff --git a/imod.install b/imod.install
new file mode 100644
index 000000000000..9c8b0c9ffa1f
--- /dev/null
+++ b/imod.install
@@ -0,0 +1,23 @@
+post_install() {
+ INSEXTRAFAIL=0
+ { udevadm control --reload-rules && udevadm trigger; } || INSEXTRAFAIL=1
+ sleep 1
+ modprobe uinput || INSEXTRAFAIL=1
+ if [ -e /dev/uinput ]
+ then chmod 660 /dev/uinput || INSEXTRAFAIL=1
+ chown root:input /dev/uinput || INSEXTRAFAIL=1
+ touch /dev/uinput
+ sleep 0.25
+ UISTAT=$(stat -c %a /dev/uinput)
+ if [ $UISTAT == "600" ]
+ then INSEXTRAFAIL=1
+ fi
+ else INSEXTRAFAIL=1
+ fi
+ echo "add yourself to the input group in order to be able to use the program:"
+ echo "sudo usermod -a -G input <username>"
+
+ if [ $INSEXTRAFAIL -eq 1 ]
+ then echo "additionally, you may have to reboot... :("
+ fi
+}