summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ffb7e35b30190f5a1acc496ed73eff921ef04c99 (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
# Maintainer: Jordan Cannon <LiteracyFanatic@gmail.com>
pkgname=manga-sharp
pkgver=0.5.0
pkgrel=1
pkgdesc='CLI manga downloader and reader with lightweight web interface'
arch=(x86_64)
url='https://github.com/LiteracyFanatic/manga-sharp'
license=('MIT')
depends=(dotnet-runtime aspnet-runtime)
options=('!strip')
makedepends=(dotnet-sdk npm git)
source=("git+https://github.com/LiteracyFanatic/manga-sharp#tag=v$pkgver")
sha256sums=(SKIP)

prepare() {
	cd "$srcdir/$pkgname/src/Client"
	yarn
}

build() {
	cd "$srcdir/$pkgname/src/Client"
	yarn build
	cd "$srcdir/$pkgname"
	mkdir -p src/CLI/wwwroot/
	cp -R src/Client/dist/* src/CLI/wwwroot/
	dotnet publish -c Release -r linux-x64 --no-self-contained -o dist src/CLI/
}

package() {
	cd "$srcdir/$pkgname"
	install -Dm 755 dist/manga "$pkgdir/usr/bin/manga"
	install -Dm 544 manga-completion "$pkgdir/usr/share/bash-completion/completions/manga"
    install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}