summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Fanninger2016-05-26 20:06:04 +0200
committerThomas Fanninger2016-05-26 20:06:04 +0200
commite7767930ab8f086d78b83a2695bb60e537f49656 (patch)
treed90cdca45328d0cdd843c1be209839ae622f67c9
parent1fb896bec6d55d5a736639d62ebd8ae7edce7e59 (diff)
downloadaur-e7767930ab8f086d78b83a2695bb60e537f49656.tar.gz
Change build system to Glide
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD22
-rw-r--r--README.md9
-rw-r--r--helper.sh90
4 files changed, 10 insertions, 118 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dd6dd2e0bf1f..4389cc9287a6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu May 26 08:30:33 UTC 2016
+# Thu May 26 18:05:46 UTC 2016
pkgbase = gogs-git-dev
pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch develop.
pkgver = 3879.3c0c7a9
- pkgrel = 2
+ pkgrel = 3
epoch = 1
url = http://gogs.io/
install = gogs.install
@@ -16,6 +16,7 @@ pkgbase = gogs-git-dev
makedepends = git>=1.7.1
makedepends = patch
depends = git>=1.7.1
+ depends = glide
optdepends = sqlite: SQLite support
optdepends = mariadb: MariaDB support
optdepends = postgresql: PostgreSQL support
@@ -31,11 +32,9 @@ pkgbase = gogs-git-dev
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=develop
sha512sums = db36fd44c29de387b066e52a71a61214aa876a27574eb054ec9517a175b5a47db9a7de01be2dd635023a11d5e1224772a66accc4b63b6936f7c58e6314555a66
sha512sums = 43c8971b0b4e8ea8d5aa0ed15610e9737605dc46a626d3d578bb1c97c9f90912966f59b452e9f4ea7974e4e3beaa5dd40bc597b03319afed3358432ab6e59c7d
- sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
sha512sums = SKIP
pkgname = gogs-git-dev
diff --git a/PKGBUILD b/PKGBUILD
index 769c72a5514d..36cfe750bf8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,13 +5,14 @@ pkgname=gogs-git-dev
_pkgname=gogs
_branch=develop
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')
-depends=('git>=1.7.1')
+depends=('git>=1.7.1'
+ 'glide')
optdepends=('sqlite: SQLite support'
'mariadb: MariaDB support'
'postgresql: PostgreSQL support'
@@ -29,12 +30,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 +44,6 @@ pkgver(){
}
prepare() {
- source $srcdir/helper.sh
-
export GOROOT=/usr/lib/go
msg2 "Prepare GO build enviroment"
@@ -73,15 +70,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 ce120fcbb284..71030be05689 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +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 support
- * PostgreSQL support
-* ~~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
-* ~~Read dependencies out of ".gopmfile"~~
## 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