summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMubashshir2023-06-05 12:35:39 +0600
committerMubashshir2023-06-05 12:36:17 +0600
commitad72c7eb6a86fbd8c16d2221c9dd87f57de340fd (patch)
tree769cbb2cea6eca7e79520e93186f9b4fb77aa9a5
parent59f5c36bb668f8c7cf6f54dd9732401e4b529151 (diff)
downloadaur-ad72c7eb6a86fbd8c16d2221c9dd87f57de340fd.tar.gz
whatpulse: Add a wrapper script for passing args properly
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD12
-rw-r--r--whatpulse.sh13
4 files changed, 25 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 240a8a1dd050..7e03cda3a314 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = whatpulse
pkgdesc = Measures your keyboard, mouse and application usage, network traffic and uptime.
pkgver = 5.4
- pkgrel = 1
+ pkgrel = 2
url = http://www.whatpulse.org
arch = x86_64
license = custom:whatpulse_tos
@@ -28,8 +28,10 @@ pkgbase = whatpulse
depends = hicolor-icon-theme
optdepends = libpcap: for capturing network statistics
source = whatpulse.desktop
+ source = whatpulse.sh
source = LICENSE
sha256sums = 5a4a6676a6b513824eeac8a2accd6de9e8bd2bc11b3e2967fa2b2a18d29fa35d
+ sha256sums = 9b30dbf9e33a4fecf21e3a26e7fe37509d884cf84c092751a4ef2f48a762268c
sha256sums = cfea47f15bb3ba2494a7b1d50367139dc12709fc1e8ba0b25d86ee5f09748619
source_x86_64 = whatpulse-5.4-amd64.AppImage::https://releases.whatpulse.org/latest/linux/whatpulse-linux-latest_amd64.AppImage
sha256sums_x86_64 = 533b1b28120a25f3db625425f42dfbc559180a3dfb4e1f9c6156cf27b4a646f4
diff --git a/.gitignore b/.gitignore
index ef635db87590..9d179d292c0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
!PKGBUILD
!whatpulse.desktop
!.gitignore
+!whatpulse.sh
diff --git a/PKGBUILD b/PKGBUILD
index 0cf5a1eff28e..65386757204b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
_tag=latest
pkgname=whatpulse
pkgver=5.4
-pkgrel=1
+pkgrel=2
pkgdesc="Measures your keyboard, mouse and application usage, network traffic and uptime."
arch=('x86_64')
@@ -29,11 +29,13 @@ optdepends=(
)
source=(
'whatpulse.desktop'
+ 'whatpulse.sh'
LICENSE
)
source_x86_64=("${pkgname}-${pkgver}-amd64.AppImage::https://releases.whatpulse.org/${_tag:-$pkgver}/linux/whatpulse-linux-${_tag:-$pkgver}_amd64.AppImage")
sha256sums=('5a4a6676a6b513824eeac8a2accd6de9e8bd2bc11b3e2967fa2b2a18d29fa35d'
- 'cfea47f15bb3ba2494a7b1d50367139dc12709fc1e8ba0b25d86ee5f09748619')
+ '9b30dbf9e33a4fecf21e3a26e7fe37509d884cf84c092751a4ef2f48a762268c'
+ 'cfea47f15bb3ba2494a7b1d50367139dc12709fc1e8ba0b25d86ee5f09748619')
sha256sums_x86_64=('533b1b28120a25f3db625425f42dfbc559180a3dfb4e1f9c6156cf27b4a646f4')
_extract() {
@@ -57,7 +59,9 @@ prepare() {
}
package() {
- install -Dm755 sfs/usr/bin/whatpulse "${pkgdir}/usr/bin/whatpulse"
+ # whatpulse
+ install -Dm755 whatpulse.sh "${pkgdir}/usr/bin/whatpulse"
+ install -Dm755 sfs/usr/bin/whatpulse "${pkgdir}/usr/lib/whatpulse/whatpulse"
# Qt6
find sfs/usr/lib -type f -exec install -Dm644 -t "${pkgdir}/usr/lib/whatpulse/lib" '{}' +
# Qt6 plugins
@@ -71,7 +75,7 @@ package() {
# Set capabilities so that whatpulse can monitor network traffic
# Disable network monitor caps to prevent segfaults
- # setcap cap_net_raw,cap_net_admin=eip "${pkgdir}/usr/bin/whatpulse"
+ # setcap cap_net_raw,cap_net_admin=eip "${pkgdir}/usr/lib/whatpulse/whatpulse"
# Generate and install icons
for size in 16 20 22 24 28 32 36 44 48 64 72 96 128 150 192 256 310 384 512 1024; do
diff --git a/whatpulse.sh b/whatpulse.sh
new file mode 100644
index 000000000000..8a1e7df72d4a
--- /dev/null
+++ b/whatpulse.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+declare -a args
+
+until (($# == 0)); do
+ if [[ $1 =~ ^-[^-] ]]; then
+ args+=("-$1")
+ else
+ args+=("$1")
+ fi
+ shift
+done
+
+exec -a "$0" /usr/lib/whatpulse/whatpulse "${args[@]}"