summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Fanninger2016-05-27 20:20:31 +0200
committerThomas Fanninger2016-05-27 20:20:31 +0200
commit03357c7ed43b2e562463dc4f1d1593d9cf0c9fb7 (patch)
tree7f915e5d12c670ae831cf3fd0d1d5253ee6f9007
parent626db9ab94695d97c88441c73dd782adde0396da (diff)
downloadaur-03357c7ed43b2e562463dc4f1d1593d9cf0c9fb7.tar.gz
Change build system to Glide
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD24
-rw-r--r--README.md6
-rw-r--r--helper.sh90
4 files changed, 17 insertions, 114 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 77f32e73b144..7e2e1ded30b4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu May 26 08:21:18 UTC 2016
+# Fri May 27 18:20:17 UTC 2016
pkgbase = gogs-git
pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch master.
pkgver = 3879.3c0c7a9
- pkgrel = 2
+ pkgrel = 3
epoch = 1
url = http://gogs.io/
install = gogs.install
@@ -23,6 +23,7 @@ pkgbase = gogs-git
optdepends = memcached: MemCached support
optdepends = openssh: GIT over SSH support
optdepends = tidb-git: TiDB support
+ provides = gogs
conflicts = gogs-bin
conflicts = gogs
conflicts = gogs-git
@@ -31,12 +32,14 @@ pkgbase = gogs-git
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#branch=master
sha512sums = db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66
sha512sums = 43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d
- sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
sha512sums = SKIP
+ makedepends_i686 = glide-bin
+ makedepends_x86_64 = glide-bin
+ makedepends_armv6h = glide-git
+ makedepends_armv7h = glide-git
pkgname = gogs-git
diff --git a/PKGBUILD b/PKGBUILD
index ff10e9916985..73731f8d53c1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,12 +5,13 @@ pkgname=gogs-git
_pkgname=gogs
_branch=master
pkgver=3879.3c0c7a9
-pkgrel=2
+pkgrel=3
epoch=1
pkgdesc="Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch ${_branch}."
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'
@@ -20,6 +21,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' 'gogs-git')
options=('!strip' '!emptydirs')
backup=('srv/gogs/conf/app.ini')
@@ -29,12 +34,10 @@ install=gogs.install
_gourl=github.com/gogits/$_pkgname
source=('gogs.service.patch'
'app.ini.patch'
- 'helper.sh'
"$_pkgname::git+https://${_gourl}.git#branch=${_branch}")
sha512sums=(db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66
43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d
- e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
'SKIP')
_goroot="/usr/lib/go"
@@ -45,8 +48,6 @@ pkgver(){
}
prepare() {
- source $srcdir/helper.sh
-
export GOROOT=/usr/lib/go
msg2 "Prepare GO build enviroment"
@@ -73,15 +74,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/macaron-contrib/oauth2 "$GOPATH/src/github.com/macaron-contrib/oauth2"
-
- msg2 "Workaround dependencies"
- cd "$GOPATH/src/github.com/gogits/go-gogs-client/"
- git checkout -q master
+ # 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 77e46c944e9e..93b05423e159 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,6 @@
PKGBUILD files for different versions of Gogs (Go Git Service).
## Open points
-* ~~Systemd service support~~
-* ~~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~~
-* Documentation for usage and configuration - Started with Archlinux Wiki page https://wiki.archlinux.org/index.php/Gogs
## Install
```
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