Skip to content

Commit

Permalink
Add AUR Dockerfile + PKGBUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBrock committed Jun 18, 2018
1 parent 3ce98d6 commit c3887cb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aur/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM pritunl/archlinux

RUN pacman -S base-devel --noconfirm

RUN useradd build
USER build
31 changes: 31 additions & 0 deletions aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Maintainer: Tyler Brock <tyler.brock@gmail.com>
pkgname=saw
pkgver=0.1.3
pkgrel=1
pkgdesc="Fast, multipurpose tool for AWS CloudWatch Logs"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
provides=('saw')
url="https://github.com/TylerBrock/$pkgname"
license=('MIT')
makedepends=('go' 'git' 'dep')
source=("https://github.com/TylerBrock/$pkgname/archive/v$pkgver.tar.gz")
md5sums=('a9daec2bee15e595e71424d720767d8b')

prepare() {
mkdir -p "${srcdir}/go/src/github.com/TylerBrock/"
mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/go/src/github.com/TylerBrock/${pkgname}"
}

build() {
export GOPATH="${srcdir}/go"
export PATH="$PATH:$srcdir/go/bin"
cd "${srcdir}/go/src/github.com/TylerBrock/${pkgname}"
dep ensure
go build .
}

package() {
cd "${srcdir}/go/src/github.com/TylerBrock/${pkgname}"
install -Dm755 saw "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

0 comments on commit c3887cb

Please sign in to comment.