2015-08-07 23:54:03 +02:00
|
|
|
# Template build file for 'gogs'
|
|
|
|
pkgname=gogs
|
2015-11-28 08:36:35 +01:00
|
|
|
version=0.7.22
|
2016-01-13 21:53:24 +01:00
|
|
|
revision=3
|
2015-08-07 23:54:03 +02:00
|
|
|
build_style=go
|
|
|
|
go_import_path="github.com/gogits/gogs"
|
|
|
|
short_desc="Self-hosted Git Service in Go"
|
|
|
|
maintainer="John Regan <john@jrjrtech.com>"
|
|
|
|
license="MIT"
|
|
|
|
homepage="http://gogs.io"
|
|
|
|
depends="git"
|
|
|
|
distfiles="https://github.com/gogits/gogs/archive/v${version}.tar.gz"
|
2015-11-28 08:36:35 +01:00
|
|
|
checksum=63a7a2374d73b1eef94df32ce26c535f839504e135643412209ebfdd9a21aedd
|
2015-08-20 14:03:53 +02:00
|
|
|
hostmakedepends="git curl"
|
2015-08-07 23:54:03 +02:00
|
|
|
|
2015-08-13 06:22:30 +02:00
|
|
|
conf_files="/etc/gogs.ini"
|
2015-08-07 23:54:03 +02:00
|
|
|
system_accounts="gogs"
|
|
|
|
gogs_homedir="/srv/gogs"
|
2015-08-20 14:03:53 +02:00
|
|
|
gogs_shell="/bin/bash"
|
2015-08-07 23:54:03 +02:00
|
|
|
make_dirs="
|
|
|
|
/srv/gogs 0755 gogs gogs
|
|
|
|
/srv/gogs/repo 0755 gogs gogs
|
|
|
|
/srv/gogs/data 0755 gogs gogs
|
|
|
|
/srv/gogs/data/avatars 0755 gogs gogs
|
|
|
|
/srv/gogs/data/attachments 0755 gogs gogs
|
|
|
|
/var/log/gogs 0755 gogs gogs"
|
|
|
|
|
|
|
|
export CGO_ENABLED=1
|
|
|
|
|
|
|
|
post_extract() {
|
|
|
|
mkdir tmp
|
|
|
|
mkdir -p $GOPATH/src/github.com/gogits
|
|
|
|
ln -s $PWD $GOPATH/src/github.com/gogits/${pkgname}
|
2015-08-20 14:03:53 +02:00
|
|
|
sed -i 's@golang.org/x/net = commit:937a34c9de13@golang.org/x/net =@' .gopmfile
|
|
|
|
sed -i 's@golang.org/x/text = commit:5b2527008a4c@golang.org/x/text =@' .gopmfile
|
|
|
|
TMPDIR=${PWD}/tmp/ GOPMSTORE=${PWD}/tmp/gopm ${FILESDIR}/gopm-lite .gopmfile 1>/dev/null 2>/dev/null
|
|
|
|
TMPDIR=${PWD}/tmp/ go get -d -tags "sqlite redis memcache" "github.com/gogits/gogs"
|
2015-08-07 23:54:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
TMPDIR=${PWD}/tmp/ GOOS=linux go build -tags "sqlite redis memcache"
|
|
|
|
rm -rf tmp
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2015-08-20 14:03:53 +02:00
|
|
|
cd "$GOPATH/src/github.com/gogits/gogs"
|
2015-08-07 23:54:03 +02:00
|
|
|
vbin gogs-${version} gogs
|
|
|
|
install -d "$DESTDIR/usr/share/themes/gogs/default"
|
|
|
|
cp -r public "$DESTDIR/usr/share/themes/gogs/default/"
|
|
|
|
cp -r templates "$DESTDIR/usr/share/themes/gogs/default/"
|
|
|
|
vconf ${FILESDIR}/gogs.ini
|
|
|
|
vsconf ${FILESDIR}/gogs.ini
|
|
|
|
vlicense LICENSE
|
|
|
|
vdoc README.md
|
|
|
|
vsv gogs
|
|
|
|
}
|