summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9c95d826aec4127b3d9475b0404fdeab4e219d3 (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
# Maintainer: Hoream <hoream@qq.com>
_pkgname="go-musicfox"
pkgname="${_pkgname}-git"
pkgver=4.6.0.r4.g0f1636b
pkgrel=1
pkgdesc='Command-line Netease Cloud Music written in Go (git version).'
url='https://github.com/anhoder/go-musicfox'
license=('MIT')
arch=('x86_64' 'aarch64')
provides=('musicfox' 'go-musicfox')
conflicts=('go-musicfox-bin' 'musicfox' 'go-musicfox')
depends=('flac' 'alsa-lib')
makedepends=('go' 'git')
source=(${_pkgname}::git+https://github.com/go-musicfox/go-musicfox)
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/$_pkgname"
    git describe --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g;s/^v//'
}

build(){
 	cd "${srcdir}/${_pkgname}"
    go mod download
    make
}

package() {
	install -d "${pkgdir}/usr/bin"
	install -d "${pkgdir}/usr/share/licenses/${pkgname}"
	install -Dm755 "${srcdir}/${_pkgname}/bin/musicfox" "${pkgdir}/usr/bin/musicfox"
	install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
}