summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 75ece0c52e9d25dc3aab50cfe75ddf3f2bdbe5ba (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
# Maintainer: <agustinballesteros04@gmail.com>
pkgname=kew-git
pkgrel=1
pkgver=v3.0.0rc1.b709558
pkgdesc="A command-line music player"
arch=('x86_64')
url="https://github.com/ravachol/kew"
license=('GPL2')
conflicts=('kew')
depends=('fftw' 'git' 'chafa' 'taglib' 'libogg' 'gcc' 'make' 'glib2' 'opus' 'opusfile' 'libvorbis')
optdepends=('libnotify' 'faad2')
replaces=('cue-git')
sha256sums=('SKIP')

source=("git+${url}")

pkgver() {
    cd "$srcdir/kew"
    local tag=$(git tag --merged main | sort | tail -n1)
    local commit_hash=$(git rev-parse --short HEAD)
    echo "${tag}.${commit_hash}" | sed 's/[:\/\-]//g'
}

build() {
    cd "$srcdir/kew"
    make
}

package() {
    cd "$srcdir/kew"
    install -Dm755 kew "$pkgdir/usr/bin/kew"
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 "$srcdir/kew/docs/kew-manpage.mdoc" "$pkgdir/usr/share/man/man1/kew.1"
}