www-apps/gitea: version bump
This commit is contained in:
parent
3f58b805f8
commit
6632699364
5 changed files with 89 additions and 23 deletions
|
|
@ -1,6 +1,9 @@
|
|||
AUX app.ini 67 BLAKE2B 4ec7b8217486047b419202b3a8a7172ac21ae0e5ad9224cd4f010be730ac5cda9d05bf06dcba2d06f8809900094b3b007ef98dd4ea20a125fb7d3db279f53e4a SHA512 93f6f7cf49dd1ece56f7da711adbb58cc38a503527aeea140837d74456ee6f550a089e897d9cb94382e1eb3f5a5cbe4a61362534463eada08a91f314da0f2108
|
||||
AUX gitea.confd 74 BLAKE2B 656800d35c8f0075005e7e9e5c804292f9884663f89f653426064a20cfbcb518f736bd94947a03bce5adad670fb6150d93026999d6d5395f37a85666b6663a2f SHA512 3e05bad19cd924c4375d9ca6fc57142ba4b5ec897a1c789c3fc9710dfcfee209a199c95040eece089ad93e0357486ab98fad0c448a61e318646b7a71845e9a25
|
||||
AUX gitea.initd 676 BLAKE2B 72b588584bc80af1d679cef4f9ba91460b3f98fe9bc5892bcb9a01e25bba3534a300e17453759d515377927f5025faaca3653296fe27b2d8e773c7fb8c5dca5a SHA512 913d4933def4c7e24e685a4d13dd2bb64d2bf132d6a7d9fee519b0c5f2830a5e795da67fe36b0eed3b349af6f0b07ee785802d0db1dcb547964846829574df33
|
||||
AUX gitea.initd-r1 688 BLAKE2B eb2341dee53f3fd92c49137855615d9ae7ca77efc396e2d2ed8b624ed2776c7522455a469c00172ecbbe2151ccab476baa0c779baf8a39f63348bdc7ebbd29c2 SHA512 4a6bba463c9abafcb6fc9f3854efd1a69fb3b213c2b34ff6a233f90db535c2ab0f375a0809e4c4be6651ed60d7696a54148a5ee9192567d70ca6a5203a8d3266
|
||||
AUX gitea.logrotated 87 BLAKE2B 373830ddd6eed0ce2f0f7b1dab14e4a253e5a56a73f477cfadbc6deec373846d4df2d697735391581771699d5a6513acb0e14a446873de01eba10d19e3a6bd88 SHA512 798f3fc33026f19dd31ffa78b9b1ed313d7b82b19c047f509e896c1798b2925a1bb7c4998d98a6b47e728979bf7132fb1c2a80eb7fda096a763d6791631cb6d4
|
||||
DIST gitea-1.6.3.tar.gz 19505072 BLAKE2B 8d4ab5bdcffe7f88579f74cbae4562f51ba3191a133b0e6f29e96f0f9aa132765b79a414cc792a831acfea94debb55e3ae0653c2cf30ceca8821cdfc7c383d77 SHA512 367df2f85918e613fcf360afd3857cb4df9697222f064a8e60e3ae15b0ee3fa5018a28f221d906fa7f8045f3249ecf777f08180dbb3c898cbdcc09eaf5c2c5be
|
||||
EBUILD gitea-1.6.3.ebuild 2504 BLAKE2B 8fdb1f40356588a8944591b563b0d350922bd4e4c5eff209f93c8b547fdb340691fc7a18cd7c62063801995ea03fc631318c495fa9d2a78ad038570e6a8f942a SHA512 680476c7d0ccdda798e23a96c48cb57dd5b8f6a1c5bbd07c9d98a8b748dfdf25ed1f45a26ced0a39b0a576bbb9ff1a485021f26e5a046918b37076fc020fe4c2
|
||||
AUX gitea.service 472 BLAKE2B 4c728e2987d0c0a86e65d4b9c1a59f6193ff8a3f9b066991a06f495ad1c5586b3497c71fca1cce5b65f167af09343e7bf3215ee5e8fdefa539e384198d2d88d6 SHA512 6666fe3b4cdbb78a58db4a6bf47a15e6be9ab30b666c6eb77a9e8a002d8c0abd510fc75ef463a11ee6892ab12c98943774616072cb64fd9f2fa42ff8f676aa95
|
||||
DIST gitea-1.7.0.tar.gz 20829587 BLAKE2B c7450886981e416ccc5a7976ff8d7ffb76d53e6c8238e5bcabdfa66d3493038b5343cce04b2fd3f822db0e9d1fdb4a14943ac63f893a0e0a2a6ad930359e10bf SHA512 ee9cc316572c8a2330ca3b06c0a288c29d86898874e9a6b6e6608c62064c5dc8324f96433ccfe160c07301e5dbdb170a5e01a31f1317881712b8e26bc407ccac
|
||||
EBUILD gitea-1.7.0.ebuild 2796 BLAKE2B e5376d8c58f9740e34300bb6b8ce8f8e10004a20ae17a3c84ddef6f7afd4a28c56d302e7be40217eaf6db71fe449699b9fe33d2dbdf7a94c8b85a4648b23fa12 SHA512 9d94515c760d2725a092ea61b96207cff49d965568f789fc05137942bf0e6a5bbca59823cb6d4aaa890be7968e51d1cab0b079694051464cba35540158f659cc
|
||||
MISC metadata.xml 258 BLAKE2B 56a930f47b1b24a142aa53c18ff04027c0d01a123c41953c1138c773d8aac67e9a193787bbd980fd2d16482f04e99365bd8538550dd3df3d1959935a7cc378e5 SHA512 bae5e9eb659f7355c95800c2231976b3f91dd6a1c9215d8c5865f3e710109c9442477d374a4e70f70ac73f52fd8ce357dfa937f7b7aababaeaea310677dc143d
|
||||
|
|
|
|||
4
www-apps/gitea/files/app.ini
Normal file
4
www-apps/gitea/files/app.ini
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[log]
|
||||
MODE = file
|
||||
LEVEL = Info
|
||||
ROOT_PATH = /var/log/gitea
|
||||
25
www-apps/gitea/files/gitea.initd-r1
Normal file
25
www-apps/gitea/files/gitea.initd-r1
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2018 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_WORK_DIR=/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%/*}"
|
||||
}
|
||||
26
www-apps/gitea/files/gitea.service
Normal file
26
www-apps/gitea/files/gitea.service
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=Gitea service
|
||||
Documentation=https://gitea.io
|
||||
|
||||
AssertPathIsDirectory=/var/lib/gitea
|
||||
AssertPathIsReadWrite=/var/lib/gitea
|
||||
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
After=mysqld.service
|
||||
Requires=mysqld.service
|
||||
|
||||
[Service]
|
||||
User=git
|
||||
Group=git
|
||||
|
||||
Environment="GITEA_CUSTOM=/var/lib/gitea"
|
||||
WorkingDirectory=/var/lib/gitea
|
||||
ExecStart=/usr/bin/gitea web -c /var/lib/gitea/conf/app.ini
|
||||
|
||||
Restart=always
|
||||
PrivateTmp=true
|
||||
Nice=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -2,23 +2,27 @@
|
|||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit user golang-build golang-vcs-snapshot
|
||||
inherit golang-build golang-vcs-snapshot systemd user
|
||||
|
||||
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}"
|
||||
SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-go/go-bindata"
|
||||
RDEPEND="dev-vcs/git"
|
||||
DEPEND="
|
||||
dev-go/go-bindata
|
||||
sys-libs/pam
|
||||
"
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
sys-libs/pam
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup git
|
||||
|
|
@ -27,12 +31,11 @@ pkg_setup() {
|
|||
|
||||
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}\"/"\
|
||||
sed -i -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
|
||||
-e "s/-ldflags '-s/-ldflags '/" \
|
||||
-e "s/GOFLAGS := -i -v/GOFLAGS := -v/" \
|
||||
src/${EGO_PN}/Makefile || die
|
||||
"src/${EGO_PN}/Makefile" || die
|
||||
local GITEA_PREFIX="${EPREFIX}/var/lib/gitea"
|
||||
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#"\
|
||||
|
|
@ -41,33 +44,38 @@ src_prepare() {
|
|||
-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/${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
|
||||
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
|
||||
diropts -m0750 -o git -g git
|
||||
keepdir /var/log/gitea /var/lib/gitea /var/lib/gitea/data
|
||||
pushd "src/${EGO_PN}" >/dev/null || die
|
||||
dobin gitea
|
||||
insinto /var/lib/gitea/conf
|
||||
doins custom/conf/app.ini.sample
|
||||
popd || die
|
||||
popd >/dev/null || die
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/gitea.logrotated gitea
|
||||
newinitd "${FILESDIR}"/gitea.initd gitea
|
||||
newinitd "${FILESDIR}"/gitea.initd-r1 gitea
|
||||
newconfd "${FILESDIR}"/gitea.confd gitea
|
||||
keepdir /var/log/gitea /var/lib/gitea/data
|
||||
fowners -R git:git /var/log/gitea /var/lib/gitea/
|
||||
systemd_dounit "${FILESDIR}/gitea.service"
|
||||
}
|
||||
|
||||
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
|
||||
if [[ ! -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
|
||||
elog "No app.ini found, copying initial config over"
|
||||
cp "${FILESDIR}"/app.ini "${EROOT}"/var/lib/gitea/conf/ || die
|
||||
chown git:git /var/lib/gitea/conf/app.ini
|
||||
else
|
||||
elog "app.ini found, please check example file for possible changes"
|
||||
ewarn "Please note that environment variables have been changed:"
|
||||
ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)"
|
||||
ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)"
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue