Robin Candau pushed to branch main at Arch Linux / Packaging / Packages / 
systray-x


Commits:
63a7f341 by Robin Candau at 2025-02-07T16:21:57+01:00
Use a patch file instead of 'sed' to set the correct binary path in the json 
file
sed is intransparent and can fail silently

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + binary_path.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -15,8 +15,10 @@ pkgbase = systray-x
        depends = thunderbird
        source = 
systray-x-0.9.10.tar.gz::https://github.com/Ximi1970/systray-x/archive/0.9.10.tar.gz
        source = Makefile.patch
+       source = binary_path.patch
        sha256sums = 
7a9bc146f341288b0b41e65d56190dcead694681b1bed25ad36a35768abf3029
        sha256sums = 
62affd86e6dbad6e9cf851768d99fd79f76f65ac2fd5e45ef5e89c5dcb63dbab
+       sha256sums = 
aa0a5a7e8b062452416ec9b4472ee4d1a9d7d17fd5ecf94698c557cd504514da
 
 pkgname = systray-x-common
        pkgdesc = A system tray extension for Thunderbird - Common version


=====================================
PKGBUILD
=====================================
@@ -12,15 +12,17 @@ license=('MPL-2.0')
 depends=('qt6-base' 'qt6-wayland' 'thunderbird')
 makedepends=('git' 'zip' 'unzip' 'libx11' 'kstatusnotifieritem')
 source=("${pkgbase}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
-       "Makefile.patch")
+       'Makefile.patch'
+       'binary_path.patch')
 sha256sums=('7a9bc146f341288b0b41e65d56190dcead694681b1bed25ad36a35768abf3029'
-            '62affd86e6dbad6e9cf851768d99fd79f76f65ac2fd5e45ef5e89c5dcb63dbab')
+            '62affd86e6dbad6e9cf851768d99fd79f76f65ac2fd5e45ef5e89c5dcb63dbab'
+            'aa0a5a7e8b062452416ec9b4472ee4d1a9d7d17fd5ecf94698c557cd504514da')
 
 prepare() {
        cd "${pkgbase}-${pkgver}"
        
        # Add the correct path to the binary in the json file
-       sed -i 's/\/path\/to\/native-messaging\/app/\/usr\/bin/g' 
"app/${_pkgbase//-/_}.json"
+       patch -Np1 -i "${srcdir}/binary_path.patch"
 
        # Patch the Makefile to build both versions of the app into separate 
directories
        patch -Np1 -i "${srcdir}/Makefile.patch"


=====================================
binary_path.patch
=====================================
@@ -0,0 +1,13 @@
+diff --git a/app/SysTray_X.json b/app/SysTray_X.json
+index 52fe8d3..fa2c1e5 100644
+--- a/app/SysTray_X.json
++++ b/app/SysTray_X.json
+@@ -1,7 +1,7 @@
+  {
+   "name": "SysTray_X",
+   "description": "SysTray-X System Tray App",
+-  "path": "/path/to/native-messaging/app/SysTray-X",
++  "path": "/usr/bin/SysTray-X",
+   "type": "stdio",
+   "allowed_extensions": [ "systray-x@Ximi1970" ]
+ }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/systray-x/-/commit/63a7f341155eafe0bc5dab02bd8bb3e8a734afe4

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/systray-x/-/commit/63a7f341155eafe0bc5dab02bd8bb3e8a734afe4
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to