summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f058bbd661ac998acb36d3e3795024c3a01d7ab0 (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
50
51
# Maintainer: claymorwan <claymorwan@fembois.dev>
pkgname=shiru-git
_pkgname=shiru
pkgver=r1560.7ed5569
pkgrel=1
pkgdesc="BitTorrent streaming software with no paws in the way—watch anime in real-time, no waiting for downloads!"
arch=('x86_64')
url="https://github.com/RockinChaos/Shiru"
license=('GPL-3.0')
#depends=()
makedepends=('git' 'npm' 'pnpm')
provides=("$_pkgname")
conflicts=("$_pkgname")
options=("!strip")
source=("$_pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/$_pkgname"

	# Git, no tags available
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

}

prepare() {
	cd "$srcdir/$_pkgname/electron"
	pnpm install
}

build() {
	cd "$srcdir/$_pkgname/electron"
	pnpm build
}

package() {
	cd "$srcdir/$_pkgname/electron/"
	install -Dm755 dist/linux-Shiru-*.AppImage "$pkgdir/usr/bin/$_pkgname"
	install -D "buildResources/icon.png" "$pkgdir/usr/share/icons/$_pkgname.png"

	install -Dm0644 /dev/stdin $pkgdir/usr/share/applications/$_pkgname.desktop <<EOF
[Desktop Entry]
Name=Shiru
Comment=BitTorrent streaming software with no paws in the way—watch anime in real-time, no waiting for downloads!
Exec=/usr/bin/$_pkgname
Icon=$_pkgname
Terminal=false
Type=Application
Categories=AudioVideo;
EOF
}