summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--LICENSE21
-rw-r--r--PKGBUILD68
4 files changed, 36 insertions, 74 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 03fe6c2ebd4c..ec25efb513d9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,13 @@
pkgbase = docker-ls
pkgdesc = Tools for browsing and manipulating docker registries
- pkgver = 0.3.2
+ pkgver = 0.5.1
pkgrel = 1
url = https://github.com/mayflower/docker-ls
- changelog = ChangeLog
arch = x86_64
license = MIT
- makedepends = fakeroot
- makedepends = git
- makedepends = gcc
makedepends = go
- options = strip
- options = !staticlibs
- options = !emptydirs
- source = https://github.com/mayflower/docker-ls/archive/v0.3.2.tar.gz
- source = LICENSE
- sha256sums = aa26657ca6271456ee9944ac4f18f25ff1593e7a85e7da6156c907681e342478
- sha256sums = 36f5440582577e61065f48b6fc26e2dd563ef2eb11a04255fed3bf47d138ca9e
+ depends = glibc
+ source = https://github.com/mayflower/docker-ls/archive/v0.5.1/docker-ls-0.5.1.tar.gz
+ sha256sums = 53e6bf3f7b24d37f1038e2ed7dedbf7608d314c93f60f325e6fe7ab3883c5881
pkgname = docker-ls
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..d13a8e2ac477
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.tar*
+*.log
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 6e34f46d2322..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Christian Speckner, Mayflower GmbH <christian.speckner@mayflower.de>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 9fffd72fc5dd..73bde2f4395a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,52 +1,40 @@
-# Maintainer: Lukas Zimmermann <luk.zim91 at gmail dot com>
-
+# Maintainer: ml <>
+# Contributor: Lukas Zimmermann <luk.zim91 at gmail dot com>
pkgname=docker-ls
-pkgver=0.3.2
+pkgver=0.5.1
pkgrel=1
pkgdesc='Tools for browsing and manipulating docker registries'
url='https://github.com/mayflower/docker-ls'
license=('MIT')
arch=('x86_64')
-makedepends=('fakeroot' 'git' 'gcc' 'go')
-options=('strip' '!staticlibs' '!emptydirs')
-changelog=ChangeLog
-
-source=("https://github.com/mayflower/${pkgname}/archive/v${pkgver}.tar.gz"
- 'LICENSE')
-sha256sums=('aa26657ca6271456ee9944ac4f18f25ff1593e7a85e7da6156c907681e342478'
- '36f5440582577e61065f48b6fc26e2dd563ef2eb11a04255fed3bf47d138ca9e')
-
-# Custom variables
-_os=linux
-_arch=amd64
-_release=release
+depends=('glibc')
+makedepends=('go')
+source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha256sums=('53e6bf3f7b24d37f1038e2ed7dedbf7608d314c93f60f325e6fe7ab3883c5881')
build() {
- # Regenerate GOPATH
- rm -rf "${srcdir}/go" && mkdir -p "${srcdir}/go"
-
- # Get all the dependencies for the command line tools
- cd "${srcdir}/${pkgname}-${pkgver}/cli/docker-ls"
- GOPATH="${srcdir}/go" go get -v -t -d
- cd "${srcdir}/${pkgname}-${pkgver}/cli/docker-rm"
- GOPATH="${srcdir}/go" go get -v -t -d
-
- # Test and build the necessary library
- cd "${srcdir}/${pkgname}-${pkgver}"
- rm -rf "${_release}" && mkdir -p "${_release}/${_os}_${_arch}"
- GOPATH="${srcdir}/go" go test github.com/mayflower/docker-ls/lib/...
- GOPATH="${srcdir}/go" go generate github.com/mayflower/docker-ls/lib/...
-
- # Build the executables for the AMD64 platform
- GOPATH="${srcdir}/go" CGO_ENABLED=0 GOOS="${_os}" GOARM=5 GOARCH="${_arch}" go build -o "${_release}/${_os}_${_arch}/docker-ls" github.com/mayflower/docker-ls/cli/docker-ls
- GOPATH="${srcdir}/go" CGO_ENABLED=0 GOOS="${_os}" GOARM=5 GOARCH="${_arch}" go build -o "${_release}/${_os}_${_arch}/docker-rm" github.com/mayflower/docker-ls/cli/docker-rm
+ cd "$pkgname-$pkgver"
+ export CGO_ENABLED=1
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS='-buildmode=pie -modcacherw -trimpath -ldflags=-linkmode=external'
+ go generate ./lib/version.go
+ go build -o . ./cli/docker-{ls,rm}
+
+ for i in docker-{ls,rm}; do
+ ./"$i" autocomplete bash >"$i".bash
+ ./"$i" autocomplete zsh >"$i".zsh
+ done
}
package() {
-
- install -D -m755 "${pkgname}-${pkgver}/${_release}/${_os}_${_arch}/docker-ls" "${pkgdir}/usr/bin/docker-ls"
- install -D -m755 "${pkgname}-${pkgver}/${_release}/${_os}_${_arch}/docker-rm" "${pkgdir}/usr/bin/docker-rm"
- install -D -m644 "${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "$pkgname-$pkgver"
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
+ for i in docker-{ls,rm}; do
+ install -Dm755 "$i" -t "$pkgdir"/usr/bin
+ install -Dm644 "$i".bash "$pkgdir"/usr/share/bash-completion/completions/"$i"
+ install -Dm644 "$i".zsh "$pkgdir"/usr/share/zsh/site-functions/_"$i"
+ done
}
-
-# vim:set ts=4 sw=4 et: