diff options
author | Pierre-Olivier Mercier <nemunaire@nemunai.re> | 2019-04-23 12:32:38 +0200 |
---|---|---|
committer | Aaron Bauman <bman@gentoo.org> | 2019-04-23 11:19:45 -0400 |
commit | 8ad2c3433d3cea830c12a124c8755c576d54d23c (patch) | |
tree | f1748759e9dce7cdf6dd668af2e2a187032ae51e /www-apps/gitea | |
parent | www-apps/gitea: taking maintainership with xdch47 (diff) | |
download | gentoo-8ad2c3433d3cea830c12a124c8755c576d54d23c.tar.gz gentoo-8ad2c3433d3cea830c12a124c8755c576d54d23c.tar.bz2 gentoo-8ad2c3433d3cea830c12a124c8755c576d54d23c.zip |
www-apps/gitea: bump to 1.8.0
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Signed-off-by: Pierre-Olivier Mercier <nemunaire@nemunai.re>
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'www-apps/gitea')
-rw-r--r-- | www-apps/gitea/Manifest | 1 | ||||
-rw-r--r-- | www-apps/gitea/gitea-1.8.0.ebuild | 85 |
2 files changed, 86 insertions, 0 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest index 9cdebf87da21..2d8c70322997 100644 --- a/www-apps/gitea/Manifest +++ b/www-apps/gitea/Manifest @@ -1,2 +1,3 @@ DIST gitea-1.7.4.tar.gz 20858340 BLAKE2B 81d896d313abe25bc1a5becd16249c2ce39ab45d9f40ccf3a565b6777847c7256d5b131f597be237df57513a207978e23480ad3c6087bbc588afe8bbcd46d5c9 SHA512 eede6d410529b1facf65061256e48fee7d459aa12d8c55346d3ad78004a45b7bf667536979fe92270a85901102fd9cddb8183490e16f912b742e799ca912e370 DIST gitea-1.7.6.tar.gz 20868421 BLAKE2B bdd623c09f628a56df9e2c36958d94582707ffeaeb45960fd1ea0d50a8083458683f28ab2c398ac1e939ba6b011ba6a83cc02abd98e9b9ff131bda8fd224c66c SHA512 ad39969b5f1246875c006c72f2ea711772f29bfb9c687510efbd2089c9f88e9d218d14b03111715179b2e0f72f85731f22dd46fc022e224be73b7e73e798236b +DIST gitea-1.8.0.tar.gz 24268907 BLAKE2B b46a17733fc7bd0f228620bdfadf0d596ea56fca6e685afab7734e794c1f87c5e004529ca3d69e907d516bcb83563565b1d8c32501f1c2c0f9295ca028d96ad0 SHA512 eebbe2f77ed2e4c3562f48a6fa647e6f2a0492c5b6ea4f13542a5ef82e94a357a8d53897aa013107b5f735d2aff9d719893b5724de44831c43998c2e9c6e78d7 diff --git a/www-apps/gitea/gitea-1.8.0.ebuild b/www-apps/gitea/gitea-1.8.0.ebuild new file mode 100644 index 000000000000..f62591346a41 --- /dev/null +++ b/www-apps/gitea/gitea-1.8.0.ebuild @@ -0,0 +1,85 @@ +# 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" +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" + +COMMON_DEPEND="pam? ( sys-libs/pam )" +DEPEND="${COMMON_DEPEND} + dev-go/go-bindata" +RDEPEND="${COMMON_DEPEND} + dev-vcs/git" + +DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md ) +S="${WORKDIR}/${P}/src/${EGO_PN}" + +pkg_setup() { + enewgroup git + enewuser git -1 /bin/bash /var/lib/gitea git +} + +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" +} + +src_compile() { + gitea_make generate + gitea_make build +} + +src_test() { + gitea_make test +} + +src_install() { + einstalldocs + dobin gitea + newconfd "${FILESDIR}"/gitea.confd-r1 gitea + newinitd "${FILESDIR}"/gitea.initd-r2 gitea + systemd_newunit "${FILESDIR}"/gitea.service-r1 gitea.service + diropts -m0750 -o git -g git + keepdir /etc/gitea + keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data + keepdir /var/log/gitea +} + +pkg_postinst() { + ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini." + ewarn "Please adapt the gitea-repositories hooks and ssh authorized_keys." + ewarn "Depending on your configuration you should run something like:" + ewarn "sed -i -e 's#/var/lib/gitea/conf/app.ini#/etc/gitea/app.ini#' \\" + ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\" + ewarn " /var/lib/gitea/.ssh/authorized_keys" + + if [[ ! -e "${EROOT}/etc/gitea/app.ini" ]]; then + elog "No app.ini found, copying initial config over" + cp "${FILESDIR}"/app.ini "${EROOT}"/etc/gitea/ || die + chown git:git "${EROOT}"/etc/gitea/app.ini || die + elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitea)." + else + elog "app.ini found, please check the sample 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 +} |