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.

61 lines
1.8 KiB

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