From 9808ca41594aaecea443a668742d812bf7a11f6e Mon Sep 17 00:00:00 2001 From: Pulux Date: Wed, 10 Jan 2018 19:16:09 +0100 Subject: [PATCH] gogs: update to 0.11.34 Closes: #10664 [via git-merge-pr] --- srcpkgs/gogs/files/gopm-lite | 134 ----------------------------------- srcpkgs/gogs/template | 16 ++--- 2 files changed, 8 insertions(+), 142 deletions(-) delete mode 100755 srcpkgs/gogs/files/gopm-lite diff --git a/srcpkgs/gogs/files/gopm-lite b/srcpkgs/gogs/files/gopm-lite deleted file mode 100755 index 0a9428b3e70..00000000000 --- a/srcpkgs/gogs/files/gopm-lite +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh - -# gopm-lite -# a shell script to download, extract, and link -# dependencies from a .gopmfile -# requirements: curl, coreutils - -# Needed environment variables: -# GOPATH - packages will be linked to $GOPATH/src/ -# GOPMSTORE - where to store downloaded packages - -# Optional environment variables -# MAXDEPTH - Maximum amount of attempts to recurse -# and download all packages -# Defaults to 5 - -# Needed arguments: -# 1 - path to a .gopmfile - -if [ -z "$GOPATH" -o -z "$GOPMSTORE" ]; then - printf 'Need the following environment variables defined:\n' - printf 'GOPATH\n' - printf 'GOPMSTORE\n' - exit 1 -fi -if [ -z "$1" ]; then - printf 'Usage: %s /path/to/.gopmfile\n' "$0" - exit 1 -fi - -if [ -z "$MAXDEPTH" ]; then - MAXDEPTH=5 -fi - -export MAXDEPTH -export GOPATH -export GOPMSTORE - -mkdir -p "${GOPATH}/src" -mkdir -p "${GOPMSTORE}/archives" -mkdir -p "${GOPMSTORE}/repos" - -indeps="" -curdepth=0 - -download_and_link() { - local gopmfile=$1 - local extracted_counter=0 - printf 'Downloading deps for %s\n' "$gopmfile" 1>&2 - while read line; do - if [ "$line" = "[deps]" ]; then - indeps="deps" - continue - fi - if [ -z "$line" -a -n "$indeps" ]; then - break; - fi - if [ -z "$indeps" ]; then - continue; - fi - - host="" - user="" - package="" - tagish="" - - url=$(printf '%s' "$line" | cut -f1 -d'=' | sed 's/ //g'); - version=$(printf '%s' "$line" | cut -f2 -d'=' | sed 's/ //g'); - - host=$(printf '%s' "$url" | cut -f1 -d'/') - user=$(printf '%s' "$url" | cut -f2 -d'/') - package=$(printf '%s' "$url" | cut -f3 -d'/') - - if [ -z "$package" ]; then - package="${user}" - fi - - - if [ "$host" = "gopkg.in" ]; then - host="github.com" - if [ "$user" = "$package" ]; then - package=$(printf '%s' "$package" | cut -f1 -d'.') - user="go-$package" - else - package=$(printf '%s' "$package" | cut -f1 -d'.') - fi - - fi - if [ "$host" = "golang.org" ]; then - host="github.com" - user="golang" - fi - - if [ -n "$version" ]; then - tagish=$(printf '%s' "$version" | cut -f2 -d':') - else - tagish="master" - fi - - if [ ! -e "$GOPMSTORE/archives/$host-$user-$package-$tagish.tar.gz" ]; then - curl --silent -R -L -o "$GOPMSTORE/archives/$host-$user-$package-$tagish.tar.gz" "https://$host/$user/$package/archive/$tagish.tar.gz" - fi - if [ ! -e "$GOPMSTORE/repos/$url.$tagish" ]; then - mkdir -p "$GOPMSTORE/repos/$url.$tagish" - tar xf "$GOPMSTORE/archives/$host-$user-$package-$tagish.tar.gz" -C "$GOPMSTORE/repos/$url.$tagish" --strip-components=1 - fi - - if [ ! -e "$GOPATH/src/$url" ]; then - mkdir -p "$GOPATH/src/$url" - rmdir "$GOPATH/src/$url" - ln -s "$GOPMSTORE/repos/$url.$tagish" "$GOPATH/src/$url" - extracted_counter=$((extracted_counter+1)) - fi - - done <"$gopmfile" - printf '%s' "$extracted_counter" -} - -packages_processed=$(download_and_link $1) -printf 'Done with %s packages\n' "$packages_processed" 1>&2 -curdepth=1 - -export -f download_and_link - -while [ ! "$packages_processed" = "0" ]; do - if [ "$curdepth" = "$MAXDEPTH" ]; then - break - fi - packages_processed=$(find -L "$GOPATH/src" -name '.gopmfile' -exec bash -c 'download_and_link "$0"' {} \; | awk '{s+=$1} END {print s}') - curdepth=$((curdepth+1)) - printf 'Done with %s packages\n' "$packages_processed" 1>&2 -done - -exit 0 diff --git a/srcpkgs/gogs/template b/srcpkgs/gogs/template index 42193a37ca5..2ef953bcbdb 100644 --- a/srcpkgs/gogs/template +++ b/srcpkgs/gogs/template @@ -1,7 +1,7 @@ # Template build file for 'gogs' pkgname=gogs -version=0.11.29 -revision=3 +version=0.11.34 +revision=1 build_style=go go_import_path="github.com/gogits/gogs" short_desc="Self-hosted Git Service in Go" @@ -10,7 +10,7 @@ license="MIT" homepage="http://gogs.io" depends="git" distfiles="https://github.com/gogits/gogs/archive/v${version}.tar.gz" -checksum=3da2799e85d78ae36bc78725b4f19d409d45949831bb9aa306af43e851b89b13 +checksum=cc6b51cc53b6effed44c37ac7086af5822e2ceff9e2589316782e6c7b28a445f hostmakedepends="git-perl curl" conf_files="/etc/gogs.ini" @@ -20,24 +20,24 @@ gogs_shell="/bin/bash" export CGO_ENABLED=1 -broken=https://build.voidlinux.eu/builders/i686_builder/builds/4423/steps/shell_3/logs/stdio post_extract() { mkdir tmp mkdir -p $GOPATH/src/github.com/gogits ln -s $PWD $GOPATH/src/github.com/gogits/${pkgname} - TMPDIR=${PWD}/tmp/ GOPMSTORE=${PWD}/tmp/gopm ${FILESDIR}/gopm-lite .gopmfile 1>/dev/null 2>/dev/null - TMPDIR=${PWD}/tmp/ go get -d -tags "sqlite redis memcache" "github.com/gogits/gogs" + cd "$GOPATH/src/github.com/gogits/gogs" + TMPDIR=${PWD}/tmp/ GOPATH=$GOPATH go get -d -tags "sqlite redis memcache" "github.com/gogits/gogs" } do_build() { - TMPDIR=${PWD}/tmp/ GOOS=linux go build -tags "sqlite redis memcache" + cd "$GOPATH/src/github.com/gogits/gogs" + TMPDIR=${PWD}/tmp/ GOOS=linux GOPATH=$GOPATH go build -tags "sqlite redis memcache" rm -rf tmp } do_install() { cd "$GOPATH/src/github.com/gogits/gogs" - vbin gogs-${version} gogs + vbin gogs gogs install -d "$DESTDIR/usr/share/themes/gogs/default" cp -r public "$DESTDIR/usr/share/themes/gogs/default/" cp -r templates "$DESTDIR/usr/share/themes/gogs/default/"