summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6805872d20b7eef5a07457fdf0928f6924cc5439 (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
# Maintainer: kyngs <aurmail at kyngs dot xyz>
pkgname=miru-git
pkgrel=1
pkgver=4.2.7
pkgdesc="Bittorrent streaming software for cats"
arch=("any")
url="https://github.com/ThaUnknown/miru"
license=("GPL-3.0")
depends=("xdg-utils" "pnpm")
source=(
    "git+${url}"
)
sha256sums=(
    "SKIP"
)
conflicts=("miru-bin")

pkgver() {
  git -C "miru" describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^version_//' | sed 's/v//g'
}

build() {
    cd "miru"
    rm -rf node_modules # In case of an existing src/ dir, keeping old node modules could break things
    pnpm install
    echo "**Webpack takes a long time (even up to ten minutes) to build, while providing no console output. Do not cancel the build unless it takes more than ten minutes.**"
    pnpm run build
}

package() {
    cd "miru/dist"
    debs=(*.deb)
    ar vx "${debs[0]}"

    tar -xJ -f data.tar.xz -C "${pkgdir}"
    install -D -m644 "${pkgdir}/opt/Miru/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}