-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
51 lines (43 loc) · 1.19 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
# Maintainer: weedzcokie
pkgname=git-good
pkgver=v0.1.5.r1.g5316633
pkgrel=1
pkgdesc='Git-good'
arch=('x86_64')
url='https://github.com/weedz/git-good'
license=('GPL3')
depends=(
'electron32'
'openssl'
'krb5'
)
makedepends=('git')
provides=('git-good')
source=(git-good.tar.bz2
git-good-exec
git-good.desktop)
sha256sums=('SKIP' 'SKIP' 'SKIP')
prepare() {
cd "$pkgname"
# pnpm install --ignore-scripts
pnpm run build
}
pkgver() {
cd "$pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
electron_version=$(electron32 -v | sed 's/v//')
cd "$pkgname"
JOBS=max pnpm run electron-rebuild
JOBS=max npm exec electron-builder -- --linux --x64 --dir -c.target= -c.npmRebuild=false -c.electronVersion="$electron_version"
}
package() {
install -Dm644 -t "$pkgdir/usr/share/applications" git-good.desktop
install -Dm755 -t "$pkgdir/usr/bin" git-good-exec
mv "$pkgdir/usr/bin/git-good-exec" "$pkgdir/usr/bin/git-good"
cd "$pkgname"
install -Dm644 -t "$pkgdir/usr/share/git-good" out/linux-unpacked/resources/app.asar
cp -rt "$pkgdir/usr/share/git-good" out/linux-unpacked/resources/app.asar.unpacked
find "$pkgdir" -type d -empty -delete -print
}