Skip to content

Commit

Permalink
add melang and apkbuild files
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>
  • Loading branch information
viveksahu26 committed Feb 10, 2024
1 parent d0172fb commit 4c94ba5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
# - uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
# ghcr.io/viveksahu26/${{ github.repository }}

# - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
# with:
Expand Down
33 changes: 33 additions & 0 deletions APKBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Maintainer: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>
pkgname=url_shortner
pkgver=1.0.0
pkgrel=0
pkgdesc="A simple URL shortener written in Go"
url="https://github.com/viveksahu26/url_shortner"
arch="all"
license="Apache-2.0"
makedepends="go"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/viveksahu26/url_shortner/archive/refs/tags/v${pkgver}.tar.gz"
builddir="$srcdir/${pkgname}-${pkgver}"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GO111MODULE=auto
export GOPATH="$srcdir"

prepare() {
default_prepare
mkdir -p "${builddir}/src"
mv "${builddir}"/* "${builddir}/src/"
}

build() {
cd "$builddir/src"
go build -o ../url_shortner .
}

package() {
install -Dm755 "$builddir/url_shortner" "$pkgdir"/usr/bin/url_shortner
}

sha512sums="" # You will need to generate this using 'abuild checksum'
13 changes: 13 additions & 0 deletions melange.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package:
name: url-shortner
version: 1.0.0
release: 1
source:
- https://github.com/viveksahu26/url_shortner/archive/refs/tags/v1.0.0.tar.gz
build:
gopath: true
commands:
- go build -o url_shortner ./src
install:
commands:
- install -Dm755 url_shortner "$PKGDIR"/usr/bin/url_shortner
2 changes: 2 additions & 0 deletions url.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
xtNFxaBwCG=http://google.com/1346461234567890123456789/get/viveksahu26832eu3rhur3hurr3nrrfdf45ekeddfff
ZvjN^^%9B+=http://google.com/1346461234567890123456789/get/viveksahu26832eu3rhur3hurr3nrrfdddfff
IdUXZPsB1j=http://google.com/1346461234567890123456789/get/viveksahu26
dCSmGfQ9PK=http://google.com/1346461234567890123456789/get/viveksahu2683uu2

0 comments on commit 4c94ba5

Please sign in to comment.