summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3f3ed244403d5fb5fccd6aa71c1ddcdab5ad403 (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
# Maintainer: Dark-Kernel <sumitpatel24389@gmail.com>
pkgname=tuisic-git
pkgver=1.0.0.r44.6087f0d
pkgrel=1
pkgdesc="A terminal based online music streaming player"
arch=('x86_64')
url="https://github.com/Dark-Kernel/tuisic"
license=('MIT')
depends=('mpv' 'curl' 'fmt' 'yt-dlp' 'fftw')
makedepends=('cmake' 'git' 'gcc')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/Dark-Kernel/tuisic.git")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    printf "1.0.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/${pkgname%-git}"
    git submodule init
    git submodule update
}

build() {
    cd "$srcdir/${pkgname%-git}"
    cmake -B build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr
    cmake --build build
}

package() {
    cd "$srcdir/${pkgname%-git}"
    DESTDIR="$pkgdir" cmake --install build
}