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.

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