diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /www-apps/cgit | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'www-apps/cgit')
| -rw-r--r-- | www-apps/cgit/Manifest | 4 | ||||
| -rw-r--r-- | www-apps/cgit/cgit-1.2.3_p20240802-r2.ebuild | 130 | ||||
| -rw-r--r-- | www-apps/cgit/cgit-1.3.ebuild | 132 | ||||
| -rw-r--r-- | www-apps/cgit/cgit-9999-r1.ebuild | 137 | ||||
| -rw-r--r-- | www-apps/cgit/cgit-9999.ebuild | 134 | ||||
| -rw-r--r-- | www-apps/cgit/files/cgit-highlight.patch | 16 | ||||
| -rw-r--r-- | www-apps/cgit/files/cgitrc | 130 | ||||
| -rw-r--r-- | www-apps/cgit/files/postinstall-en.txt | 45 | ||||
| -rw-r--r-- | www-apps/cgit/metadata.xml | 23 |
9 files changed, 751 insertions, 0 deletions
diff --git a/www-apps/cgit/Manifest b/www-apps/cgit/Manifest new file mode 100644 index 000000000000..fca8c498411d --- /dev/null +++ b/www-apps/cgit/Manifest @@ -0,0 +1,4 @@ +DIST cgit-09d24d7cd0b7e85633f2f43808b12871bb209d69.tar.xz 91940 BLAKE2B edba9ce9fe67f45a569cbefd8803281505b74885094d8c955e9b422dbdc1d253392ecb55dec5330da8096136a10fc833fe9fd7faf9aea1cc8a0e89473f3378dd SHA512 1847f06c9e695ca61967730fa8aef3ab68fb538d1b5d15c3f97afbd878d9ee993cf8d1400d48ec369a94b20e1a76368ee229b40d64ebfbc833f5e75d2b513a62 +DIST cgit-1.3.tar.xz 92248 BLAKE2B 5c5d68f6e20edb86c8a79a50c9b9baf255d8528f4a956a7f4be0f445985376ffd525f455b90a52d44f5d9e375a0146ce83807caf8d99ec26a395f3e3c09aa50f SHA512 28b7e1867809cafed6190e1984b059a7aaac3a92d8eb38bc925a58fd344347b86662309be44b6ce6625312cb127540aadd7a22b7561e96c8440144ea5eade02e +DIST git-2.46.0.tar.xz 7577180 BLAKE2B 11fd88faea8cca0982945320c0a1ff949d2abedca9ffde34d40a739349e2a7ae6ceb51a23e8c21f7985cd494d9d17abcec4769e766c3c5188162b906eb1b96bc SHA512 3afae7a094da070c627f68ceb54c2345e3a49e04e455197527b732eb220e8c3249f5d09655a59bf4280dd0c0a3e305abc1380693e0a7fb0b8138b741c4708184 +DIST git-2.53.0.tar.xz 7993096 BLAKE2B a23ccb2f793d37347e892f6094ad589510c93011a53fb2c14cdcbfbe6d87413edb4585a98253e4ca5124217f66ad783f4fa584f38dc25ffa34772da01dc45f02 SHA512 f9c0c0f527e10fe3eb524e368b1a24088bfd41097d8cac7854dae7ff21ab8ab2a1716384be53ea6174023ca5a2af3eeddca1d9feb57e447713f82e061df55c8d diff --git a/www-apps/cgit/cgit-1.2.3_p20240802-r2.ebuild b/www-apps/cgit/cgit-1.2.3_p20240802-r2.ebuild new file mode 100644 index 000000000000..248929d41f56 --- /dev/null +++ b/www-apps/cgit/cgit-1.2.3_p20240802-r2.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +PYTHON_COMPAT=( python3_{13..14} ) + +WEBAPP_MANUAL_SLOT="yes" + +inherit flag-o-matic lua-single python-single-r1 tmpfiles toolchain-funcs webapp + +[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" + +GIT_V="2.46.0" +MY_COMMIT="09d24d7cd0b7e85633f2f43808b12871bb209d69" + +DESCRIPTION="A fast web-interface for Git repositories" +HOMEPAGE="https://git.zx2c4.com/cgit/about/" +SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz + https://git.zx2c4.com/cgit/snapshot/cgit-${MY_COMMIT}.tar.xz" +S="${WORKDIR}/${PN}-${MY_COMMIT}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~riscv x86" + +IUSE="doc +highlight +lua test" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) ${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + acct-group/cgit + acct-user/cgit + dev-libs/openssl:0= + dev-vcs/git + highlight? ( + $(python_gen_cond_dep ' + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + ') + sys-apps/groff + ) + lua? ( ${LUA_DEPS} ) + virtual/zlib:= + virtual/httpd-cgi +" +# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( + app-text/docbook-xsl-stylesheets + >=app-text/asciidoc-8.5.1 + ) +" + +PATCHES=( "${FILESDIR}"/${PN}-highlight.patch ) + +pkg_setup() { + python_setup + webapp_pkg_setup + use lua && lua-single_pkg_setup +} + +src_configure() { + if ! [[ ${PV} =~ 9999* ]]; then + rmdir git || die + mv "${WORKDIR}"/git-"${GIT_V}" git || die + fi + + # bug #951555 + append-cflags -std=gnu17 + + echo "prefix = ${EPREFIX}/usr" >> cgit.conf || die "echo prefix failed" + echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf || die "echo libdir failed" + echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf || die "echo CGIT_SCRIPT_PATH failed" + echo "CGIT_DATA_PATH = ${MY_HTDOCSDIR}" >> cgit.conf || die "echo CGIT_DATA_PATH failed" + echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf || die "echo CACHE_ROOT failed" + if use lua; then + echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf || die "echo LUA_PKGCONFIG failed" + else + echo "NO_LUA = 1" >> cgit.conf || die "echo NO_LUA failed" + fi +} + +src_compile() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" + use doc && emake V=1 doc-man +} + +src_install() { + webapp_src_preinst + + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" 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 + + cat > cgit.conf <<-EOT || die + d ${CGIT_CACHEDIR} 0700 cgit cgit - + EOT + dotmpfiles cgit.conf + + python_fix_shebang . +} + +src_test() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test +} + +pkg_postinst() { + webapp_pkg_postinst + tmpfiles_process cgit.conf + ewarn "The cgit cache is enabled using the cache-size setting in cgitrc." + ewarn "If enabling the cache and running cgit using the web server's user" + ewarn "you should copy ${EROOT}/usr/lib/tmpfiles.d/cgit.conf" + ewarn "to ${EROOT}/etc/tmpfiles.d/ and edit, changing the ownership fields." + ewarn "If you use the cache-root setting in cgitrc to specify a cache directory" + ewarn "other than ${CGIT_CACHEDIR} edit the path in cgit.conf." +} diff --git a/www-apps/cgit/cgit-1.3.ebuild b/www-apps/cgit/cgit-1.3.ebuild new file mode 100644 index 000000000000..cdd2bd36f9e5 --- /dev/null +++ b/www-apps/cgit/cgit-1.3.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +PYTHON_COMPAT=( python3_{13..14} ) + +WEBAPP_MANUAL_SLOT="yes" + +inherit flag-o-matic lua-single python-single-r1 tmpfiles toolchain-funcs webapp + +[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" + +GIT_V="2.53.0" + +DESCRIPTION="A fast web-interface for Git repositories" +HOMEPAGE="https://git.zx2c4.com/cgit/about/" +SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz + https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~riscv x86" + +IUSE="doc +highlight +lua selinux test" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) ${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + acct-group/cgit + acct-user/cgit + dev-libs/openssl:0= + dev-vcs/git + highlight? ( + $(python_gen_cond_dep ' + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + ') + sys-apps/groff + ) + lua? ( ${LUA_DEPS} ) + virtual/zlib:= + virtual/httpd-cgi +" +# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( + app-text/docbook-xsl-stylesheets + >=app-text/asciidoc-8.5.1 + ) +" +RDEPEND+=" selinux? ( sec-policy/selinux-git )" + +PATCHES=( "${FILESDIR}"/${PN}-highlight.patch ) + +pkg_setup() { + python_setup + webapp_pkg_setup + use lua && lua-single_pkg_setup +} + +src_configure() { + if ! [[ ${PV} =~ 9999* ]]; then + rmdir git || die + mv "${WORKDIR}"/git-"${GIT_V}" git || die + fi + + # bug #951555 + append-cflags -std=gnu17 + + echo "prefix = ${EPREFIX}/usr" >> cgit.conf || die "echo prefix failed" + echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf || die "echo libdir failed" + echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf || die "echo CGIT_SCRIPT_PATH failed" + echo "CGIT_DATA_PATH = ${MY_HTDOCSDIR}" >> cgit.conf || die "echo CGIT_DATA_PATH failed" + echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf || die "echo CACHE_ROOT failed" + if use lua; then + echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf || die "echo LUA_PKGCONFIG failed" + else + echo "NO_LUA = 1" >> cgit.conf || die "echo NO_LUA failed" + fi + if use elibc_musl; then + echo 'export NO_REGEX=NeedsStartEnd' >> cgit.conf || die "echo export NO_REGEX=NeedsStartEnd failed" + fi +} + +src_compile() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" + use doc && emake V=1 doc-man +} + +src_install() { + webapp_src_preinst + + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" 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 + + cat > cgit.conf <<-EOT || die + d ${CGIT_CACHEDIR} 0700 cgit cgit - + EOT + dotmpfiles cgit.conf + + python_fix_shebang . +} + +src_test() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test +} + +pkg_postinst() { + webapp_pkg_postinst + tmpfiles_process cgit.conf + ewarn "The cgit cache is enabled using the cache-size setting in cgitrc." + ewarn "If enabling the cache and running cgit using the web server's user" + ewarn "you should copy ${EROOT}/usr/lib/tmpfiles.d/cgit.conf" + ewarn "to ${EROOT}/etc/tmpfiles.d/ and edit, changing the ownership fields." + ewarn "If you use the cache-root setting in cgitrc to specify a cache directory" + ewarn "other than ${CGIT_CACHEDIR} edit the path in cgit.conf." +} diff --git a/www-apps/cgit/cgit-9999-r1.ebuild b/www-apps/cgit/cgit-9999-r1.ebuild new file mode 100644 index 000000000000..6fdda7ec5c63 --- /dev/null +++ b/www-apps/cgit/cgit-9999-r1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +PYTHON_COMPAT=( python3_{13..14} ) + +WEBAPP_MANUAL_SLOT="yes" + +inherit flag-o-matic lua-single python-single-r1 tmpfiles toolchain-funcs webapp git-r3 + +[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" + +GIT_V="2.54.0" + +DESCRIPTION="A fast web-interface for Git repositories" +HOMEPAGE="https://git.zx2c4.com/cgit/about" +if [[ ${PV} =~ 9999* ]]; then + EGIT_REPO_URI="https://git.zx2c4.com/cgit" + # Often newer git updates on this branch + EGIT_COMMIT=1854c18658707741c5bf0b5eaca554e083a3729b + EGIT_BRANCH=ch/for-jason +else + SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz + https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz" +fi + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="doc +highlight +lua selinux test" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) ${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + acct-group/cgit + acct-user/cgit + dev-libs/openssl:0= + dev-vcs/git + highlight? ( + $(python_gen_cond_dep ' + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + ') + sys-apps/groff + ) + lua? ( ${LUA_DEPS} ) + virtual/zlib:= + virtual/httpd-cgi +" +# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( + app-text/docbook-xsl-stylesheets + >=app-text/asciidoc-8.5.1 + ) +" +RDEPEND+=" selinux? ( sec-policy/selinux-git )" + +PATCHES=( "${FILESDIR}"/${PN}-highlight.patch ) + +pkg_setup() { + python_setup + webapp_pkg_setup + use lua && lua-single_pkg_setup +} + +src_configure() { + if ! [[ ${PV} =~ 9999* ]]; then + rmdir git || die + mv "${WORKDIR}"/git-"${GIT_V}" git || die + fi + + # bug #951555 + append-cflags -std=gnu17 + + echo "prefix = ${EPREFIX}/usr" >> cgit.conf || die "echo prefix failed" + echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf || die "echo libdir failed" + echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf || die "echo CGIT_SCRIPT_PATH failed" + echo "CGIT_DATA_PATH = ${MY_HTDOCSDIR}" >> cgit.conf || die "echo CGIT_DATA_PATH failed" + echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf || die "echo CACHE_ROOT failed" + if use lua; then + echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf || die "echo LUA_PKGCONFIG failed" + else + echo "NO_LUA = 1" >> cgit.conf || die "echo NO_LUA failed" + fi + if use elibc_musl; then + echo 'export NO_REGEX=NeedsStartEnd' >> cgit.conf || die "echo export NO_REGEX=NeedsStartEnd failed" + fi +} + +src_compile() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" + use doc && emake V=1 doc-man +} + +src_install() { + webapp_src_preinst + + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" 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 + + cat > cgit.conf <<-EOT || die + d ${CGIT_CACHEDIR} 0700 cgit cgit - + EOT + dotmpfiles cgit.conf + + python_fix_shebang . +} + +src_test() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test +} + +pkg_postinst() { + webapp_pkg_postinst + tmpfiles_process cgit.conf + ewarn "The cgit cache is enabled using the cache-size setting in cgitrc." + ewarn "If enabling the cache and running cgit using the web server's user" + ewarn "you should copy ${EROOT}/usr/lib/tmpfiles.d/cgit.conf" + ewarn "to ${EROOT}/etc/tmpfiles.d/ and edit, changing the ownership fields." + ewarn "If you use the cache-root setting in cgitrc to specify a cache directory" + ewarn "other than ${CGIT_CACHEDIR} edit the path in cgit.conf." +} diff --git a/www-apps/cgit/cgit-9999.ebuild b/www-apps/cgit/cgit-9999.ebuild new file mode 100644 index 000000000000..25eedccbc0ee --- /dev/null +++ b/www-apps/cgit/cgit-9999.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +PYTHON_COMPAT=( python3_{13..14} ) + +WEBAPP_MANUAL_SLOT="yes" + +inherit flag-o-matic lua-single python-single-r1 tmpfiles toolchain-funcs webapp git-r3 + +[[ -z "${CGIT_CACHEDIR}" ]] && CGIT_CACHEDIR="/var/cache/${PN}/" + +GIT_V="2.46.0" + +DESCRIPTION="A fast web-interface for Git repositories" +HOMEPAGE="https://git.zx2c4.com/cgit/about" +if [[ ${PV} =~ 9999* ]]; then + EGIT_REPO_URI="https://git.zx2c4.com/cgit" +else + SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz + https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz" +fi + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="doc +highlight +lua selinux test" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) ${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + acct-group/cgit + acct-user/cgit + dev-libs/openssl:0= + dev-vcs/git + highlight? ( + $(python_gen_cond_dep ' + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + ') + sys-apps/groff + ) + lua? ( ${LUA_DEPS} ) + virtual/zlib:= + virtual/httpd-cgi +" +# ebuilds without WEBAPP_MANUAL_SLOT="yes" are broken +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( + app-text/docbook-xsl-stylesheets + >=app-text/asciidoc-8.5.1 + ) +" +RDEPEND+=" selinux? ( sec-policy/selinux-git )" + +PATCHES=( "${FILESDIR}"/${PN}-highlight.patch ) + +pkg_setup() { + python_setup + webapp_pkg_setup + use lua && lua-single_pkg_setup +} + +src_configure() { + if ! [[ ${PV} =~ 9999* ]]; then + rmdir git || die + mv "${WORKDIR}"/git-"${GIT_V}" git || die + fi + + # bug #951555 + append-cflags -std=gnu17 + + echo "prefix = ${EPREFIX}/usr" >> cgit.conf || die "echo prefix failed" + echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf || die "echo libdir failed" + echo "CGIT_SCRIPT_PATH = ${MY_CGIBINDIR}" >> cgit.conf || die "echo CGIT_SCRIPT_PATH failed" + echo "CGIT_DATA_PATH = ${MY_HTDOCSDIR}" >> cgit.conf || die "echo CGIT_DATA_PATH failed" + echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf || die "echo CACHE_ROOT failed" + if use lua; then + echo "LUA_PKGCONFIG = ${ELUA}" >> cgit.conf || die "echo LUA_PKGCONFIG failed" + else + echo "NO_LUA = 1" >> cgit.conf || die "echo NO_LUA failed" + fi + if use elibc_musl; then + echo 'export NO_REGEX=NeedsStartEnd' >> cgit.conf || die "echo export NO_REGEX=NeedsStartEnd failed" + fi +} + +src_compile() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" + use doc && emake V=1 doc-man +} + +src_install() { + webapp_src_preinst + + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" 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 + + cat > cgit.conf <<-EOT || die + d ${CGIT_CACHEDIR} 0700 cgit cgit - + EOT + dotmpfiles cgit.conf + + python_fix_shebang . +} + +src_test() { + emake V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" test +} + +pkg_postinst() { + webapp_pkg_postinst + tmpfiles_process cgit.conf + ewarn "The cgit cache is enabled using the cache-size setting in cgitrc." + ewarn "If enabling the cache and running cgit using the web server's user" + ewarn "you should copy ${EROOT}/usr/lib/tmpfiles.d/cgit.conf" + ewarn "to ${EROOT}/etc/tmpfiles.d/ and edit, changing the ownership fields." + ewarn "If you use the cache-root setting in cgitrc to specify a cache directory" + ewarn "other than ${CGIT_CACHEDIR} edit the path in cgit.conf." +} diff --git a/www-apps/cgit/files/cgit-highlight.patch b/www-apps/cgit/files/cgit-highlight.patch new file mode 100644 index 000000000000..9d03f2b0df70 --- /dev/null +++ b/www-apps/cgit/files/cgit-highlight.patch @@ -0,0 +1,16 @@ +cgit's highlighter script supports newer highlight versions, but the config has +to be patched to enable that instead of the legacy version, which does not ship +with Gentoo any more. See: https://bugs.gentoo.org/962035 + +--- a/filters/syntax-highlighting.sh ++++ b/filters/syntax-highlighting.sh +@@ -115,7 +115,7 @@ + # found (for example) on EPEL 6. + # + # This is for version 2 +-exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null ++#exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null + + # This is for version 3 +-#exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null ++exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null diff --git a/www-apps/cgit/files/cgitrc b/www-apps/cgit/files/cgitrc new file mode 100644 index 000000000000..a1d9f2f572b9 --- /dev/null +++ b/www-apps/cgit/files/cgitrc @@ -0,0 +1,130 @@ +# Enable caching of up to 1000 output entriess +#cache-size=1000 + + +# Specify some default clone prefixes +#clone-prefix=git://foobar.com ssh://foobar.com/pub/git http://foobar.com/git + +# Specify the css url +#css=/css/cgit.css + + +# Show extra links for each repository on the index page +#enable-index-links=1 + + +# Enable ASCII art commit history graph on the log pages +#enable-commit-graph=1 + + +# Show number of affected files per commit on the log pages +#enable-log-filecount=1 + + +# Show number of added/removed lines per commit on the log pages +#enable-log-linecount=1 + + +# Add a cgit favicon +#favicon=/favicon.ico + + +# Use a custom logo +#logo=/img/mylogo.png + + +# Enable statistics per week, month and quarter +#max-stats=quarter + + +# Set the title and heading of the repository index page +#root-title=foobar.com git repositories + + +# Set a subheading for the repository index page +#root-desc=tracking the foobar development + + +# Include some more info about foobar.com on the index page +#root-readme=/var/www/htdocs/about.html + + +# Allow download of tar.gz, tar.bz2 and zip-files +#snapshots=tar.gz tar.bz2 zip + + +## +## List of common mimetypes +## + +# Instead of defining mime types ourselves, grab it from etc +#mimetype-file=/etc/mime.types + +# Or do it manually here +#mimetype.gif=image/gif +#mimetype.html=text/html +#mimetype.jpg=image/jpeg +#mimetype.jpeg=image/jpeg +#mimetype.pdf=application/pdf +#mimetype.png=image/png +#mimetype.svg=image/svg+xml + + +## +## List of repositories. +## PS: Any repositories listed when section is unset will not be +## displayed under a section heading +## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos') +## and included like this: +## include=/etc/cgitrepos +## + + +#repo.url=foo +#repo.path=/pub/git/foo.git +#repo.desc=the master foo repository +#repo.owner=fooman@foobar.com +#repo.readme=info/web/about.html + + +#repo.url=bar +#repo.path=/pub/git/bar.git +#repo.desc=the bars for your foo +#repo.owner=barman@foobar.com +#repo.readme=info/web/about.html + + +# The next repositories will be displayed under the 'extras' heading +#section=extras + + +#repo.url=baz +#repo.path=/pub/git/baz.git +#repo.desc=a set of extensions for bar users + +#repo.url=wiz +#repo.path=/pub/git/wiz.git +#repo.desc=the wizard of foo + + +# Add some mirrored repositories +#section=mirrors + + +#repo.url=git +#repo.path=/pub/git/git.git +#repo.desc=the dscm + + +#repo.url=linux +#repo.path=/pub/git/linux.git +#repo.desc=the kernel + +# Disable adhoc downloads of this repo +#repo.snapshots=0 + +# Disable line-counts for this repo +#repo.enable-log-linecount=0 + +# Restrict the max statistics period for this repo +#repo.max-stats=month diff --git a/www-apps/cgit/files/postinstall-en.txt b/www-apps/cgit/files/postinstall-en.txt new file mode 100644 index 000000000000..f7c5c8cfae90 --- /dev/null +++ b/www-apps/cgit/files/postinstall-en.txt @@ -0,0 +1,45 @@ +There is a few variants of configuration: +1) Via global config file: /etc/cgitrc +2) Or via local config file, shipped in ./conf dir into webapp_dir. It has to + be explicitly specified with CGIT_CONFIG env variable in your web server + configuration. + +If you would like to update the list of git repositories in cgit automatically, +you might consider adding something similar to the following as a cronjob: + +"${MY_CGIBINDIR}/cgit.cgi --scan-tree=/git/repo-parent-path > /etc/cgit-repos" + +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. diff --git a/www-apps/cgit/metadata.xml b/www-apps/cgit/metadata.xml new file mode 100644 index 000000000000..6dd6b14c76e9 --- /dev/null +++ b/www-apps/cgit/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>zoltan@sinustrom.info</email> + <name>Zoltan Puskas</name> + </maintainer> + <maintainer type="project"> + <email>web-apps@gentoo.org</email> + <name>Gentoo Webapps</name> + </maintainer> + <longdescription lang="en"> + cgit - cgi for git + + This is an attempt to create a fast web interface for the git scm, using a + builtin cache to decrease server io-pressure. + </longdescription> + <use> + <flag name="highlight">Enable source code highlighting</flag> + <flag name="lua">Enable support for Lua scripting</flag> + </use> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
