summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 37c7d1d8ca5475f4d068bfb862a07f4c706225ef (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
# Maintainer: Márk Sági-Kazár <mark.sagi-kazar@gmail.com>

pkgname=phpenv-git
pkgver=r274.0852611
pkgrel=1
pkgdesc="Manage multiple PHP versions"
arch=("any")
url="https://github.com/madumlao/phpenv"
license=("MIT")
makedepends=("git")
optdepends=("php-build")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
install=phpenv.install
source=("git://github.com/madumlao/phpenv")
md5sums=("SKIP")

# TODO: Update upon first tag
pkgver() {
	cd "${srcdir}/${pkgname%-git}"

	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

	mkdir -p "${pkgdir}/usr/share/licenses/${pkgname%-git}"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"

	mkdir -p "${pkgdir}/usr/lib/${pkgname%-git}/completions"
	install -m 644 ./completions/* "${pkgdir}/usr/lib/${pkgname%-git}/completions/"

	mkdir -p "${pkgdir}/usr/lib/${pkgname%-git}/libexec"
	install -m 755 ./libexec/* "${pkgdir}/usr/lib/${pkgname%-git}/libexec/"

	mkdir -p "${pkgdir}/usr/bin"
	ln -s "/usr/lib/${pkgname%-git}/libexec/${pkgname%-git}" "${pkgdir}/usr/bin/"
}