summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fcd0e0d0d64e43312901c104e2e5f197739b63b1 (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
39
40
41
42
43
44
45
46
47
# Maintainer: bemxio <bemxiov at protonmail dot com>

pkgname=musyx-extract-git
pkgdesc="Sample extractor for GameCube MusyX files"

pkgver=r18.1d9e5c4
pkgrel=3

arch=(any)

url="https://github.com/Nisto/musyx-extract"
license=("LicenseRef-unknown")

depends=(python)
makedepends=(git)

provides=(musyx-extract)

source=("git+https://github.com/Nisto/musyx-extract.git")
md5sums=("SKIP")

pkgver() {
  	# move to the source directory
	cd musyx-extract
  	
	# use the number of revisions since beginning of the history
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
	# move to the source directory
	cd musyx-extract

	# add the shebang to the script
	sed -i '1s/^/#!\/usr\/bin\/python\n/' MusyXExtract.py
}

package() {
	# move to the source directory
	cd musyx-extract

	# make the script executable
	chmod +x MusyXExtract.py

	# install the script to /usr/bin
	install -Dm755 MusyXExtract.py "${pkgdir}/usr/bin/musyx-extract"
}