You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB

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