www-apps/gitea: bump to 1.7.2

Package-Manager: Portage-2.3.51, Repoman-2.3.11
This commit is contained in:
nemunaire 2019-02-19 16:26:54 +01:00
parent ffa1d28422
commit 52074f10e8
3 changed files with 102 additions and 76 deletions

View File

@ -3,6 +3,6 @@ AUX gitea.confd 74 BLAKE2B 656800d35c8f0075005e7e9e5c804292f9884663f89f653426064
AUX gitea.initd-r1 764 BLAKE2B 5162535625a926d9d94ea50fd892bc423170913d38cb00a2782a04e5dc2b096689ee4b5bce8ced48fd5ecd0e7b5900c4346aeb3ec93e6405ebd17416f9d5f316 SHA512 9acfcc7fbb63feac97d5e9da0d629ef82473bc840097fd1d496f716e49746c14d999915a124d99defb6c4b62c108251fad78e5ff738d8119f2d9f4bbb1cd311f
AUX gitea.logrotated 87 BLAKE2B 373830ddd6eed0ce2f0f7b1dab14e4a253e5a56a73f477cfadbc6deec373846d4df2d697735391581771699d5a6513acb0e14a446873de01eba10d19e3a6bd88 SHA512 798f3fc33026f19dd31ffa78b9b1ed313d7b82b19c047f509e896c1798b2925a1bb7c4998d98a6b47e728979bf7132fb1c2a80eb7fda096a763d6791631cb6d4
AUX gitea.service 525 BLAKE2B c6c7e9b0dc5822182757e6071c75821242da3435e31385dc5154dc674d38e9a026909011c6edee2fa78e2f6c31ddc0ba494a0230610b3a6da3d716230cb54c6b SHA512 a407dbef960e251bb012194b4019d6e29b1473cd989f2c4706b5ab3a7cea1645a7e68eae8a64cc7d77e8ca08280e2ac1f7df47498c6a4c9e685e3741dc9d56a9
DIST gitea-1.7.1.tar.gz 20834721 BLAKE2B 576d107bbfc495b41b52dad93565010ea8634e3b8907f5ebbbf7f8f404d0b0ab2264777587b9c3258049a31fdfaea585ed51b81a2834a486381563decfeee808 SHA512 b8e9fba09d34c8929d3ad04417a106a0c3b4b4d0982a7d4c92c764113d29a2e2016a9bee378955dbb9d3839850e481cdad0e94ed1b700c9eda85f63a0ada8e78
EBUILD gitea-1.7.1.ebuild 2229 BLAKE2B 8c4310448827630331def218a542ccd23f0736f8f50728635e5a26c39019b0e00bab9134666d2f46599c4880f61c0728dd93dda9b7d82440340e85be97e2dea4 SHA512 8a7417e8d9a02cd66eb418d93fd7f257532ba43232975e44c0f4e53b82aa92383d2e52e1f2deb5953c8072b0cc60661f560a090c2854952a4f744415ee314c6b
DIST gitea-1.7.2.tar.gz 20841049 BLAKE2B 1f39cf039dec3a76d3df8cf75905ab03bcde83b74bdd1f3c2249065633bd8b3de52ae8adb543b68d65dca35dfb16659120d04b0472ed11798551889851df1dab SHA512 8472effb58cc0c416b229ae3724c4e914afd81f058b06ce0c6ea68667a77eaa122a78b928fd5d4cb2e1b00eac15ec76825cd800c769fdc88796a535206a4dff6
EBUILD gitea-1.7.2.ebuild 2489 BLAKE2B f70b77afa52c325001bb17a3611f5abc62e65fb3a2767db979643fce0ac624c9bec479b6d9ac0ac63449b96025bfea7513cd6212f05a9e762ff659367b735f4b SHA512 20fac1c03557493cf0865b5c085dd55a4e4649f3716a49ed090486efd13595019099d628c447ac5671b62c33f94c844f6e68498a3ebae4313c0467b590de6151
MISC metadata.xml 258 BLAKE2B 56a930f47b1b24a142aa53c18ff04027c0d01a123c41953c1138c773d8aac67e9a193787bbd980fd2d16482f04e99365bd8538550dd3df3d1959935a7cc378e5 SHA512 bae5e9eb659f7355c95800c2231976b3f91dd6a1c9215d8c5865f3e710109c9442477d374a4e70f70ac73f52fd8ce357dfa937f7b7aababaeaea310677dc143d

View File

@ -1,74 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit golang-build golang-vcs-snapshot systemd user
EGO_PN="code.gitea.io/gitea"
KEYWORDS="~amd64 ~arm"
DESCRIPTION="A painless self-hosted Git service, written in Go"
HOMEPAGE="https://gitea.io/"
SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
DEPEND="
dev-go/go-bindata
sys-libs/pam
"
RDEPEND="
dev-vcs/git
sys-libs/pam
"
pkg_setup() {
enewgroup git
enewuser git -1 /bin/bash /var/lib/gitea git
}
src_prepare() {
default
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
sed -i -e "s#^RUN_MODE = dev#RUN_MODE = prod#"\
-e "s#^LOG_SQL = true#LOG_SQL = false#"\
-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"\
"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() {
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 >/dev/null || die
insinto /etc/logrotate.d
newins "${FILESDIR}"/gitea.logrotated gitea
newinitd "${FILESDIR}"/gitea.initd-r1 gitea
newconfd "${FILESDIR}"/gitea.confd gitea
systemd_dounit "${FILESDIR}/gitea.service"
}
pkg_postinst() {
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
}

View File

@ -0,0 +1,100 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit golang-vcs-snapshot systemd user
EGO_PN="code.gitea.io/gitea"
KEYWORDS="~amd64 ~arm"
DESCRIPTION="A painless self-hosted Git service, written in Go"
HOMEPAGE="https://gitea.io/"
SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
IUSE="pam sqlite"
S="${WORKDIR}/${P}/src/${EGO_PN}"
COMMON_DEPEND="pam? ( sys-libs/pam )"
DEPEND="
${COMMON_DEPEND}
dev-go/go-bindata
"
RDEPEND="
${COMMON_DEPEND}
dev-vcs/git
"
GITEA_USER=git
GITEA_GROUP=git
pkg_setup() {
enewgroup ${GITEA_GROUP}
enewuser ${GITEA_USER} -1 /bin/bash /var/lib/gitea ${GITEA_GROUP}
}
gitea_make() {
local my_tags=(
bindata
$(usev pam)
$(usex sqlite 'sqlite sqlite_unlock_notify' '')
)
local my_makeopt=(
DRONE_TAG=${PV}
TAGS="${my_tags[@]}"
)
GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" $1 || die "make $1 failed"
}
src_prepare() {
default
sed -i -e "s/-ldflags '-s/-ldflags '/" \
-e "s/GOFLAGS := -i -v/GOFLAGS := -v/" \
Makefile || die
sed -i -e "s#^RUN_MODE = dev#RUN_MODE = prod#" \
-e "s#^LOG_SQL = true#LOG_SQL = false#" \
-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" \
-e "s#^MODE = console#MODE = console, file#" \
-e "s#^LEVEL = Trace#LEVEL = Info#" \
-e "s#^APP_ID =#;APP_ID =#" \
-e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#" \
custom/conf/app.ini.sample || die
gitea_make generate
}
src_compile() {
gitea_make build
}
src_test() {
gitea_make test
}
src_install() {
dobin gitea
diropts -m0750 -o git -g git
keepdir /var/log/gitea /var/lib/gitea /var/lib/gitea/data
insinto /var/lib/gitea/conf
doins custom/conf/app.ini.sample
newinitd "${FILESDIR}"/gitea.initd gitea
newconfd "${FILESDIR}"/gitea.confd gitea
systemd_dounit "${FILESDIR}"/gitea.service
}
pkg_postinst() {
if [[ ! -e "${EROOT}/var/lib/gitea/conf/app.ini" ]] ; then
elog "No app.ini found, copying initial config over"
cp "${EROOT}"/var/lib/gitea/conf/{app.ini.sample,app.ini} || die
chown ${GITEA_USER}:${GITEA_GROUP} "${EROOT}/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
}