From 1cacb2702bedce48c04b4cd8a42d3cabe76b831e Mon Sep 17 00:00:00 2001 From: Victor Roemer Date: Sat, 8 Apr 2023 12:23:48 -0700 Subject: [PATCH] packages: Add Helloworld a Golang example build --- packages/helloworld/APKBUILD | 29 ++++++++++++++++++ packages/helloworld/helloworld-1.0.0.tar.gz | Bin 0 -> 270 bytes .../helloworld-1.0.0/src/helloworld/main.go | 8 +++++ 3 files changed, 37 insertions(+) create mode 100644 packages/helloworld/APKBUILD create mode 100644 packages/helloworld/helloworld-1.0.0.tar.gz create mode 100644 packages/helloworld/helloworld-1.0.0/src/helloworld/main.go diff --git a/packages/helloworld/APKBUILD b/packages/helloworld/APKBUILD new file mode 100644 index 0000000..ec96a13 --- /dev/null +++ b/packages/helloworld/APKBUILD @@ -0,0 +1,29 @@ +# Contributor: Your Name +# Maintainer: Your Name +pkgname=helloworld +pkgver=1.0.0 +pkgrel=0 +pkgdesc="My Golang project" +url="https://github.com/yourusername/mygoproject" +arch="all" +license="MIT" +depends="" +makedepends="go" +source="helloworld-$pkgver.tar.gz" +builddir="$srcdir/helloworld-$pkgver" + +build() { + export GOPATH="$builddir" + cd src/helloworld + go mod init helloworld + go build . +} + +package() { + cd "$builddir" + install -Dm755 $GOPATH/src/helloworld/helloworld "$pkgdir/usr/bin/helloworld" +} + +sha512sums=" +c933d316d5fcf12e3fedac4dc83681a5e4c821435bd3f982236c01df044878027cf53c430cdbfad786570562dff1a4b21cfa32780e171f7ddded3fc5ac50404f helloworld-1.0.0.tar.gz +" diff --git a/packages/helloworld/helloworld-1.0.0.tar.gz b/packages/helloworld/helloworld-1.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..1bbc9474c2991b1b50a6a3166a1eee5ebe79043f GIT binary patch literal 270 zcmV+p0rCDHiwFP!000001MSn@YJ)Hs#&M5x6`4mZbS|&?@D_U5TX6PE7PX{G5614j zi7+