Commit 239c51d4 authored by 7heo .tk's avatar 7heo .tk Committed by Carlo Landmeter
Browse files

testing/gogs: fix the glide files path

As clandmeter noticed, the glide files should be copied from $srcdir and
not from $startdir.

Also reformatted the APKBUILD to fit in 80 cols when possible, and
removed the extra (buggy) indentation that was there to align the next
lines with the previous (but only when ts=8).
parent 29342e7f
......@@ -24,21 +24,22 @@ builddir="$srcdir/${pkgname}-${pkgver}"
build() {
export GOPATH="$startdir"
cd "$builddir" || return 1
cp "$startdir/glide.yaml" "$startdir/glide.lock" .
cp "$srcdir/glide.yaml" "$srcdir/glide.lock" .
glide install || return 1
go fix || return 1
go build -buildmode=pie -v -tags "sqlite redis memcache cert" || return 1 # sqlite causes problems without the pie buildmode
# Note: sqlite causes problems without the pie buildmode
go build -buildmode=pie -v -tags "sqlite redis memcache cert" ||return 1
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/usr/share/webapps/$pkgname \
"$pkgdir"/var/lib/$pkgname/git \
"$pkgdir"/var/lib/$pkgname/db \
"$pkgdir"/var/lib/$pkgname/avatars \
"$pkgdir"/var/lib/$pkgname/attachements \
"$pkgdir"/var/cache/$pkgname/sessions \
"$pkgdir"/var/log/$pkgname || return 1
"$pkgdir"/var/lib/$pkgname/git \
"$pkgdir"/var/lib/$pkgname/db \
"$pkgdir"/var/lib/$pkgname/avatars \
"$pkgdir"/var/lib/$pkgname/attachements \
"$pkgdir"/var/cache/$pkgname/sessions \
"$pkgdir"/var/log/$pkgname || return 1
chown -R gogs:www-data "$pkgdir"/var/lib/$pkgname \
"$pkgdir"/var/cache/gogs/sessions \
"$pkgdir"/var/log/$pkgname || return 1
......@@ -48,7 +49,7 @@ package() {
setcap cap_net_bind_service=+ep \
"$pkgdir"/usr/bin/$pkgname || return 1
install -d -o gogs -g www-data \
"$pkgdir"/etc/$pkgname/conf || return 1
"$pkgdir"/etc/$pkgname/conf || return 1
install -D -m 0664 -o gogs -g www-data "$srcdir"/${pkgname}.ini \
"$pkgdir"/etc/$pkgname/conf/app.ini || return 1
mv public "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment