diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2015-04-20 17:22:55 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2015-04-20 17:23:03 +0200 |
commit | a8c9452678685e2a50789e4844d97cd4e3ddf0c9 (patch) | |
tree | 89945554cf81d3731122bce6196bc1d33e07474d | |
parent | 699cc620bce3fdfb9cdd601aba587e35cfbf7f17 (diff) | |
download | aports-a8c9452678685e2a50789e4844d97cd4e3ddf0c9.tar.bz2 aports-a8c9452678685e2a50789e4844d97cd4e3ddf0c9.tar.xz |
testing/gogs: new aport
-rw-r--r-- | testing/gogs/APKBUILD | 94 | ||||
-rw-r--r-- | testing/gogs/gogs.confd | 2 | ||||
-rw-r--r-- | testing/gogs/gogs.ini | 29 | ||||
-rw-r--r-- | testing/gogs/gogs.initd | 14 | ||||
-rw-r--r-- | testing/gogs/gogs.pre-install | 4 |
5 files changed, 143 insertions, 0 deletions
diff --git a/testing/gogs/APKBUILD b/testing/gogs/APKBUILD new file mode 100644 index 0000000000..8ade5bbd3e --- /dev/null +++ b/testing/gogs/APKBUILD @@ -0,0 +1,94 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=gogs +pkgver=0.6.1 +pkgrel=0 +pkgdesc="A self-hosted Git service written in Go" +url="http://gogs.io/" +arch="all" +license="MIT" +depends="git" +depends_dev="" +makedepends="$depends_dev go-tools perl" +install="$pkgname.pre-install" +subpackages="" +pkgusers="gogs" +source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz + $pkgname.initd + $pkgname.confd + $pkgname.ini" + +_disturl="dev.alpinelinux.org:/archive/$pkgname/" +_gourl="github.com/gogits/gogs" + +_builddir="$srcdir"/src/github.com/gogits + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +snapshot() { + abuild clean + export GOPATH="$srcdir" + mkdir -p $_builddir + cd $_builddir + msg "Checking out v${pkgver} tag" + git clone -q --branch v${pkgver} https://$_gourl || return 1 + cd gogs + go get -v -u -d -tags "sqlite redis memcache" || return 1 + git submodule update --init || return 1 + cd "$srcdir" + tar zcf $pkgname-$pkgver.tar.gz src || return 1 + rsync --progress -La $pkgname-$pkgver.tar.gz \ + $_disturl || return 1 +} + +build() { + cd "$_builddir"/$pkgname || return 1 + export GOPATH="$srcdir" + go fix || return 1 + go build -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 + chown -R gogs:www-data "$pkgdir"/var/lib/$pkgname \ + "$pkgdir"/var/cache/gogs/sessions \ + "$pkgdir"/var/log/$pkgname || return 1 + install -Dm 0755 $pkgname/$pkgname \ + "$pkgdir"/usr/bin/$pkgname || return 1 + install -Dm 0664 -o gogs -g www-data "$srcdir"/${pkgname}.ini \ + "$pkgdir"/etc/$pkgname/conf/app.ini || return 1 + mv $pkgname/public "$pkgdir"/usr/share/webapps/$pkgname/ || return 1 + mv $pkgname/templates "$pkgdir"/usr/share/webapps/$pkgname/ || return 1 + install -D -m755 "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -D -m644 "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 +} + +md5sums="7b16aa0bb0a8069ed05f307ea5be8346 gogs-0.6.1.tar.gz +09d4e7596079f3555cbcc85fa83f7cf9 gogs.initd +6b3f501f9c37b5032cab8b49b5621fc4 gogs.confd +82edfdabfdf0ac64dc545036ca499465 gogs.ini" +sha256sums="6ffbf43b39d132f75d78bcfe66f441f4ae7537d07c64a7a9a7a89db03d7b8cf7 gogs-0.6.1.tar.gz +a1de13b47b87ee9db5164a808c903efcd534c2bdea19aa5518fea7b4ca8d4b08 gogs.initd +a1c584dbc2d44694ffcf87ecafdf6a43ae81370175ca9cc6e6ff7623b8b05254 gogs.confd +ead0082c56e8e8f9e9ba7f4c206c2a18bb732726137b71e05d83347638562530 gogs.ini" +sha512sums="079a82d1974d1faa576b2cdb0692f4e88603ed923797b14305e1485c6b939a0c00cf2443d2f7c18f942d6225e8bdd60fbd2c0b4e2a1d6c6fc54b59ec007db28c gogs-0.6.1.tar.gz +75eb2b43c8c944c1c95ae03f1c9cae5fd56d7a52c3a76bff6e057bf32407342f0d8f7c7fa7ef73612e5acded8c6553d58516641d40e4a7cda041e0bfe45a9910 gogs.initd +52ce41c05c263b790221a04d13d2eb9bba689e4bd72daf5b6af31416e80a485a46bae19e18581d7bde879307283847e6486686a2fe4140fe38ebb6f315e11a86 gogs.confd +4c2b398cf93ebb8b743b9e7ec1b075706427081036effb53fa90729e70fbc3eb92f2f853278b887ca79dc35cd55a64e1bff4d18e1ad246beab2a723aa9cd71ba gogs.ini" diff --git a/testing/gogs/gogs.confd b/testing/gogs/gogs.confd new file mode 100644 index 0000000000..a81e46a6c4 --- /dev/null +++ b/testing/gogs/gogs.confd @@ -0,0 +1,2 @@ +GOGS_CUSTOM="/etc/gogs" +GOGS_USER="gogs" diff --git a/testing/gogs/gogs.ini b/testing/gogs/gogs.ini new file mode 100644 index 0000000000..6d344f2152 --- /dev/null +++ b/testing/gogs/gogs.ini @@ -0,0 +1,29 @@ +RUN_USER = gogs +RUN_MODE = prod + +[repository] +ROOT = /var/lib/gogs/git +SCRIPT_TYPE = sh + +[server] +STATIC_ROOT_PATH = /usr/share/webapps/gogs + +[database] +DB_TYPE = sqlite3 +PATH = /var/lib/gogs/db/gogs.db +SSL_MODE = disable + +[session] +PROVIDER_CONFIG = /var/cache/gogs/sessions +PROVIDER = file + +[picture] +AVATAR_UPLOAD_PATH = /var/lib/gogs/avatars + +[attachment] +PATH = /var/lib/gogs/attachements + +[log] +ROOT_PATH = /var/log/gogs +MODE = file +LEVEL = Info diff --git a/testing/gogs/gogs.initd b/testing/gogs/gogs.initd new file mode 100644 index 0000000000..14134718a1 --- /dev/null +++ b/testing/gogs/gogs.initd @@ -0,0 +1,14 @@ +#!/sbin/runscript + +name=gogs +command="/usr/bin/gogs" +command_args="web" +start_stop_daemon_args="${GOGS_USER:+--user} $GOGS_USER --env GOGS_CUSTOM=$GOGS_CUSTOM" +pidfile="/var/run/gogs.pid" +command_background="yes" + +depend() { + use logger dns + need net + after firewall +} diff --git a/testing/gogs/gogs.pre-install b/testing/gogs/gogs.pre-install new file mode 100644 index 0000000000..26870df534 --- /dev/null +++ b/testing/gogs/gogs.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh + +adduser -S -h /var/lib/gogs -s /sbin/nologin -G www-data -D gogs 2>/dev/null || true + |