Commit 01a8e16b authored by Michał Polański's avatar Michał Polański Committed by Leo
Browse files

testing/sos: use Go modules

parent 7379d902
......@@ -2,39 +2,30 @@
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=sos
pkgver=0.8
pkgrel=2
pkgrel=3
pkgdesc="Simple Object Storage"
url="https://github.com/skx/sos"
arch="all !mips !mips64" # blocked by dep
arch="all !mips !mips64" # limited by go
license="GPL-2.0"
options="!check" # has no check
makedepends="go dep"
options="!check chmod-clean" # has no check
makedepends="go"
source="sos-$pkgver.tar.gz::https://github.com/skx/sos/archive/release-$pkgver.tar.gz
Gopkg.lock
Gopkg.toml
use-go-modules.patch
"
builddir="$srcdir/src/github.com/skx/$pkgname"
builddir="$srcdir/sos-release-$pkgver"
prepare() {
mkdir -p ${builddir%/*}
mv "$srcdir"/$pkgname-release-$pkgver "$builddir"/
cd "$builddir"
cp $srcdir/Gopkg.* "$builddir"/
GOPATH="$srcdir" dep ensure
default_prepare
}
export GOPATH="$srcdir"
build() {
cd "$builddir"
GOPATH="$srcdir" go build -v -x -ldflags="-X main.version=$pkgver" \
go build -v \
-trimpath \
-ldflags="-s -w -X main.version=$pkgver" \
-o ./bin/sos
}
package() {
cd "$builddir"
install -Dm755 bin/sos "$pkgdir"/usr/bin/sos
}
sha512sums="c2b69ec5d945725a4d3ae765622c97a3f5dfecf0550309593e33b68b842855746711f74254d8a70e0754ee66a6dd7a279f5ac414274697086e086ba78d2b9c83 sos-0.8.tar.gz
ab3cf64fb1c39aee91873b95e12daeecd8b8017c3524182289cc7eafa38b05c6e428e10f12da27abab2e0b25040a57ee9c2caa85f7dfa6584f6d899c74118965 Gopkg.lock
881455b622e905d00e11b8d888b565900c4de5377360fd6982e88b8833548b42480e9447f22da428ecb2c95784e624db376e08c163577c8996c5f43e6aa22aae Gopkg.toml"
c3389ac657de9873844e041b394f1b3432e855c15e85d41f61a1ba5c9b91f1c7a459c9ad2af49e1dd21fa98dec9266cba38c4100594338bdbf9e801e5c5a0367 use-go-modules.patch"
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:5abd6a22805b1919f6a6bca0ae58b13cef1f3412812f38569978f43ef02743d4"
name = "github.com/go-ini/ini"
packages = ["."]
pruneopts = "UT"
revision = "5cf292cae48347c2490ac1a58fe36735fb78df7e"
version = "v1.38.2"
[[projects]]
branch = "master"
digest = "1:b264547c40314ec7619d2cf264e2621953843be7242c140efe1e3119f93877f4"
name = "github.com/google/subcommands"
packages = ["."]
pruneopts = "UT"
revision = "5bae204cdfb2d92dcc333d56014bae6a2f6c58b1"
[[projects]]
digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1"
name = "github.com/gorilla/context"
packages = ["."]
pruneopts = "UT"
revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
version = "v1.1.1"
[[projects]]
digest = "1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f"
name = "github.com/gorilla/mux"
packages = ["."]
pruneopts = "UT"
revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf"
version = "v1.6.2"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/go-ini/ini",
"github.com/google/subcommands",
"github.com/gorilla/mux",
]
solver-name = "gps-cdcl"
solver-version = 1
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[[constraint]]
name = "github.com/go-ini/ini"
version = "1.38.2"
[[constraint]]
branch = "master"
name = "github.com/google/subcommands"
[[constraint]]
name = "github.com/gorilla/mux"
version = "1.6.2"
[prune]
go-tests = true
unused-packages = true
From a8e5f75cc299aee387345342f9643fde1e9c4329 Mon Sep 17 00:00:00 2001
From: Steve Kemp <steve.kemp@supermetrics.com>
Date: Fri, 29 Mar 2019 14:48:32 +0200
Subject: [PATCH] Added go module files
---
go.mod | 11 +++++++++++
go.sum | 16 ++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 go.mod
create mode 100644 go.sum
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..d717b65
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,11 @@
+module github.com/skx/sos
+
+go 1.12
+
+require (
+ github.com/go-ini/ini v1.42.0
+ github.com/google/subcommands v1.0.1
+ github.com/gorilla/mux v1.7.0
+ github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff // indirect
+ gopkg.in/ini.v1 v1.42.0 // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..4d0d4ab
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,16 @@
+github.com/go-ini/ini v1.42.0 h1:TWr1wGj35+UiWHlBA8er89seFXxzwFn11spilrrj+38=
+github.com/go-ini/ini v1.42.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
+github.com/google/subcommands v1.0.1 h1:/eqq+otEXm5vhfBrbREPCSVQbvofip6kIz+mX5TUH7k=
+github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/mux v1.7.0 h1:tOSd0UKHQd6urX6ApfOn4XdBMY6Sh1MfxV3kmaazO+U=
+github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff h1:86HlEv0yBCry9syNuylzqznKXDK11p6D0DT596yNMys=
+github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff/go.mod h1:KSQcGKpxUMHk3nbYzs/tIBAM2iDooCn0BmttHOJEbLs=
+gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk=
+gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment