blob: 53214b67be95b918e6d8c97b45fa07bdad623f50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: Nixuge
# Contributor: Noah Vogt <noah@noahvogt.com>
# Contributor: SpieringsAE (aarch64 addition)
# Note:
# using the .deb instead of the .tar.gz as it already contains the icons as well as the .desktop file.
pkgname=localsend-bin
pkgver=1.16.1
pkgrel=1
pkgdesc='An open source cross-platform alternative to AirDrop'
url=https://github.com/localsend/localsend
arch=('x86_64' 'aarch64')
license=(MIT)
depends=(fuse2 xdg-user-dirs libayatana-appindicator)
conflicts=('localsend')
provides=('localsend')
options=(!debug)
source_x86_64=("${url}/releases/download/v${pkgver}/LocalSend-${pkgver}-linux-x86-64.deb")
source_aarch64=("${url}/releases/download/v${pkgver}/LocalSend-${pkgver}-linux-arm-64.deb")
sha256sums_x86_64=('f4d15526b8321761f3eb99ac6314c25ec79e1bb1397b329c40de05ef2bd4019a')
sha256sums_aarch64=('99ef6e4ab7eeeb00c1fe966c4e36037fbfc8d23ab6b2cffc167d7c12700a6d23')
_pkgdesktop="localsend_app.desktop"
prepare() {
tar -xf data.tar.xz
}
build() {
sed -i -E \
"s|Exec=localsend_app|Exec=localsend|" \
"${srcdir}/usr/share/applications/${_pkgdesktop}"
# Adjust .desktop to have it point to the correct icon
sed -i -E 's/^Icon=.+/Icon=localsend/' "${srcdir}/usr/share/applications/${_pkgdesktop}"
}
package() {
# Desktop
install -Dm644 "${srcdir}/usr/share/applications/${_pkgdesktop}" "${pkgdir}/usr/share/applications/${pkgname%-*}.desktop"
# Icons
install -dm644 "${pkgdir}/usr/share/icons/"
cp -a "${srcdir}/usr/share/icons" "${pkgdir}/usr/share"
# Dirty - rename icons to localsend
for res in "128x128" "256x256"; do
mv "${pkgdir}/usr/share/icons/hicolor/${res}/apps/localsend_app.png" "${pkgdir}/usr/share/icons/hicolor/${res}/apps/localsend.png"
done
# Executable
install -dm755 "${pkgdir}/opt/${pkgname%-*}/"
cp -a "${srcdir}/usr/share/localsend_app/." "${pkgdir}/opt/${pkgname%-*}"
# Same as icons - rename to localsend
mv "${pkgdir}/opt/${pkgname%-*}/localsend_app" "${pkgdir}/opt/${pkgname%-*}/localsend"
# Symlink executable
install -dm755 "${pkgdir}/usr/bin"
ln -s \
"/opt/${pkgname%-*}/${pkgname%-*}" \
"${pkgdir}/usr/bin/${pkgname%-*}"
}
|