summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Fanninger2015-11-21 10:49:25 +0100
committerThomas Fanninger2015-11-21 10:49:25 +0100
commit6c036b29692007fb3ce81424024088a11ee1447b (patch)
tree4cfac1ea2b0122295d35d1f7472bbacc28d33f61
parent71bbaa62061cb4d8a095201d1b9a4bdb6aceb36a (diff)
downloadaur-6c036b29692007fb3ce81424024088a11ee1447b.tar.gz
new package version
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD15
-rw-r--r--gogs.service14
-rw-r--r--gogs.service.patch14
-rw-r--r--gogs_new.service20
-rw-r--r--gogs_old.service20
-rw-r--r--helper.sh22
8 files changed, 77 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8c53ee985fcb..8c570309b6a0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
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 = 3076.951037c
+ pkgver = 3135.6a6a751
pkgrel = 1
epoch = 1
url = http://gogs.io/
@@ -10,7 +10,7 @@ pkgbase = gogs-git
arch = armv6h
arch = armv7h
license = MIT
- makedepends = go>=1.2
+ makedepends = go>=1.3
makedepends = git>=1.7.1
makedepends = patch
depends = git>=1.7.1
@@ -27,13 +27,13 @@ pkgbase = gogs-git
options = !strip
options = !emptydirs
backup = srv/gogs/conf/app.ini
- source = gogs.service
+ source = gogs.service.patch
source = app.ini.patch
source = helper.sh
source = gogs::git+https://github.com/gogits/gogs.git#branch=master
- sha512sums = c7abbe4af438a8a1db44537a16dbd40b82d50c921d53002c083071c4cd16644769e9d5dabbccedc1bd4ba563324186da4b4378365e098cc45df76402a657be90
+ sha512sums = 834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
sha512sums = d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39
- sha512sums = 5dde38b286b2a27624e4c2f5c87c7eb279c6c5fc71dad818762b7100a8d20d5b16c14695624107e21b361ab662b90e769717325ba5f276067aa1ead38ae44e47
+ sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
sha512sums = SKIP
pkgname = gogs-git
diff --git a/.gitignore b/.gitignore
index 2ace2812281c..b0b42a850abe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,9 @@
!app_old.ini
!gogs.changelog
!gogs.install
-!gogs.service
+!gogs.service.patch
+!gogs_new.service
+!gogs_old.service
!helper.sh
!PKGBUILD
!README.md
diff --git a/PKGBUILD b/PKGBUILD
index 381c33d238ae..a6aba43a24b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=gogs-git
_pkgname=gogs
_branch=master
-pkgver=3076.951037c
+pkgver=3135.6a6a751
pkgrel=1
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}."
@@ -19,7 +19,7 @@ optdepends=('sqlite: SQLite support'
'memcached: MemCached support'
'openssh: GIT over SSH support'
'tidb-git: TiDB support')
-makedepends=('go>=1.2' 'git>=1.7.1' 'patch')
+makedepends=('go>=1.3' 'git>=1.7.1' 'patch')
conflicts=('gogs-bin' 'gogs' 'gogs-git')
options=('!strip' '!emptydirs')
backup=('srv/gogs/conf/app.ini')
@@ -27,14 +27,14 @@ backup=('srv/gogs/conf/app.ini')
install=gogs.install
_gourl=github.com/gogits/$_pkgname
-source=('gogs.service'
+source=('gogs.service.patch'
'app.ini.patch'
'helper.sh'
"$_pkgname::git+https://${_gourl}.git#branch=${_branch}")
-sha512sums=(c7abbe4af438a8a1db44537a16dbd40b82d50c921d53002c083071c4cd16644769e9d5dabbccedc1bd4ba563324186da4b4378365e098cc45df76402a657be90
+sha512sums=(834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39
- 5dde38b286b2a27624e4c2f5c87c7eb279c6c5fc71dad818762b7100a8d20d5b16c14695624107e21b361ab662b90e769717325ba5f276067aa1ead38ae44e47
+ e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
'SKIP')
_goroot="/usr/lib/go"
@@ -76,7 +76,7 @@ prepare() {
msg2 "Check and download dependencies from .gopmfile"
get_gopm "$GOPATH/src/${_gourl}/.gopmfile" "$GOPATH/src"
- msg2 "Download missing dependencies"
+# msg2 "Download missing dependencies"
# go_get github.com/macaron-contrib/oauth2 "$GOPATH/src/github.com/macaron-contrib/oauth2"
msg2 "Workaround dependencies"
@@ -86,6 +86,7 @@ prepare() {
# Execute patch
msg2 "Execute patches"
patch -Np1 -i "$srcdir/app.ini.patch" "$GOPATH/src/${_gourl}/conf/app.ini"
+ patch -Np1 -i "$srcdir/gogs.service.patch" "$GOPATH/src/${_gourl}/scripts/systemd/gogs.service"
}
build() {
@@ -105,6 +106,6 @@ package() {
cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/themes/gogs/default"
install -Dm0644 "$pkgdir/usr/share/$_pkgname/conf/app.ini" "$pkgdir/srv/$_pkgname/conf/app.ini"
- install -Dm0644 "$srcdir/gogs.service" "$pkgdir/usr/lib/systemd/system/gogs.service"
+ install -Dm0644 "$srcdir/build/src/${_gourl}/scripts/systemd/gogs.service" "$pkgdir/usr/lib/systemd/system/gogs.service"
install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
}
diff --git a/gogs.service b/gogs.service
deleted file mode 100644
index 6c6e846e04f3..000000000000
--- a/gogs.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Gogs (Go Git Service) server
-After=syslog.target
-After=network.target
-
-[Service]
-Type=simple
-User=gogs
-Group=gogs
-ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
-WorkingDirectory=/srv/gogs/
-
-[Install]
-WantedBy=multi-user.target
diff --git a/gogs.service.patch b/gogs.service.patch
new file mode 100644
index 000000000000..519d02c19a48
--- /dev/null
+++ b/gogs.service.patch
@@ -0,0 +1,14 @@
+12,15c12,15
+< User=git
+< Group=git
+< WorkingDirectory=/home/git/gogs
+< ExecStart=/home/git/gogs/gogs web
+---
+> User=gogs
+> Group=gogs
+> WorkingDirectory=/srv/gogs/
+> ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
+17c17
+< Environment=USER=git HOME=/home/git
+---
+> Environment=USER=gogs HOME=/home/gogs
diff --git a/gogs_new.service b/gogs_new.service
new file mode 100644
index 000000000000..574d74973a45
--- /dev/null
+++ b/gogs_new.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Gogs (Go Git Service)
+After=syslog.target
+After=network.target
+#After=mysqld.service
+#After=postgresql.service
+#After=memcached.service
+#After=redis.service
+
+[Service]
+Type=simple
+User=gogs
+Group=gogs
+WorkingDirectory=/srv/gogs/
+ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
+Restart=always
+Environment=USER=gogs HOME=/home/gogs
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/gogs_old.service b/gogs_old.service
new file mode 100644
index 000000000000..3d375b945b9f
--- /dev/null
+++ b/gogs_old.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Gogs (Go Git Service)
+After=syslog.target
+After=network.target
+#After=mysqld.service
+#After=postgresql.service
+#After=memcached.service
+#After=redis.service
+
+[Service]
+Type=simple
+User=git
+Group=git
+WorkingDirectory=/home/git/gogs
+ExecStart=/home/git/gogs/gogs web
+Restart=always
+Environment=USER=git HOME=/home/git
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/helper.sh b/helper.sh
index 18425b5bb086..fd8bea0426be 100644
--- a/helper.sh
+++ b/helper.sh
@@ -50,22 +50,14 @@ function get_hg {
}
function get_golang {
- if [[ $1 == "golang.org/x/net" ]]
- then
- echo $1 $2 $3
- get_git "github.com/golang/net" $2
- elif [[ $1 == "golang.org/x/text" ]]
- then
- echo $1 $2 $3
- get_git "github.com/golang/text" $2
- elif [[ $1 == "golang.org/x/crypto" ]]
- then
- echo $1 $2 $3
- get_git "github.com/golang/crypto" $2
- else
- echo $1 $2 $3
- fi
+ 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