summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan G. Weichinger <office@oops.co.at>2018-06-02 14:05:50 +0200
committerManuel RĂ¼ger <mrueg@gentoo.org>2018-06-02 14:06:20 +0200
commit7062b1979c463885eb37690519eccd51825e3a6b (patch)
tree3d8225942780eb2e8ba0df0e228187a501f5b879 /www-apps/gitea/gitea-1.4.1.ebuild
parentdev-util/vulkan-tools: Drop old (diff)
downloadgentoo-7062b1979c463885eb37690519eccd51825e3a6b.tar.gz
gentoo-7062b1979c463885eb37690519eccd51825e3a6b.tar.bz2
gentoo-7062b1979c463885eb37690519eccd51825e3a6b.zip
www-apps/gitea: Version bump to 1.4.1
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'www-apps/gitea/gitea-1.4.1.ebuild')
-rw-r--r--www-apps/gitea/gitea-1.4.1.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/www-apps/gitea/gitea-1.4.1.ebuild b/www-apps/gitea/gitea-1.4.1.ebuild
new file mode 100644
index 000000000000..41abc1c912b1
--- /dev/null
+++ b/www-apps/gitea/gitea-1.4.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user systemd golang-build golang-vcs-snapshot
+
+EGO_PN="code.gitea.io/gitea"
+KEYWORDS="~amd64 ~arm"
+
+DESCRIPTION="A painless self-hosted Git service, written in Go"
+HOMEPAGE="https://github.com/go-gitea/gitea"
+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"
+
+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 '/" src/${EGO_PN}/Makefile || 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
+ newins custom/conf/app.ini.sample app.ini.example
+ popd || die
+ 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 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
+}