diff options
author | Thomas Fanninger | 2016-05-27 20:46:32 +0200 |
---|---|---|
committer | Thomas Fanninger | 2016-05-27 20:46:32 +0200 |
commit | cfc2c1b07274cd118bd7f6e202ad8e931a53d2cd (patch) | |
tree | b5543f283d8e6a6634a9f5a332be0bdfb4d018dd | |
parent | 25aff591015e46328d227140a7fe412f75d0d5d7 (diff) | |
download | aur-cfc2c1b07274cd118bd7f6e202ad8e931a53d2cd.tar.gz |
Change build system to Glide
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | helper.sh | 90 |
4 files changed, 18 insertions, 107 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sat Mar 19 21:05:14 UTC 2016 +# Fri May 27 18:46:21 UTC 2016 pkgbase = gogs pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. pkgver = 0.9.13 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = http://gogs.io/ install = gogs.install @@ -23,6 +23,7 @@ pkgbase = gogs optdepends = memcached: MemCached support optdepends = openssh: GIT over SSH support optdepends = tidb-git: TiDB support + provides = gogs conflicts = gogs-bin conflicts = gogs-git conflicts = gogs-git-dev @@ -31,12 +32,14 @@ pkgbase = gogs backup = srv/gogs/conf/app.ini source = gogs.service.patch source = app.ini.patch - source = helper.sh source = gogs::git+https://github.com/gogits/gogs.git#tag=v0.9.13 sha512sums = 834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44 sha512sums = 77589148ac4afe09bb1b3f70491fa3b1838299f02216b2a24598f0f468356b2cfbaae397cc693e93f406e1c537d5ae24bc51530d9826879d201b72b19bee376c - sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d sha512sums = SKIP + makedepends_i686 = glide-bin + makedepends_x86_64 = glide-bin + makedepends_armv6h = glide-git + makedepends_armv7h = glide-git pkgname = gogs @@ -4,12 +4,13 @@ pkgname=gogs _pkgname=${pkgname} pkgver=0.9.13 -pkgrel=1 +pkgrel=2 epoch=1 pkgdesc="Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language." arch=('i686' 'x86_64' 'armv6h' 'armv7h') url="http://gogs.io/" license=('MIT') +provides=('gogs') depends=('git>=1.7.1') optdepends=('sqlite: SQLite support' 'mariadb: MariaDB support' @@ -19,6 +20,10 @@ optdepends=('sqlite: SQLite support' 'openssh: GIT over SSH support' 'tidb-git: TiDB support') makedepends=('go>=1.4' 'git>=1.7.1' 'patch') +makedepends_i686=('glide-bin') +makedepends_x86_64=('glide-bin') +makedepends_armv6h=('glide-git') +makedepends_armv7h=('glide-git') conflicts=('gogs-bin' 'gogs-git' 'gogs-git-dev') options=('!strip' '!emptydirs') backup=('srv/gogs/conf/app.ini') @@ -28,19 +33,15 @@ install=gogs.install _gourl=github.com/gogits/$_pkgname source=('gogs.service.patch' 'app.ini.patch' - 'helper.sh' "$_pkgname::git+https://${_gourl}.git#tag=v${pkgver}") sha512sums=(834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44 77589148ac4afe09bb1b3f70491fa3b1838299f02216b2a24598f0f468356b2cfbaae397cc693e93f406e1c537d5ae24bc51530d9826879d201b72b19bee376c - e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d 'SKIP') _goroot="/usr/lib/go" prepare() { - source $srcdir/helper.sh - export GOROOT=/usr/lib/go msg2 "Prepare GO build enviroment" @@ -67,13 +68,10 @@ prepare() { mv "$srcdir/$_pkgname" $GOPATH/src/${_gourl} - msg2 "Check and download dependencies from .gopmfile" - get_gopm "$GOPATH/src/${_gourl}/.gopmfile" "$GOPATH/src" - -# msg2 "Download missing dependencies" -# go_get github.com/go-xorm/tidb "$GOPATH/src/github.com/go-xorm/tidb" -# go_get github.com/ngaut/log "$GOPATH/src/github.com/ngaut/log" -# go_get github.com/pingcap/tidb "$GOPATH/src/github.com/pingcap/tidb" + # Glide + msg2 "Download dependencies via Glide" + cd $GOPATH/src/${_gourl} + glide install # Execute patch msg2 "Execute patches" diff --git a/README.md b/README.md index 0e1bfba4d5ad..229f35e9c4e4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ PKGBUILD files for different versions of Gogs (Go Git Service). ## Open points * ~~Systemd service support~~ -* better file structure +* ~~better file structure~~ * ~~Publishing on https://aur.archlinux.org~~ * Test MariaDB and PostgreSQL installation * ~~Test on armv6h (Raspberry Pi), armv7h (Cubieboard 2) and on x86_64~~ diff --git a/helper.sh b/helper.sh deleted file mode 100644 index fd8bea0426be..000000000000 --- a/helper.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -# $1 = package name -# $2 = target directory path -# $3 = branch/commit/revision string, if empty then maste ist used -function go_get { - if [[ $1 == github.com* ]] - then - get_git $1 $2 $3 - elif [[ $1 == code.google.com* ]] - then - get_hg $1 $2 $3 - elif [[ $1 == golang.org* ]] - then - get_golang $1 $2 $3 - else - go get $1 - fi -} - -# $1 = git package -# $2 = target directory path -# $3 = branch/commit/revision string, if empty then maste ist used -function get_git { - git clone https://$1 $2 - if [[ $3 != "master" ]] && [[ ${3:0} == commit* ]] - then - cd $2 - git checkout -q ${3:7} - elif [[ $3 != "master" ]] && [[ ${3:0} == tag* ]] - then - cd $2 - git checkout -q tags/${3:4} - else - cd $2 - git checkout -q ${3:7} - fi -} - -# $1 = mercury package name -# $2 = target directory path -# $3 = branch/commit/revision string, if empty then maste ist used -function get_hg { - if [[ $3 == "master" ]] || [[ $3 == "" ]] - then - hg clone https://$1 $2 - else - hg clone https://$1 -r $3 $2 - fi -} - -function get_golang { - local package=$1 - local match="golang.org/x" - local replace="github.com/golang" - local result="" - - result=${package/$match/$replace} - - get_git $result $2 $3 -} - -# Read the .gopmfile file and clone the branch/commits of the depends -# $1 = .gopmfile file path -# $2 = target directory path -function get_gopm { - local startStr="" - local revStr="" - - while read line - do - if [[ $startStr == 'X' ]] && [[ $line == '' ]] - then - break - elif [[ $startStr == 'X' ]] - then - IFS="=" read -a array <<< "$line" - if [[ ${array[1]} != "" ]] - then - local revStr=${array[1]//\`} - go_get ${array[0]} "$2/${array[0]}" $revStr - else - go_get ${array[0]} "$2/${array[0]}" master - fi - elif [[ $line == '[deps]' ]] - then - local startStr="X" - fi - done <$1 -}
\ No newline at end of file |