blob: 6a1a7ae50cf4dcb0fd41975fb27b2a6ca05cc8e4 (
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
|
# Original Maintainer: Jonatan Bravo <zephrax@gmail.com>
# Maintainer: Hendrik "T4cC0re" Meyer <aur@t4cc0.re>
pkgname=tfenv
pkgver=2.1.0
pkgrel=1
epoch=
pkgdesc="Terraform version manager inspired by rbenv"
arch=("x86_64")
url="https://github.com/tfutils/tfenv"
license=('MIT')
groups=()
depends=("unzip")
makedepends=()
checkdepends=()
optdepends=()
provides=("tfenv" "terraform")
source=("https://github.com/tfutils/tfenv/archive/v${pkgver}.tar.gz")
validpgpkeys=()
install="${pkgname}.install"
conflicts=("terraform")
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
mkdir -p "${pkgdir}/usr/bin"
mkdir -p "${pkgdir}/opt/tfenv/libexec"
mkdir -p "${pkgdir}/opt/tfenv/lib"
mkdir -p "${pkgdir}/opt/tfenv/bin"
# This patches tfenv to use a separate dir for versions and the default version
sed -i 's:${TFENV_ROOT}/version:/var/lib/tfenv/version:g' libexec/tfenv-*
ln -s "/opt/tfenv/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
ln -s "/opt/tfenv/bin/terraform" "${pkgdir}/usr/bin/terraform"
install -m755 "bin/${pkgname}" "${pkgdir}/opt/tfenv/bin/${pkgname}"
install -m755 "bin/terraform" "${pkgdir}/opt/tfenv/bin/terraform"
install -m444 "CHANGELOG.md" "${pkgdir}/opt/tfenv/CHANGELOG.md"
for i in "${srcdir}/${pkgname}-${pkgver}/libexec/"*; do
install -m555 "$i" "${pkgdir}/opt/tfenv/libexec/$(basename "$i")"
done
for i in "${srcdir}/${pkgname}-${pkgver}/lib/"*; do
install -m555 "$i" "${pkgdir}/opt/tfenv/lib/$(basename "$i")"
done
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
}
sha512sums=(d070570b2a60582f7af2261d9627d70b6dcf59bc5076042035befeef07c9b22d043ea133e8af6242daba0ed0b64fcdaaeabff056327014f6a2c6515ce9afa78f)
|