No Description

Makefile 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/tgt
  20. SECTION:=net
  21. CATEGORY:=Network
  22. URL:=http://stgt.sourceforge.net/
  23. TITLE:=userspace iSCSI target
  24. DEPENDS:=+libpthread +libaio +@KERNEL_AIO +@KERNEL_DIRECT_IO
  25. endef
  26. define Package/tgt/description
  27. Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
  28. Key goals of the project are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.
  29. Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20.
  30. Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine).
  31. endef
  32. define Build/Compile
  33. CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR) \
  34. DESTDIR="$(PKG_INSTALL_DIR)" \
  35. LD="$(TARGET_CC)" \
  36. install-programs
  37. endef
  38. define Package/tgt/conffiles
  39. /etc/config/tgt
  40. endef
  41. define Package/tgt/install
  42. $(INSTALL_DIR) $(1)/
  43. $(INSTALL_DIR) $(1)/usr/sbin
  44. $(CP) ./files/* $(1)/
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(1)/usr/sbin/
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
  47. endef
  48. $(eval $(call BuildPackage,tgt))