From 4384ef8d72f383368ad544af4a2301b9a74d1323 Mon Sep 17 00:00:00 2001 From: landry Date: Sun, 3 Apr 2011 10:27:24 +0000 Subject: [PATCH] Import cgit 0.8.3.5: cgit is a fast web interface for the git scm, using a builtin cache to decrease server io-pressure. With tweaks from and ok sthen@ jasper@ --- www/cgit/Makefile | 34 +++++++++++++++++++++++++++++++++ www/cgit/distinfo | 5 +++++ www/cgit/files/cgit.conf | 7 +++++++ www/cgit/patches/patch-Makefile | 25 ++++++++++++++++++++++++ www/cgit/pkg/DESCR | 2 ++ www/cgit/pkg/MESSAGE | 8 ++++++++ www/cgit/pkg/PLIST | 7 +++++++ 7 files changed, 88 insertions(+) create mode 100644 www/cgit/Makefile create mode 100644 www/cgit/distinfo create mode 100644 www/cgit/files/cgit.conf create mode 100644 www/cgit/patches/patch-Makefile create mode 100644 www/cgit/pkg/DESCR create mode 100644 www/cgit/pkg/MESSAGE create mode 100644 www/cgit/pkg/PLIST diff --git a/www/cgit/Makefile b/www/cgit/Makefile new file mode 100644 index 00000000000..d2290471214 --- /dev/null +++ b/www/cgit/Makefile @@ -0,0 +1,34 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2011/04/03 10:27:24 landry Exp $ + +COMMENT = web frontend for git repositories + +DISTNAME = cgit-0.8.3.5 +CATEGORIES = www devel + +MASTER_SITES = http://hjemli.net/git/cgit/snapshot/ +HOMEPAGE = http://hjemli.net/git/cgit/about/ + +# GPLv2 +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM = Yes +PERMIT_DISTFILES_FTP = Yes + +USE_GMAKE = yes + +MODULES = converters/libiconv +BUILD_DEPENDS = devel/git:patch +WANTLIB += c crypto pthread z + +PREFIX = /var/www +MAKE_FLAGS += V=1 NEEDS_LIBICONV=1 LDFLAGS+=-L${LOCALBASE}/lib + +post-extract: + rmdir ${WRKSRC}/git + ln -s ${WRKDIR}/devel/git/git-* ${WRKSRC}/git + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/conf/modules.sample + ${INSTALL_DATA} ${FILESDIR}/cgit.conf ${PREFIX}/conf/modules.sample/cgit.conf.dist + +.include diff --git a/www/cgit/distinfo b/www/cgit/distinfo new file mode 100644 index 00000000000..e04bbf8dba1 --- /dev/null +++ b/www/cgit/distinfo @@ -0,0 +1,5 @@ +MD5 (cgit-0.8.3.5.tar.gz) = xGFmxMaPfHeFpKjQwMRZWA== +RMD160 (cgit-0.8.3.5.tar.gz) = ciBwIyMsaftwtuvhvUV7QYi4GAM= +SHA1 (cgit-0.8.3.5.tar.gz) = sEGgYhJALPokm+xfeS2xs/G1ACI= +SHA256 (cgit-0.8.3.5.tar.gz) = 0jxqee6kpPe8bNMRwbu0myglq+qHkGf102CVUYOhbYc= +SIZE (cgit-0.8.3.5.tar.gz) = 64227 diff --git a/www/cgit/files/cgit.conf b/www/cgit/files/cgit.conf new file mode 100644 index 00000000000..61287acb809 --- /dev/null +++ b/www/cgit/files/cgit.conf @@ -0,0 +1,7 @@ +ScriptAlias /cgit /cgi-bin/cgit.cgi + + AllowOverride None + Options +ExecCGI + Order allow,deny + Allow from all + diff --git a/www/cgit/patches/patch-Makefile b/www/cgit/patches/patch-Makefile new file mode 100644 index 00000000000..7df90b2eac3 --- /dev/null +++ b/www/cgit/patches/patch-Makefile @@ -0,0 +1,25 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2011/04/03 10:27:24 landry Exp $ +--- Makefile.orig Mon Sep 27 08:00:47 2010 ++++ Makefile Fri Feb 25 23:25:12 2011 +@@ -1,9 +1,9 @@ + CGIT_VERSION = v0.8.3.4 + CGIT_SCRIPT_NAME = cgit.cgi +-CGIT_SCRIPT_PATH = /var/www/htdocs/cgit +-CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) +-CGIT_CONFIG = /etc/cgitrc +-CACHE_ROOT = /var/cache/cgit ++CGIT_SCRIPT_PATH = /var/www/cgi-bin ++CGIT_DATA_PATH = /var/www/htdocs ++CGIT_CONFIG = /conf/cgitrc ++CACHE_ROOT = /tmp/cgit + SHA1_HEADER = + GIT_VER = 1.7.3 + GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 +@@ -111,6 +111,7 @@ VERSION: force-version + + + CFLAGS += -g -Wall -Igit ++CFLAGS += -I${LOCALBASE}/include + CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' + CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' + CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' diff --git a/www/cgit/pkg/DESCR b/www/cgit/pkg/DESCR new file mode 100644 index 00000000000..f85c78adb25 --- /dev/null +++ b/www/cgit/pkg/DESCR @@ -0,0 +1,2 @@ +This is an attempt to create a fast web interface for the git scm, +using a builtin cache to decrease server io-pressure. diff --git a/www/cgit/pkg/MESSAGE b/www/cgit/pkg/MESSAGE new file mode 100644 index 00000000000..42efc262cec --- /dev/null +++ b/www/cgit/pkg/MESSAGE @@ -0,0 +1,8 @@ +To enable cgit please create a symbolic link from + ${PREFIX}/conf/modules.sample/cgit.conf +to ${PREFIX}/conf/modules/cgit.conf. + +ln -s ../modules.sample/cgit.conf ${PREFIX}/conf/modules + +By default, The cgitrc config file is searched in +${PREFIX}/conf/cgitrc diff --git a/www/cgit/pkg/PLIST b/www/cgit/pkg/PLIST new file mode 100644 index 00000000000..6b62b27102b --- /dev/null +++ b/www/cgit/pkg/PLIST @@ -0,0 +1,7 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2011/04/03 10:27:24 landry Exp $ +@group daemon +@bin cgi-bin/cgit.cgi +conf/modules.sample/cgit.conf.dist +@sample conf/modules.sample/cgit.conf +htdocs/cgit.css +htdocs/cgit.png