lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (4240B)


      1 #
      2 # Copyright (C) 2009-2016 OpenWrt.org
      3 #
      4 # This is free software, licensed under the GNU General Public License v2.
      5 # See /LICENSE for more information.
      6 #
      7 
      8 include $(TOPDIR)/rules.mk
      9 
     10 PKG_NAME:=git
     11 PKG_VERSION:=2.12.2
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
     15 PKG_SOURCE_URL:=@KERNEL/software/scm/git/
     16 PKG_HASH:=d21a9e23506e618d561fb25a8a7bd6134f927b86147930103487117a7a678c4a
     17 
     18 PKG_INSTALL:=1
     19 PKG_BUILD_PARALLEL:=1
     20 PKG_FIXUP:=autoreconf
     21 
     22 include $(INCLUDE_DIR)/package.mk
     23 
     24 define Package/git/Default
     25   SECTION:=net
     26   CATEGORY:=Network
     27   SUBMENU:=Version Control Systems
     28   DEPENDS:=+libopenssl +libpthread +librt +zlib
     29   URL:=http://git-scm.com
     30   MAINTAINER:=Peter Wagner <tripolar@gmx.at>
     31 endef
     32 
     33 define Package/git
     34 $(call Package/git/Default)
     35   TITLE:=The fast version control system
     36 endef
     37 
     38 define Package/git/description
     39  Git is a free & open source, distributed version control system
     40  designed to handle everything from small to very large projects
     41  with speed and efficiency.
     42 endef
     43 
     44 define Package/git-http
     45 $(call Package/git/Default)
     46   DEPENDS+=git +libcurl +ca-certificates
     47   TITLE:=Git HTTP commands
     48 endef
     49 
     50 define Package/git-http/description
     51 $(call Package/git/description)
     52 
     53  This package allows git push/fetch over http(s) and ftp(s)
     54 endef
     55 
     56 define Package/git-gitweb
     57 $(call Package/git/Default)
     58   TITLE:=Git repository web interface
     59   DEPENDS:=git +perlbase-essential +perlbase-file +perlbase-fcntl +perlbase-encode +perlbase-digest +perlbase-time +perl-cgi
     60 endef
     61 
     62 define Package/git-gitweb/description
     63 $(call Package/git/description)
     64  This package builds the gitweb web interface for git repositories
     65 endef
     66 
     67 define Package/git-gitweb/conffiles
     68 /etc/gitweb.conf
     69 endef
     70 
     71 MAKE_FLAGS := \
     72 	CC="$(TARGET_CC)" \
     73 	CFLAGS="$(TARGET_CFLAGS)" \
     74 	CPPFLAGS="$(TARGET_CPPFLAGS)" \
     75 	LDFLAGS="$(TARGET_LDFLAGS)" \
     76 	NO_EXPAT="YesPlease" \
     77 	NO_MKSTEMPS="YesPlease" \
     78 	NO_GETTEXT="YesPlease" \
     79 	NO_UNIX_SOCKETS="YesPlease" \
     80 	NO_ICONV="YesPlease" \
     81 	NO_NSEC="YesPlease" \
     82 	NO_PERL="YesPlease" \
     83 	NO_PYTHON="YesPlease" \
     84 	NO_TCLTK="YesPlease" \
     85 	NO_INSTALL_HARDLINKS="yes" \
     86 	gitwebdir="/www/cgi-bin" \
     87 	GITWEB_JS="/gitweb/gitweb.js" \
     88 	GITWEB_CSS="/gitweb/gitweb.css" \
     89 	GITWEB_LOGO="/gitweb/gitweb-logo.png" \
     90 	GITWEB_FAVICON="/gitweb/gitweb-favicon.png"
     91 
     92 CONFIGURE_ARGS += \
     93 	--without-iconv \
     94 
     95 define Build/Configure
     96 	$(MAKE) -C $(PKG_BUILD_DIR) \
     97 		configure
     98 
     99 	$(call Build/Configure/Default,)
    100 endef
    101 
    102 define Build/Compile
    103 	mkdir -p $(PKG_INSTALL_DIR)/www/cgi-bin $(PKG_INSTALL_DIR)/www/gitweb
    104 	$(call Build/Compile/Default,DESTDIR=$(PKG_INSTALL_DIR) all install gitweb install-gitweb)
    105 endef
    106 
    107 define Package/git/install
    108 	$(INSTALL_DIR) $(1)/usr/bin
    109 	$(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
    110 	$(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
    111 	$(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
    112 	$(INSTALL_DIR) $(1)/usr/lib/git-core
    113 	$(LN) /usr/bin/git $(1)/usr/lib/git-core/git
    114 	( cd $(PKG_INSTALL_DIR); $(TAR) \
    115 		--exclude=usr/lib/git-core/git-http-backend \
    116 		--exclude=usr/lib/git-core/git-http-fetch \
    117 		--exclude=usr/lib/git-core/git-remote-ftp \
    118 		--exclude=usr/lib/git-core/git-remote-ftps \
    119 		--exclude=usr/lib/git-core/git-remote-http \
    120 		--exclude=usr/lib/git-core/git-remote-https \
    121 		-cf - \
    122 		usr/lib/git-core \
    123 	) | ( cd $(1); $(TAR) -xf - )
    124 	$(INSTALL_DIR) $(1)/usr/share/git-core/templates
    125 endef
    126 
    127 define Package/git-http/install
    128 	$(INSTALL_DIR) $(1)/usr/lib/git-core
    129 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
    130 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
    131 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
    132 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
    133 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
    134 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
    135 endef
    136 
    137 define Package/git-gitweb/install
    138 	$(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
    139 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
    140 	$(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
    141 endef
    142 
    143 $(eval $(call BuildPackage,git))
    144 $(eval $(call BuildPackage,git-http))
    145 $(eval $(call BuildPackage,git-gitweb))