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