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.

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