summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorNixuge2024-03-23 20:04:03 +0100
committerNixuge2024-03-23 20:04:03 +0100
commitfce0f3045a3d1c6650def7be79666ee38cd6ec3c (patch)
treeb24eb0010b5f489be2ffdefdf5171dcc56eb7ced /PKGBUILD
parent02052723270e5e947a9fcd6cb5f3d1d20fefa4df (diff)
downloadaur-localsend-bin.tar.gz
Cleanup & proper icons installation (noah@noahvogt.com)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 19 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ad33245f88e2..e8fe2651f941 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
# Maintainer: Nixuge
+# Contributor: Noah Vogt <noah@noahvogt.com>
# Note: check if "depends" are still valid. As of 1.9, the AppImage
# Should contain everything already to just work everywhere.
@@ -6,34 +7,33 @@
# Note 2 (for future me & others):
# I really dislike using the AppImage for this package as it's slow to launch & kinda bloated
# Ideally I'd use the deb, which is 10MB instead of 50MB for the appimage
-#
+#
# However, as of 1.9, the introduction of the "libayatana-appindicator" dependency has caused some problems on Arch,
# and is why the appimage became bloated in the first place to include everything for max compatibility
#
# This forces me to unfortunately stick with the appimage, as arch's "libayatana-appindicator" just segfaults
-#
+#
# Could also redistribute debian's lib & patch the deb around, but I'd have to either:
# - Add another file to download from another source (more risks of it going down)
# - Add the raw file here directly (you'd have to trust me, or go check if the hash in the pkgbuild matches the one from an official src)
-#
+#
# So for now just sticking with that. Will switch in the future if that lib implementation gets fixed.
pkgname=localsend-bin
pkgver=1.14.0
-pkgrel=2
-pkgdesc='An open source cross-platform alternative to AirDrop '
+pkgrel=3
+pkgdesc='An open source cross-platform alternative to AirDrop'
url=https://github.com/localsend/localsend
arch=(x86_64)
license=(MIT)
depends=(fuse2 xdg-user-dirs)
-conflicts=('localsend-git' 'localsend')
+conflicts=('localsend')
provides=('localsend')
options=(!strip !debug)
source=("https://github.com/localsend/localsend/releases/download/v${pkgver}/LocalSend-${pkgver}-linux-x86-64.AppImage")
sha256sums=('e89e885a1de2122dbe5b2b7ec439dca00accee1e63237d4685946a48a35ca8d2')
_appimage="LocalSend-${pkgver}-linux-x86-64.AppImage"
_appimage_nover="localsend.AppImage"
-_pkgname="localsend"
_pkgdesktop="org.localsend.localsend_app.desktop"
@@ -45,9 +45,9 @@ prepare() {
build() {
# Adjust .desktop so it will work outside of AppImage container
sed -i -E \
- "s|Exec=localsend_app|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|" \
+ "s|Exec=localsend_app|Exec=env DESKTOPINTEGRATION=false /usr/bin/${pkgname%-*}|" \
"squashfs-root/${_pkgdesktop}"
-
+
# Adjust .desktop to have it point to the correct icon (@CIAvash)
sed -i -E 's/^Icon=.+/Icon=localsend/' "squashfs-root/${_pkgdesktop}"
@@ -59,21 +59,23 @@ package() {
# AppImage
install -Dm755 \
"${srcdir}/${_appimage}" \
- "${pkgdir}/opt/${_pkgname}/${_appimage_nover}"
+ "${pkgdir}/opt/${pkgname%-*}/${_appimage_nover}"
# Desktop file
install -Dm644 \
"${srcdir}/squashfs-root/${_pkgdesktop}" \
"${pkgdir}/usr/share/applications/${_pkgdesktop}"
-
- # Icon file (using the 512x512 one only)
- install -Dm644 \
- "${srcdir}/squashfs-root/data/flutter_assets/assets/img/logo-512.png" \
- "${pkgdir}/usr/share/icons/localsend.png"
+
+ # Icon files
+ for size in 32 128 256 512; do
+ install -Dm644 \
+ "${srcdir}/squashfs-root/data/flutter_assets/assets/img/logo-$size.png" \
+ "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/localsend.png"
+ done
# Symlink executable
install -dm755 "${pkgdir}/usr/bin"
ln -s \
- "/opt/${_pkgname}/${_appimage_nover}" \
- "${pkgdir}/usr/bin/${_pkgname}"
+ "/opt/${pkgname%-*}/${_appimage_nover}" \
+ "${pkgdir}/usr/bin/${pkgname%-*}"
}