blob: 756ab434fae1d60b3f957871de7e2e0d88b374ff (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_pkgname=pause
pkgname="${_pkgname}-desktop-bin"
_appname=Pause
pkgver=0.9.2
_electronversion=27
pkgrel=2
pkgdesc="Reminds you to take a break ☕"
arch=('x86_64')
url="https://github.com/Thomsch/pause"
license=('GPL-3.0-only')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
)
makedepends=(
'fuse2'
)
source=(
"${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/${_appname}-${pkgver}.AppImage"
"${pkgname%-bin}.sh"
)
sha256sums=('337bd36d3253f4b1c4e25dcc520e638ee0e105680340d60fae722f595243f45e'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
sed -e "
s/@electronversion@/${_electronversion}/
s/@appname@/${pkgname%-bin}/
s/@runname@/app.asar/
s/@cfgdirname@/${_appname}/
s/@options@//
" -i "${srcdir}/${pkgname%-bin}.sh"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/;s/Icon=${_pkgname}/Icon=${pkgname%-bin}/" \
"${srcdir}/squashfs-root/${_pkgname}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
_icon_sizes=(32x32 64x64 128x128 256x256 512x512)
for _icons in "${_icon_sizes[@]}"; do
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${_pkgname}.png" \
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png"
done
install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
|