-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPKGBUILD
71 lines (62 loc) · 2.06 KB
/
PKGBUILD
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
65
66
67
68
69
70
71
# Maintainer: Rudra Saraswat <[email protected]>
pkgname='blend-web-store-git'
pkgver=r12.fa8f99f
pkgrel=1
pkgdesc="A web store designed for blendOS"
arch=('x86_64' 'i686')
url="https://github.com/blend-os/web-store"
license=('GPL3')
depends=("electron")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
makedepends=("electron" 'git' 'npm')
source=('web-store'::'git+https://github.com/blend-os/web-store'
'blend-web-store.desktop'
'blend-web-store')
sha256sums=('SKIP'
'8efa81795f5a72d55ae9d9284467ea4ea4abdbe5101d4516e972ec39a44ce4ba'
'1da4a07a9bfa1bbd23a65cd45b8c45e82bc701ccaa5387dd6927a017ead88096')
pkgver() {
cd "${srcdir}/web-store"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/web-store"
npm config set cache "${srcdir}/npm-cache"
npm install
}
build() {
cd "${srcdir}/web-store"
npm config set cache "${srcdir}/npm-cache"
export NODE_ENV=production
electronDist="/usr/lib/electron"
electronVer="$(sed s/^v// /usr/lib/electron/version)"
npm run icons
npm run pack -- -c.electronDist=${electronDist} \
-c.electronVersion=${electronVer} --publish never
}
package() {
cd "${srcdir}/web-store"
local _arch
case ${CARCH} in
i686)
_arch=linux-ia32-unpacked
;;
x86_64)
_arch=linux-unpacked
;;
*)
_arch=linux-${CARCH}-unpacked
;;
esac
install -Dm644 "dist/${_arch}/resources/app.asar" \
"$pkgdir/usr/lib/${pkgname%-git}/${pkgname%-git}.asar"
for icon_size in 16 24 32 48 64 128 256 512; do
install -Dm644 "build/icons/png/${icon_size}x${icon_size}.png" \
"${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/${pkgname%-git}.png"
done
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t \
"${pkgdir}"/usr/share/applications/
install -Dm755 "${srcdir}/${pkgname%-git}" -t "${pkgdir}"/usr/bin/
install -Dm755 "${srcdir}/web-store/wapp-inst/blend-wapp-inst" -t "${pkgdir}"/usr/bin/
}