summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-06-27 08:58:08 +0000
committerPeter Volkov <pva@gentoo.org>2011-06-27 08:58:08 +0000
commit7cc261e852857092238ebc0e20dc58846bb1a0b1 (patch)
treeee99f2f1db7a63fa3b64ab67762619f2bf998f30
parentVersion bumps. Ebuilds and patchsets by Arfrever. (diff)
downloadgentoo-2-7cc261e852857092238ebc0e20dc58846bb1a0b1.tar.gz
gentoo-2-7cc261e852857092238ebc0e20dc58846bb1a0b1.tar.bz2
gentoo-2-7cc261e852857092238ebc0e20dc58846bb1a0b1.zip
Version bump, bump EAPI, add instructions for apache2 installation bug 370681 wrt to Oliver Schinagl. Thank Nikoli for all this job.
(Portage version: 2.1.10.3/cvs/Linux x86_64)
-rw-r--r--www-apps/cgit/ChangeLog9
-rw-r--r--www-apps/cgit/cgit-0.9.0.1.ebuild85
-rw-r--r--www-apps/cgit/cgit-9999.ebuild26
-rw-r--r--www-apps/cgit/files/postinstall-en.txt30
4 files changed, 132 insertions, 18 deletions
diff --git a/www-apps/cgit/ChangeLog b/www-apps/cgit/ChangeLog
index 4997bb1e7d9d..4104e90d34b6 100644
--- a/www-apps/cgit/ChangeLog
+++ b/www-apps/cgit/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-apps/cgit
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/cgit/ChangeLog,v 1.6 2011/06/27 05:41:07 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/cgit/ChangeLog,v 1.7 2011/06/27 08:58:08 pva Exp $
+
+*cgit-0.9.0.1 (27 Jun 2011)
+
+ 27 Jun 2011; Peter Volkov <pva@gentoo.org> +cgit-0.9.0.1.ebuild,
+ cgit-9999.ebuild, files/postinstall-en.txt:
+ Version bump, bump EAPI, add instructions for apache2 installation bug 370681
+ wrt to Oliver Schinagl. Thank Nikoli for all this job.
27 Jun 2011; Peter Volkov <pva@gentoo.org> -cgit-0.8.3.1-r1.ebuild:
Drop old and vulnerable version.
diff --git a/www-apps/cgit/cgit-0.9.0.1.ebuild b/www-apps/cgit/cgit-0.9.0.1.ebuild
new file mode 100644
index 000000000000..03b223a7dca9
--- /dev/null
+++ b/www-apps/cgit/cgit-0.9.0.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/cgit/cgit-0.9.0.1.ebuild,v 1.1 2011/06/27 08:58:08 pva Exp $
+
+EAPI="4"
+
+WEBAPP_MANUAL_SLOT="yes"
+
+inherit webapp eutils multilib
+
+[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/"
+
+GIT_V="1.7.4"
+
+DESCRIPTION="a fast web-interface for git repositories"
+HOMEPAGE="http://hjemli.net/git/cgit/about/"
+SRC_URI="mirror://kernel/software/scm/git/git-${GIT_V}.tar.bz2
+ http://hjemli.net/git/cgit/snapshot/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc highlight"
+
+RDEPEND="
+ dev-vcs/git
+ sys-libs/zlib
+ dev-libs/openssl
+ virtual/httpd-cgi
+ highlight? ( app-text/highlight )
+"
+# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken
+DEPEND="${RDEPEND}
+ !<www-apps/cgit-0.8.3.3
+ doc? ( app-text/docbook-xsl-stylesheets
+ >=app-text/asciidoc-8.5.1 )
+"
+
+pkg_setup() {
+ webapp_pkg_setup
+ enewuser "${PN}"
+}
+
+src_prepare() {
+ rmdir git || die
+ mv "${WORKDIR}"/git-"${GIT_V}" git || die
+
+ sed -i \
+ -e "/^CACHE_ROOT =/s:/var/cache/cgit:${CGIT_CACHEDIR}:" \
+ Makefile || die
+}
+
+src_compile() {
+ emake
+ use doc && emake doc-man
+}
+
+src_install() {
+ webapp_src_preinst
+
+ emake \
+ prefix="${EPREFIX}"/usr \
+ libdir="${EPREFIX}"/usr/$(get_libdir) \
+ CGIT_SCRIPT_PATH="${MY_CGIBINDIR}" \
+ CGIT_DATA_PATH="${MY_HTDOCSDIR}" \
+ DESTDIR="${D}" install
+
+ insinto /etc
+ doins "${FILESDIR}"/cgitrc
+
+ dodoc README
+ use doc && doman cgitrc.5
+
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ webapp_src_install
+
+ keepdir "${CGIT_CACHEDIR}"
+ fowners ${PN}:${PN} "${CGIT_CACHEDIR}"
+ fperms 700 "${CGIT_CACHEDIR}"
+}
+
+pkg_postinst() {
+ ewarn "If you intend to run cgit using web server's user"
+ ewarn "you should change ${CGIT_CACHEDIR} permissions."
+}
diff --git a/www-apps/cgit/cgit-9999.ebuild b/www-apps/cgit/cgit-9999.ebuild
index cac338ad0054..37000f3d913f 100644
--- a/www-apps/cgit/cgit-9999.ebuild
+++ b/www-apps/cgit/cgit-9999.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/cgit/cgit-9999.ebuild,v 1.1 2011/04/29 19:02:19 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/cgit/cgit-9999.ebuild,v 1.2 2011/06/27 08:58:08 pva Exp $
-EAPI="2"
+EAPI="4"
WEBAPP_MANUAL_SLOT="yes"
-inherit webapp eutils multilib git
+inherit webapp eutils multilib git-2
[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/"
@@ -41,12 +41,6 @@ pkg_setup() {
enewuser "${PN}"
}
-src_unpack() {
- git_src_unpack
-
- cd "${WORKDIR}" && unpack ${A}
-}
-
src_prepare() {
rmdir git || die
mv "${WORKDIR}"/git-"${GIT_V}" git || die
@@ -57,21 +51,19 @@ src_prepare() {
}
src_compile() {
- emake || die
- if use doc ; then
- emake doc-man || die
- fi
+ emake
+ use doc && emake doc-man
}
src_install() {
webapp_src_preinst
emake \
- prefix=/usr \
- libdir=/usr/$(get_libdir) \
+ prefix="${EPREFIX}"/usr \
+ libdir="${EPREFIX}"/usr/$(get_libdir) \
CGIT_SCRIPT_PATH="${MY_CGIBINDIR}" \
CGIT_DATA_PATH="${MY_HTDOCSDIR}" \
- DESTDIR="${D}" install || die
+ DESTDIR="${D}" install
insinto /etc
doins "${FILESDIR}"/cgitrc
@@ -89,5 +81,5 @@ src_install() {
pkg_postinst() {
ewarn "If you intend to run cgit using web server's user"
- ewarn "you should change /var/cache/cgit/ permissions."
+ ewarn "you should change ${CGIT_CACHEDIR} permissions."
}
diff --git a/www-apps/cgit/files/postinstall-en.txt b/www-apps/cgit/files/postinstall-en.txt
index 94280c80b66f..b164123f0196 100644
--- a/www-apps/cgit/files/postinstall-en.txt
+++ b/www-apps/cgit/files/postinstall-en.txt
@@ -13,3 +13,33 @@ Then add "include=/etc/cgit-repos" in /etc/cgitrc. This way it's simpler and
more convenient. You won't need to update your cgitrc every time you add a new
repository.
+===============================================================================
+ Apache HowTo
+===============================================================================
+
+With a default apache vhost config you can now access your repository at
+http://<vhostname>/cgi-bin/cgit.cgi/
+
+If you wish to access your repository starting from the root and don't want
+'cgi-bin/cgit.cgi' to be invisible, 2 things are needed.
+
+In your apache vhost configuration file for your domain, add the following
+rewrite rules to your
+<Directory /var/www/<vhostname>/htdocs> section.
+<snip>
+ RewriteEngine On
+ # Redirect all non-existant urls to cgit
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^.* /cgi-bin/cgit.cgi/$0 [L,PT]
+
+ # Redirect the empty url to cgit
+ RewriteRule ^$ /cgi-bin/cgit.cgi/ [L,PT]
+<snip>
+
+To make cgit create the correct URL's internally add to /etc/cgitrc (or your
+local config file)
+Enable virtual-root=/
+
+After these rules, you can now access cgit via http://<vhostname>/ to get the
+listing, and http://<vhostname>/repository to go directly to repository.