-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
30 lines (27 loc) · 1.48 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
# Maintainer: msojocs <jiyecafe@gmail.com>
# Contributor: aerian<wo199710@hotmail.com>
pkgname=bilibili-bin
pkgdesc="基于 Bilibili PC 版修改的一个 Electron 打包"
_pkgname=bilibili
pkgver=1.14.2
pkgrel=1
arch=(any)
_electron=electron29
depends=("${_electron}" libappindicator-gtk3 ffmpeg)
source=("${pkgname}-v${pkgver}-${pkgrel}.tar.gz::https://github.com/msojocs/bilibili-linux/releases/download/v${pkgver}-${pkgrel}/bilibili-asar-v${pkgver}-${pkgrel}.tar.gz"
"${_pkgname}.desktop::https://raw.githubusercontent.com/msojocs/bilibili-linux/master/res/bilibili.desktop"
"${_pkgname}.svg::https://raw.githubusercontent.com/msojocs/bilibili-linux/master/res/icons/bilibili.svg"
)
sha256sums=('4bd21bfe19fd5b39756c54497063c335638d2696e1d3350671f7470cdedd3df6'
'2e7065c4255edcf39a9d07c83ae81e7c8a9b650c7a570c56e255e5647fd535d4'
'7cf1a17b2a0932927396d5fd6a5c7c5b418222a405cc99322d0a730741f41b89')
package() {
sed -i -e "s#\"\$root_dir/electron/electron\"#${_electron}#" $srcdir/bin/bilibili
sed -i -e "s#Exec=bilibili#Exec=/opt/${pkgname}/bin/bilibili#" -e "s#Path=/path/to/bilibili#Path=/opt/${pkgname}/bin/#" $srcdir/$_pkgname.desktop
install -d "$pkgdir"/opt/$pkgname
install -d "$pkgdir"/usr/share/applications
install -Dm644 $srcdir/$_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"
install -d $pkgdir/usr/share/icons/
cp $srcdir/$_pkgname.svg $pkgdir/usr/share/icons/$_pkgname.svg
cp -R $srcdir/{bin,app} "$pkgdir"/opt/$pkgname
}