# Maintainer: Jef Roosens # Contributor: Logan Magee # Contributor: Dimitris Kiziridis # Contributor: whoami # Contributor: Jefferson González # Contributor: Chloe Kudryavtsev pkgname=vlang-git pkgver=0.4.5.r93.ga1d4712b0b pkgrel=1 pkgdesc='Simple, fast, safe, compiled language for developing maintainable software (development version)' arch=('x86_64' 'aarch64') url='https://vlang.io' license=('MIT') depends=('glibc' 'libx11') makedepends=('git') optdepends=('glfw: Needed for graphics support' 'freetype2: Needed for graphics support' 'openssl: Needed for http support') conflicts=('v' 'vlang' 'vlang-bin') provides=('vlang') source=('v::git+https://github.com/vlang/v') sha256sums=('SKIP') pkgver() { # Weekly tags are considered older than semantic tags that are older than # them, so to prevent version resolution problems we exclude weekly tags. git -C v describe --long --tags --exclude "weekly*" | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { # `v up` should be disabled, as it can break the installed package. echo "println('v up is disabled; see the AUR page for more information.')" > 'v/cmd/tools/vup.v' } build() { cd v CFLAGS= LDFLAGS= make prod=1 # Compile all tools LDFLAGS= ./v build-tools } package() { cd v install -d "${pkgdir}/usr/lib/vlang" "${pkgdir}/usr/share/vlang" "${pkgdir}/usr/bin" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm755 v "${pkgdir}/usr/lib/vlang" cp -a cmd "${pkgdir}/usr/lib/vlang/" cp -a examples "${pkgdir}/usr/share/vlang/" cp -a thirdparty "${pkgdir}/usr/lib/vlang/" cp -a vlib "${pkgdir}/usr/lib/vlang/" cp v.mod "${pkgdir}/usr/lib/vlang/" ln -s /usr/lib/vlang/v "${pkgdir}/usr/bin/v" touch "${pkgdir}/usr/lib/vlang/cmd/tools/.disable_autorecompilation" } # vim: ft=bash