Update to 0.15.0, add auto-update, switch to source-build

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-01-25 20:54:27 +01:00
parent 6677e8d4c7
commit 0c127493ba
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
3 changed files with 57 additions and 37 deletions

View file

@ -1,14 +1,14 @@
pkgbase = reg pkgbase = reg
pkgdesc = Docker registry v2 command line client pkgdesc = Docker registry v2 command line client and repo listing generator with security checks
pkgver = 0.13.0 pkgver = 0.15.0
pkgrel = 1 pkgrel = 1
url = https://github.com/genuinetools/reg url = https://github.com/genuinetools/reg
arch = i686
arch = x86_64 arch = x86_64
license = MIT license = MIT
source = https://github.com/genuinetools/reg/releases/download/v0.13.0/reg-linux-amd64 makedepends = go
source = https://raw.githubusercontent.com/genuinetools/reg/master/LICENSE source = reg-0.15.0.tar.gz::https://github.com/genuinetools/reg/archive/v0.15.0.tar.gz
md5sums = 88b90e7d3d7ac99c880cf3c804440d15 sha512sums = 099d33931d8606c179d40fb8cd27f1990fc55bd245e0c25c6abbab3dcad7391c9b1f4b5ccfbe45b88f6bc68cfca4e1dbb545b70bccf8446ffa3ec9d02177f914
md5sums = 48ef0979a2bcc3fae14ff30b8a7f5dbf
pkgname = reg pkgname = reg

View file

@ -1,41 +1,27 @@
# Maintainer: Siôn le Roux <sinisterstuf@gmail.com> # Maintainer: Knut Ahlers <knut at ahlers dot me>
# Contributor: Siôn le Roux <sinisterstuf@gmail.com>
pkgname=reg pkgname=reg
_pkgname=reg-linux-amd64 pkgver=0.15.0
pkgver=0.13.0
pkgrel=1 pkgrel=1
pkgdesc="Docker registry v2 command line client" pkgdesc="Docker registry v2 command line client and repo listing generator with security checks"
arch=('x86_64') arch=('i686' 'x86_64')
url="https://github.com/genuinetools/${pkgname}" url="https://github.com/genuinetools/$pkgname"
license=('MIT') license=('MIT')
groups=() makedepends=(
depends=() 'go'
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=(
"https://github.com/genuinetools/${pkgname}/releases/download/v${pkgver}/${_pkgname}"
"https://raw.githubusercontent.com/genuinetools/${pkgname}/master/LICENSE"
)
md5sums=(
'88b90e7d3d7ac99c880cf3c804440d15'
'48ef0979a2bcc3fae14ff30b8a7f5dbf'
) )
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha512sums=('099d33931d8606c179d40fb8cd27f1990fc55bd245e0c25c6abbab3dcad7391c9b1f4b5ccfbe45b88f6bc68cfca4e1dbb545b70bccf8446ffa3ec9d02177f914')
build() { build() {
# make binary executable mkdir -p "${srcdir}/go/src/github.com/genuinetools"
chmod +x "${srcdir}/${_pkgname}" ln -sf "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/go/src/github.com/genuinetools/${pkgname}"
cd "${srcdir}/go/src/github.com/genuinetools/${pkgname}"
GOPATH="${srcdir}/go" make install
} }
package() { package() {
mkdir -p "${pkgdir}/usr/bin/" install -Dm755 "${srcdir}/go/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
cp "${srcdir}/${_pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
cp "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
} }
# vim:set ts=2 sw=2 et:

34
update_version.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
set -euxo pipefail
# Read pkg name
PKG=$(awk -F '=' '/pkgname=/{ print $2 }' PKGBUILD)
# Get latest version
VER=$(curl -sSfL "https://lv.luzifer.io/catalog-api/reg/latest.txt?p=version")
# Insert latest version into PKGBUILD
sed -i \
-e "s/^pkgver=.*/pkgver=${VER}/" \
PKGBUILD
# Check whether this changed anything
if (git diff --exit-code PKGBUILD); then
echo "Package ${PKG} has most recent version ${VER}"
exit 0
fi
# Reset pkgrel
sed -i \
-e 's/pkgrel=.*/pkgrel=1/' \
PKGBUILD
# Update source hashes
updpkgsums
# Update .SRCINFO
makepkg --printsrcinfo >.SRCINFO
# Commit changes
git add PKGBUILD .SRCINFO
git commit -m "${PKG} v${VER}"