lede-packages-rs

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

Makefile (1908B)


      1 #
      2 # Copyright (C) 2012-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 include $(TOPDIR)/rules.mk
      8 
      9 PKG_NAME:=tgt
     10 PKG_VERSION:=1.0.65
     11 PKG_REV:=c8f86393d2ea3f37b64963f66af240f17d88b43d
     12 PKG_RELEASE:=1
     13 PKG_USE_MIPS16:=0
     14 
     15 PKG_SOURCE_PROTO:=git
     16 PKG_SOURCE_URL:=https://github.com/fujita/tgt.git
     17 
     18 PKG_SOURCE_VERSION:=$(PKG_REV)
     19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
     20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
     21 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
     22 PKG_LICENSE:=GPL-2.0
     23 
     24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
     25 
     26 include $(INCLUDE_DIR)/package.mk
     27 
     28 define Package/tgt
     29   SECTION:=net
     30   CATEGORY:=Network
     31   URL:=http://stgt.sourceforge.net/
     32   TITLE:=userspace iSCSI target
     33   DEPENDS:=+libpthread +libaio @KERNEL_AIO @KERNEL_DIRECT_IO
     34 endef
     35 
     36 define Package/tgt/description
     37 Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
     38 Key goals of the project are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.
     39 Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20.
     40 Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine).
     41 endef
     42 
     43 define Build/Compile
     44 	CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR) \
     45 		DESTDIR="$(PKG_INSTALL_DIR)" \
     46 		LD="$(TARGET_CC)" \
     47 		install-programs
     48 endef
     49 
     50 define Package/tgt/conffiles
     51 /etc/config/tgt
     52 endef
     53 
     54 define Package/tgt/install
     55 	$(INSTALL_DIR) $(1)/
     56 	$(INSTALL_DIR) $(1)/usr/sbin
     57 	$(CP) ./files/* $(1)/
     58 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(1)/usr/sbin/
     59 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
     60 endef
     61 
     62 $(eval $(call BuildPackage,tgt))