diff options
author | Thor K. H | 2015-06-09 08:01:19 +0200 |
---|---|---|
committer | Thor K. H | 2015-06-09 08:01:19 +0200 |
commit | 23d21636a895a85315dde83088be044817a891b0 (patch) | |
tree | c0ea0bc9e8a4c6aa116d443c1897a0167bc3deea | |
download | aur-23d21636a895a85315dde83088be044817a891b0.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | whatpulse.desktop | 6 | ||||
-rw-r--r-- | whatpulse.install | 34 |
4 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dedc28a99795 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = whatpulse + pkgdesc = Measures your keyboard, mouse and application usage, network traffic and uptime. + pkgver = 2.6.1 + pkgrel = 1 + url = http://www.whatpulse.org + install = whatpulse.install + arch = i686 + arch = x86_64 + license = custom:whatpulse_tos + depends = qt4 + optdepends = systray: any systray, like gnome-panel + optdepends = libpcap: for capturing network statistics + source = whatpulse.desktop + sha256sums = 9ad42960f0a8b538f1d98fea1ced9b2a97ef59aadca50d0382efdb71434572b7 + source_i686 = http://www.whatpulse.org/files/whatpulse-linux-32bit-2.6.1.tar.gz + sha256sums_i686 = 4961fc8360ef924538c1b74f86dfe5ee3a13b474d9bb6421b4312aa465afa74a + source_x86_64 = http://www.whatpulse.org/files/whatpulse-linux-64bit-2.6.1.tar.gz + sha256sums_x86_64 = 7ac2fb2a79c789c6de9ad8aab72538c1be540de1b5c49fa0128425b793c0884c + +pkgname = whatpulse + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a3d39cc1b9a5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Thor K. H. <thor alfakrøll roht dott no> +# Contributor: Tim Besard <tim $dot$ besard $at$ gmail $dot$ com> +# Contributor: Jelle van der Waa <jellevdwaa @ gmail.com> +# Contributor: Pieter Kokx <pieter $at$ kokx $dot$ .nl> + +pkgname=whatpulse +pkgver=2.6.1 +pkgrel=1 +pkgdesc="Measures your keyboard, mouse and application usage, network traffic and uptime." +arch=('i686' 'x86_64') +url=http://www.whatpulse.org +license=(custom:whatpulse_tos) +install="$pkgname.install" +depends=(qt4) +optdepends=( + 'systray: any systray, like gnome-panel' + 'libpcap: for capturing network statistics' +) +source=('whatpulse.desktop') +sha256sums=('9ad42960f0a8b538f1d98fea1ced9b2a97ef59aadca50d0382efdb71434572b7') +source_i686=("http://www.whatpulse.org/files/whatpulse-linux-32bit-$pkgver.tar.gz") +sha256sums_i686=('4961fc8360ef924538c1b74f86dfe5ee3a13b474d9bb6421b4312aa465afa74a') +source_x86_64=("http://www.whatpulse.org/files/whatpulse-linux-64bit-$pkgver.tar.gz") +sha256sums_x86_64=('7ac2fb2a79c789c6de9ad8aab72538c1be540de1b5c49fa0128425b793c0884c') + +package() { + cd $srcdir/ + # Install the binary + mkdir -p ${pkgdir}/usr/bin + install -m0755 whatpulse ${pkgdir}/usr/bin/ + # Install the freedesktop shortcut + mkdir -p ${pkgdir}/usr/share/applications + install -m0644 whatpulse.desktop ${pkgdir}/usr/share/applications/ + + mkdir -p ${pkgdir}/etc/udev/rules.d/ + cat >${pkgdir}/etc/udev/rules.d/99-whatpulse-input.rules <<__EOF__ +KERNEL=="event*", NAME="input/%k", MODE="640", GROUP="input" +__EOF__ +} diff --git a/whatpulse.desktop b/whatpulse.desktop new file mode 100644 index 000000000000..cd5244d78d6f --- /dev/null +++ b/whatpulse.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=WhatPulse +Exec=whatpulse +Icon=whatpulse +StartupNotify=true diff --git a/whatpulse.install b/whatpulse.install new file mode 100644 index 000000000000..1620255d6ef1 --- /dev/null +++ b/whatpulse.install @@ -0,0 +1,34 @@ +post_install() { + # Create the 'input' group + if [ -n "`cat /etc/group | grep -e ^input:`" ] ; then + echo "Group 'input' already exists!" + else + groupadd input + echo "Created group 'input'." + fi + # Manage permissions for the binary + setcap cap_net_raw,cap_net_admin=eip /usr/bin/whatpulse + + # Display some information about how to set-up permissions + cat <<__EOF__ +==> Now add your user to the 'input' group: +==> # gpasswd -a USERNAME input +==> +==> Now reboot to fix the input permissions, or execute this: +==> # find /dev/input/ -iname "event*" -exec chmod 644 {} \; +==> +==> This temporarily grants everybody read permissions on +==> all input devices, something you should obviously avoid if +==> you fear somebody will eavesdrop those input devices. +__EOF__ +} + +post_upgrade() { + # Manage permissions for the binary + setcap cap_net_raw,cap_net_admin=eip /usr/bin/whatpulse +} + +pre_remove() { + # Warn the user about the 'input' group + echo "The \"input\" group still exists, remove it if you don't use it anymore." +} |