-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packages: Add Helloworld a Golang example build
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Contributor: Your Name <[email protected]> | ||
# Maintainer: Your Name <[email protected]> | ||
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 | ||
" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("Hello, world!") | ||
} | ||
|