aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ejson
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-08 04:02:11 -0300
committerAndy Postnikov <apostnikov@gmail.com>2019-05-09 03:54:48 +0300
commit536fa657b90f60a26edf4aca121138a10dda609f (patch)
tree132a71ad42c769051f542e5e826c25455484a88c /testing/ejson
parent87852a513b0c434fff0f6d365f37965d884a2d52 (diff)
downloadaports-536fa657b90f60a26edf4aca121138a10dda609f.tar.bz2
aports-536fa657b90f60a26edf4aca121138a10dda609f.tar.xz
testing/ejson: upgrade to 1.2.1
Diffstat (limited to 'testing/ejson')
-rw-r--r--testing/ejson/10-patch1.patch36
-rw-r--r--testing/ejson/APKBUILD47
2 files changed, 25 insertions, 58 deletions
diff --git a/testing/ejson/10-patch1.patch b/testing/ejson/10-patch1.patch
deleted file mode 100644
index baafd256de..0000000000
--- a/testing/ejson/10-patch1.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- ejson/cmd/ejson/main.go.orig 2017-04-06 19:25:23.711948831 +0000
-+++ ejson/cmd/ejson/main.go 2017-04-06 19:25:41.585791634 +0000
-@@ -4,33 +4,15 @@ import (
- "fmt"
- "os"
- "runtime"
-- "syscall"
-
- "github.com/codegangsta/cli"
- )
-
--func execManpage(sec, page string) {
-- if err := syscall.Exec("/usr/bin/env", []string{"/usr/bin/env", "man", sec, page}, os.Environ()); err != nil {
-- fmt.Println("Exec error:", err)
-- }
-- os.Exit(1)
--}
-
- func main() {
- // Encryption is expensive. We'd rather burn cycles on many cores than wait.
- runtime.GOMAXPROCS(runtime.NumCPU())
-
-- // Rather than using the built-in help printer, display the bundled manpages.
-- cli.HelpPrinter = func(templ string, data interface{}) {
-- if cmd, ok := data.(cli.Command); ok {
-- switch cmd.Name {
-- case "encrypt", "decrypt", "keygen":
-- execManpage("1", "ejson-"+cmd.Name)
-- }
-- }
-- execManpage("1", "ejson")
-- }
--
- app := cli.NewApp()
- app.Flags = []cli.Flag{
- cli.StringFlag{
diff --git a/testing/ejson/APKBUILD b/testing/ejson/APKBUILD
index 199a976e48..ca1c7aa16e 100644
--- a/testing/ejson/APKBUILD
+++ b/testing/ejson/APKBUILD
@@ -1,41 +1,44 @@
# Maintainer: Andy McLeod <andy@amcleod.ca>
pkgname=ejson
-pkgver=1.0.2
-pkgrel=1
+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=""
-depends_dev=""
-makedepends="$depends_dev go"
-subpackages=""
-source="$pkgname-$pkgver.tar.gz::https://github.com/Shopify/$pkgname/archive/$pkgver.tar.gz
- 10-patch1.patch
- "
+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" || return 1
- mv $builddir/Godeps/_workspace/src/github.com/* $srcdir/src/github.com
- mv $builddir/Godeps/_workspace/src/golang.org $srcdir/src
-
- default_prepare
+ mkdir -p "${builddir%/*}"
+ mv "$srcdir"/$pkgname-$pkgver "$builddir"
+ default_prepare
}
build() {
- cd "$builddir" || return 1
export GOPATH="$srcdir"
- CGO_ENABLED=0 go build -v -o e${pkgname} github.com/Shopify/ejson/cmd/ejson || return 1
+ 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() {
- cd "$builddir"
- install -Dm755 e${pkgname} \
- "$pkgdir"/usr/bin/ejson || return 1
+ 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="90d814abfc91d10974b1673538c2120a854737dd82b692074a22fdeeb0d4334bf94d4619484ed4f399ce89ba508de9a683415aa73987632896e64bd920e13588 ejson-1.0.2.tar.gz
-53aab34fceb0b546b7eb5296b668da592bf7c44d76e95aa10962a8dfd649f0090b8097d31f09055598e5c0f281a5dd90a87efe13c46f306921b2fa7fca01e4a1 10-patch1.patch"
+sha512sums="cd49e70b1578f0f960b6d6d77499297bcee7eac3b8595109757697ef844ba8867c353e257105af9b90fdbcca3a08445ae0c9b666c7bc6db26ab7303b5834c5bd ejson-1.2.1.tar.gz"