Added PKGBUILD
ci/woodpecker/push/woodpecker Pipeline was successful Details

master
Jef Roosens 2022-07-03 15:02:53 +02:00
commit bf80ead05d
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
4 changed files with 118 additions and 0 deletions

22
.SRCINFO 100644
View File

@ -0,0 +1,22 @@
pkgbase = vlang
pkgdesc = Simple, fast, safe, compiled language for developing maintainable software
pkgver = 0.3.0
pkgrel = 1
url = https://vlang.io
arch = x86_64
arch = aarch64
license = MIT
makedepends = git
depends = glibc
optdepends = glfw: Needed for graphics support
optdepends = freetype2: Needed for graphics support
optdepends = openssl: Needed for http support
conflicts = v
conflicts = vlang-bin
conflicts = vlang-git
source = v-ec758604538c00cceb142d324609a241e665f7c7.zip::https://github.com/vlang/v/archive/ec758604538c00cceb142d324609a241e665f7c7.zip
source = vc-5dc8384638f515a098f75296fa7123c5e6a4964a.zip::https://github.com/vlang/vc/archive/5dc8384638f515a098f75296fa7123c5e6a4964a.zip
sha256sums = 46e4a7893c475ab17bf7b1e596bd2be2608169b8a3d74b2910f12a1ed8a32d4a
sha256sums = 570e64a76c848b8575ec286b9b23d788a97dc4d23ba029cba5e987bbcce41a6b
pkgname = vlang

6
.gitignore vendored 100644
View File

@ -0,0 +1,6 @@
*
!PKGBUILD
!.SRCINFO
!.gitignore
!.woodpecker.yml

30
.woodpecker.yml 100644
View File

@ -0,0 +1,30 @@
matrix:
PLATFORM:
- 'linux/amd64'
- 'linux/arm64'
platform: ${PLATFORM}
branches: ['master']
pipeline:
build:
image: 'menci/archlinuxarm:base-devel'
commands:
# Update packages
- pacman -Syu --noconfirm
# Create non-root user to perform build & switch to their home
- groupadd -g 1000 builder
- useradd -mg builder builder
- chown -R builder:builder "$PWD"
- "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- su builder
# Build the package
- makepkg -s --noconfirm --needed
publish:
image: 'curlimages/curl'
secrets:
- 'vieter_api_key'
commands:
# Publish the package
- 'for pkg in $(ls -1 *.pkg*); do curl -f -XPOST -T "$pkg" -H "X-API-KEY: $VIETER_API_KEY" https://arch.r8r.be/vieter/publish; done'

60
PKGBUILD 100644
View File

@ -0,0 +1,60 @@
# Maintainer: Jef Roosens
# Contributor: Logan Magee <mageelog@gmail.com>
# Commit hashes of 0.3 release in v & vc repositories
_v_commit_sha=ec758604538c00cceb142d324609a241e665f7c7
_vc_commit_sha=5dc8384638f515a098f75296fa7123c5e6a4964a
pkgname=vlang
pkgver=0.3.0
pkgrel=1
pkgdesc='Simple, fast, safe, compiled language for developing maintainable software'
arch=('x86_64' 'aarch64')
url='https://vlang.io'
license=('MIT')
depends=('glibc')
optdepends=('glfw: Needed for graphics support'
'freetype2: Needed for graphics support'
'openssl: Needed for http support')
makedepends=('git')
conflicts=('v' 'vlang-bin' 'vlang-git')
source=("v-${_v_commit_sha}.zip::https://github.com/vlang/v/archive/${_v_commit_sha}.zip"
"vc-${_vc_commit_sha}.zip::https://github.com/vlang/vc/archive/${_vc_commit_sha}.zip")
sha256sums=('46e4a7893c475ab17bf7b1e596bd2be2608169b8a3d74b2910f12a1ed8a32d4a'
'570e64a76c848b8575ec286b9b23d788a97dc4d23ba029cba5e987bbcce41a6b')
prepare() {
mv "vc-${_vc_commit_sha}" "v-${_v_commit_sha}/vc"
# We have to set local=1 because we manually download a specific vc
# version. This flag also disables downloading tcc, so we do that
# beforehand.
make -C "v-${_v_commit_sha}" fresh_tcc
}
build() {
cd "v-${_v_commit_sha}"
CFLAGS="" LDFLAGS="" make prod=1 local=1
# Compile all tools
LDFLAGS='' ./v build-tools
}
package() {
cd "v-${_v_commit_sha}"
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