blob: b978e6625b90b6e60172331bcf67fb2ad06fb1aa (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=bbg-bin
pkgver=20240613
_electronversion=30
pkgrel=1
pkgdesc="A static blog generator based on Electron Technology"
arch=(
'aarch64'
'x86_64'
)
url="https://bbg.nekomoe.xyz/"
_ghurl="https://github.com/bbg-contributors/bbg"
license=('Unlicense')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-arm64.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-amd64.deb")
source=(
"LICENSE-${pkgver}::https://raw.githubusercontent.com/bbg-contributors/bbg/${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('436a6d536138f203ac333858cff92a568be62797752b3adb94bcaa0f6ffe7ef6'
'2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
sha256sums_aarch64=('31280e813f5ed2d0a20d1f1b9f9f475eef01052587c2463a417613e18a49de19')
sha256sums_x86_64=('e6900e9095787fc4b1d75c21827cc61132e6bfaffbebdf64e04117c8f822baa6')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app.asar|g" \
-e "s|@cfgdirname@|${pkgname%-bin}|g" \
-e "s|@options@||g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
sed "s|/opt/${pkgname%-bin}/${pkgname%-bin}|${pkgname%-bin} %U|g;s|/usr/share/icons/${pkgname%-bin}.png|${pkgname%-bin}|g" \
-i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/opt/${pkgname%-bin}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "${srcdir}/usr/share/icons/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}
|