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.73
  9. PKG_REV:=013223dc886a03719ca02db52162056249d99448
  10. PKG_MIRROR_HASH:=649bd012ab0944644ff83cc2974e7a5c374d568e0f4328d9f8d352d4b59f73bb
  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))