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.

56 lines
1.6 KiB

  1. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:=tgt
  5. PKG_VERSION:=1.0.75
  6. PKG_RELEASE:=2
  7. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  8. PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
  9. PKG_HASH:=1c719fdccc6ddc8e5de57a6e546aa64f41056a2fb1d710b8b2a22f65e08f5b90
  10. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_USE_MIPS16:=0
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/tgt
  15. SECTION:=net
  16. CATEGORY:=Network
  17. URL:=http://stgt.sourceforge.net/
  18. TITLE:=userspace iSCSI target
  19. DEPENDS:=+libpthread +libaio
  20. endef
  21. define Package/tgt/description
  22. The Linux target framework (tgt) is a user space SCSI target framework
  23. that supports the iSCSI and iSER transport protocols and that also
  24. supports multiple methods for accessing block storage. Tgt consists of
  25. a user-space daemon and user-space tools.
  26. endef
  27. define Build/Compile
  28. CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  29. $(MAKE) -C $(PKG_BUILD_DIR) \
  30. DESTDIR="$(PKG_INSTALL_DIR)" \
  31. LD="$(TARGET_CC)" \
  32. LDFLAGS="$(TARGET_LDFLAGS)" \
  33. install-programs
  34. endef
  35. define Package/tgt/conffiles
  36. /etc/config/tgt
  37. endef
  38. define Package/tgt/install
  39. $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin
  40. $(INSTALL_DATA) ./files/tgt.config $(1)/etc/config/tgt
  41. $(INSTALL_BIN) ./files/tgt.init $(1)/etc/init.d/tgt
  42. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
  43. endef
  44. $(eval $(call BuildPackage,tgt))