aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authortripolar <tripolar@users.noreply.github.com>2016-11-06 15:52:58 +0100
committerGitHub <noreply@github.com>2016-11-06 15:52:58 +0100
commitdf159f8777bdea696d1630db44a8b6482d12df0d (patch)
treeaa54ec312468617fa70a5d7497e1de901eae7583 /net
parentb5a42053c807225066aff1f35600661a265404dd (diff)
parent536dea0c6589a78a25087f54f0bfe929848ccfc3 (diff)
Merge pull request #2923 from cshore/pull-request-gitweb
net/git: Add building of gitweb
Diffstat (limited to 'net')
-rw-r--r--net/git/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/git/Makefile b/net/git/Makefile
index 80b377ef2..0dc6edd8c 100644
--- a/net/git/Makefile
+++ b/net/git/Makefile
@@ -53,6 +53,21 @@ $(call Package/git/description)
This package allows git push/fetch over http(s) and ftp(s)
endef
+define Package/git-gitweb
+$(call Package/git/Default)
+ TITLE:=Git repository web interface
+ DEPENDS:=git +perlbase-essential +perlbase-file +perlbase-fcntl +perlbase-encode +perlbase-digest +perlbase-time +perl-cgi
+endef
+
+define Package/git-gitweb/description
+$(call Package/git/description)
+ This package builds the gitweb web interface for git repositories
+endef
+
+define Package/git-gitweb/conffiles
+/etc/gitweb.conf
+endef
+
MAKE_FLAGS := \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
@@ -68,6 +83,11 @@ MAKE_FLAGS := \
NO_PYTHON="YesPlease" \
NO_TCLTK="YesPlease" \
NO_INSTALL_HARDLINKS="yes" \
+ gitwebdir="/www/cgi-bin" \
+ GITWEB_JS="/gitweb/gitweb.js" \
+ GITWEB_CSS="/gitweb/gitweb.css" \
+ GITWEB_LOGO="/gitweb/gitweb-logo.png" \
+ GITWEB_FAVICON="/gitweb/gitweb-favicon.png"
CONFIGURE_ARGS += \
--without-iconv \
@@ -79,6 +99,11 @@ define Build/Configure
$(call Build/Configure/Default,)
endef
+define Build/Compile
+ mkdir -p $(PKG_INSTALL_DIR)/www/cgi-bin $(PKG_INSTALL_DIR)/www/gitweb
+ $(call Build/Compile/Default,DESTDIR=$(PKG_INSTALL_DIR) all install gitweb install-gitweb)
+endef
+
define Package/git/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
@@ -109,5 +134,12 @@ define Package/git-http/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
endef
+define Package/git-gitweb/install
+ $(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
+ $(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
+endef
+
$(eval $(call BuildPackage,git))
$(eval $(call BuildPackage,git-http))
+$(eval $(call BuildPackage,git-gitweb))