www-apps/gitea: bump to 1.4.0

This commit is contained in:
nemunaire 2018-05-01 14:40:57 +02:00
parent 00c472bc87
commit 29965ff6d7
5 changed files with 111 additions and 0 deletions

5
www-apps/gitea/Manifest Normal file
View File

@ -0,0 +1,5 @@
AUX gitea.confd 74 BLAKE2B 656800d35c8f0075005e7e9e5c804292f9884663f89f653426064a20cfbcb518f736bd94947a03bce5adad670fb6150d93026999d6d5395f37a85666b6663a2f SHA512 3e05bad19cd924c4375d9ca6fc57142ba4b5ec897a1c789c3fc9710dfcfee209a199c95040eece089ad93e0357486ab98fad0c448a61e318646b7a71845e9a25
AUX gitea.initd 681 BLAKE2B 779865d105fa7f9dc84ddfd35c9b068190617d436ae109b13997ad01c9b83a038ae1f9467fcd9e1781386d61a9aaa90c9415a756bcdb5fef9e2dd29b2c0a2c86 SHA512 4565a201f34e5beecc8b535c677e308718a3df91f78a1a7132dda70bc4131871ad9f007c76490c23a001357ce78172a0a22c3e5ff9f3deaa7032e1d8cb11e986
AUX gitea.logrotated 87 BLAKE2B 373830ddd6eed0ce2f0f7b1dab14e4a253e5a56a73f477cfadbc6deec373846d4df2d697735391581771699d5a6513acb0e14a446873de01eba10d19e3a6bd88 SHA512 798f3fc33026f19dd31ffa78b9b1ed313d7b82b19c047f509e896c1798b2925a1bb7c4998d98a6b47e728979bf7132fb1c2a80eb7fda096a763d6791631cb6d4
DIST gitea-1.4.0.tar.gz 14983167 BLAKE2B 137ffee7caa26448ae19c2864b21190d2d654cb3e78724068adad1768f3727531f156c9fb2b9a0a4f361e949fb069bb1cd6f1dc0c08c23688ea95e0c1c568dc8 SHA512 d51a47374ce02a542e491079111a3f770db79017004a22b6ebeefc0c65c04036f992534a61d241846e35b7d0da778db4c3de73a151e70adca78966178448c3d1
EBUILD gitea-1.4.0.ebuild 2460 BLAKE2B 0039671ab52b0c6abb9ea9fb17d522e9c5235444643dc344b4efe3d230a17b31c22fd1d1abfa8b7f6f2fa16ca27e7c51725785b4180f03a5955958483191a9c1 SHA512 bf04a7a64d440409ed2fb558d08947ec7e0af596566db358fbf641998b4095d75a96daae5e4408f3a751b1633e15dddcc8359f62f9d135b6cbc6fcf3472551de

View File

@ -0,0 +1,2 @@
# arguments for gitea
command_args="--config /var/lib/gitea/conf/app.ini"

View File

@ -0,0 +1,25 @@
#!/sbin/openrc-run
# Copyright 2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Gitea, a self-hosted Git service"
pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
user=${user:-git}
group=${group:-git}
command="/usr/bin/gitea web"
command_args="${command_args:--config /var/lib/gitea/conf/app.ini}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
-e GITEA_CUSTOM=/var/lib/gitea
--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
depend() {
need net
after net
}
start_pre() {
checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
}

View File

@ -0,0 +1,8 @@
/var/log/gitea/* {
su git git
missingok
size 5M
rotate 3
compress
copytruncate
}

View File

@ -0,0 +1,71 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit user golang-build golang-vcs-snapshot
EGO_PN="code.gitea.io/gitea"
GIT_COMMIT="81fd8c8"
ARCHIVE_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm"
DESCRIPTION="A painless self-hosted Git service, written in Go"
HOMEPAGE="https://github.com/go-gitea/gitea"
SRC_URI="${ARCHIVE_URI}"
LICENSE="MIT"
SLOT="0"
IUSE=""
DEPEND="dev-go/go-bindata"
RDEPEND="dev-vcs/git"
pkg_setup() {
enewgroup git
enewuser git -1 /bin/bash /var/lib/gitea git
}
src_prepare() {
default
local GITEA_PREFIX=${EPREFIX}/var/lib/gitea
sed -i -e "s/git rev-parse --short HEAD/echo ${GIT_COMMIT}/"\
-e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
-e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
sed -i -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${GITEA_PREFIX}/data#"\
-e "s#^PATH = data/gitea.db#PATH = ${GITEA_PREFIX}/data/gitea.db#"\
-e "s#^PROVIDER_CONFIG = data/sessions#PROVIDER_CONFIG = ${GITEA_PREFIX}/data/sessions#"\
-e "s#^AVATAR_UPLOAD_PATH = data/avatars#AVATAR_UPLOAD_PATH = ${GITEA_PREFIX}/data/avatars#"\
-e "s#^TEMP_PATH = data/tmp/uploads#TEMP_PATH = ${GITEA_PREFIX}/data/tmp/uploads#"\
-e "s#^PATH = data/attachments#PATH = ${GITEA_PREFIX}/data/attachments#"\
-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"\
-e "s#^ISSUE_INDEXER_PATH =#ISSUE_INDEXER_PATH = ${GITEA_PREFIX}/indexers/issues.bleve#"\
src/${EGO_PN}/custom/conf/app.ini.sample || die
}
src_compile() {
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} generate
TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="-fno-PIC" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} build
}
src_install() {
pushd src/${EGO_PN} || die
dobin gitea
insinto /var/lib/gitea/conf
doins custom/conf/app.ini.sample
popd || die
insinto /etc/logrotate.d
newins "${FILESDIR}"/gitea.logrotated gitea
newinitd "${FILESDIR}"/gitea.initd gitea
newconfd "${FILESDIR}"/gitea.confd gitea
keepdir /var/log/gitea /var/lib/gitea/data
fowners -R git:git /var/log/gitea /var/lib/gitea/
}
pkg_postinst() {
if [[ ! -e ${EROOT}/var/lib/gitea/conf/app.ini ]]; then
elog "No app.ini found, copying the example over"
cp "${EROOT}"/var/lib/gitea/conf/app.ini{.sample,} || die
else
elog "app.ini found, please check example file for possible changes"
fi
}