blob: d44ed4d52f29177676404f31ba2aa9e6625bcf40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=gogs
pkgver=0.6.1
pkgrel=2
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="a363596502666e7318a776618f525d80 gogs-0.6.1.tar.gz
09d4e7596079f3555cbcc85fa83f7cf9 gogs.initd
6b3f501f9c37b5032cab8b49b5621fc4 gogs.confd
82edfdabfdf0ac64dc545036ca499465 gogs.ini"
sha256sums="1da9743b4551e7552c84af56a390e55cbab37ca3407ba1b52fc69e546fc4473b gogs-0.6.1.tar.gz
a1de13b47b87ee9db5164a808c903efcd534c2bdea19aa5518fea7b4ca8d4b08 gogs.initd
a1c584dbc2d44694ffcf87ecafdf6a43ae81370175ca9cc6e6ff7623b8b05254 gogs.confd
ead0082c56e8e8f9e9ba7f4c206c2a18bb732726137b71e05d83347638562530 gogs.ini"
sha512sums="17e39b637366c5eae9ce29e75a703c8ef7d1b4e42be0299f2c440aa5e0dd5e0caf71e07535675fb7cd5fe19a13db6535e9e88863bbb92c974ee9d21f1dff4a51 gogs-0.6.1.tar.gz
75eb2b43c8c944c1c95ae03f1c9cae5fd56d7a52c3a76bff6e057bf32407342f0d8f7c7fa7ef73612e5acded8c6553d58516641d40e4a7cda041e0bfe45a9910 gogs.initd
52ce41c05c263b790221a04d13d2eb9bba689e4bd72daf5b6af31416e80a485a46bae19e18581d7bde879307283847e6486686a2fe4140fe38ebb6f315e11a86 gogs.confd
4c2b398cf93ebb8b743b9e7ec1b075706427081036effb53fa90729e70fbc3eb92f2f853278b887ca79dc35cd55a64e1bff4d18e1ad246beab2a723aa9cd71ba gogs.ini"
|