mirror of
https://github.com/luzifer-aur/reg.git
synced 2024-11-12 15:32:46 +00:00
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:
parent
6677e8d4c7
commit
0c127493ba
3 changed files with 57 additions and 37 deletions
12
.SRCINFO
12
.SRCINFO
|
@ -1,14 +1,14 @@
|
|||
pkgbase = reg
|
||||
pkgdesc = Docker registry v2 command line client
|
||||
pkgver = 0.13.0
|
||||
pkgdesc = Docker registry v2 command line client and repo listing generator with security checks
|
||||
pkgver = 0.15.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/genuinetools/reg
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
source = https://github.com/genuinetools/reg/releases/download/v0.13.0/reg-linux-amd64
|
||||
source = https://raw.githubusercontent.com/genuinetools/reg/master/LICENSE
|
||||
md5sums = 88b90e7d3d7ac99c880cf3c804440d15
|
||||
md5sums = 48ef0979a2bcc3fae14ff30b8a7f5dbf
|
||||
makedepends = go
|
||||
source = reg-0.15.0.tar.gz::https://github.com/genuinetools/reg/archive/v0.15.0.tar.gz
|
||||
sha512sums = 099d33931d8606c179d40fb8cd27f1990fc55bd245e0c25c6abbab3dcad7391c9b1f4b5ccfbe45b88f6bc68cfca4e1dbb545b70bccf8446ffa3ec9d02177f914
|
||||
|
||||
pkgname = reg
|
||||
|
||||
|
|
48
PKGBUILD
48
PKGBUILD
|
@ -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-linux-amd64
|
||||
pkgver=0.13.0
|
||||
pkgver=0.15.0
|
||||
pkgrel=1
|
||||
pkgdesc="Docker registry v2 command line client"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/genuinetools/${pkgname}"
|
||||
pkgdesc="Docker registry v2 command line client and repo listing generator with security checks"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://github.com/genuinetools/$pkgname"
|
||||
license=('MIT')
|
||||
groups=()
|
||||
depends=()
|
||||
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'
|
||||
makedepends=(
|
||||
'go'
|
||||
)
|
||||
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
|
||||
sha512sums=('099d33931d8606c179d40fb8cd27f1990fc55bd245e0c25c6abbab3dcad7391c9b1f4b5ccfbe45b88f6bc68cfca4e1dbb545b70bccf8446ffa3ec9d02177f914')
|
||||
|
||||
build() {
|
||||
# make binary executable
|
||||
chmod +x "${srcdir}/${_pkgname}"
|
||||
mkdir -p "${srcdir}/go/src/github.com/genuinetools"
|
||||
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() {
|
||||
mkdir -p "${pkgdir}/usr/bin/"
|
||||
cp "${srcdir}/${_pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
cp "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -Dm755 "${srcdir}/go/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
34
update_version.sh
Executable file
34
update_version.sh
Executable 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}"
|
Loading…
Reference in a new issue