blob: ca1c7aa16e1b40194b3b37225077aad827a62d4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Maintainer: Andy McLeod <andy@amcleod.ca>
pkgname=ejson
pkgver=1.2.1
pkgrel=0
pkgdesc="EJSON is a small library to manage encrypted secrets using asymmetric encryption."
url="https://github.com/Shopify/ejson"
arch="all"
license="MIT"
depends="mdocml" # Requires man to show help
makedepends="go ronn"
source="$pkgname-$pkgver.tar.gz::https://github.com/Shopify/$pkgname/archive/v$pkgver.tar.gz"
_gourl=github.com/Shopify/ejson
builddir="$srcdir"/src/$_gourl
prepare() {
mkdir -p "${builddir%/*}"
mv "$srcdir"/$pkgname-$pkgver "$builddir"
default_prepare
}
build() {
export GOPATH="$srcdir"
CGO_ENABLED=0 go build -v -o e${pkgname} github.com/Shopify/ejson/cmd/ejson
# Overwrite bundle exec so it runs our ronn command from the system not
# from some rubygems repo
sed -i 's|^BUNDLE_EXEC=.*|BUNDLE_EXEC=exec|' Makefile
make man
}
check() {
go test -v ./...
}
package() {
install -Dm755 e${pkgname} "$pkgdir"/usr/bin/ejson
# Keep this in the main package, ejson calls into 'man' to show
# the help string
mkdir -p "$pkgdir"/usr/share
mv build/man "$pkgdir"/usr/share/man/
}
sha512sums="cd49e70b1578f0f960b6d6d77499297bcee7eac3b8595109757697ef844ba8867c353e257105af9b90fdbcca3a08445ae0c9b666c7bc6db26ab7303b5834c5bd ejson-1.2.1.tar.gz"
|