summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8eaaeb2d7ea032e8b0216e401ee7274ff0a1eeb1 (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: samedamci <samedamci@disroot.org>
pkgname=tekstowo-git
pkgver=0.1.r0.54eb87b
pkgrel=1
pkgdesc="Find lyrics and translation for a song using tekstowo.pl"
arch=('any')
url="https://github.com/samedamci/tekstowo"
license=('MIT')
depends=('python3')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=("${pkgname%-git}")
source=("git+https://github.com/samedamci/${pkgname%-git}.git")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"

	printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | cut -b 2-)"
}

package() {
	cd "$srcdir/${pkgname%-git}" || exit 1
	local doc_path="$pkgdir/usr/share/doc/${pkgname%-git}"

	install -Dm755 "tekstowo.py" "$pkgdir/usr/bin/${pkgname%-git}"

	install -Dm755 -d "$pkgdir/usr/share/doc/${pkgname%-git}"

	install -Dm644 "README.md" "${doc_path}/README.md"
	install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
}