2 # Copyright (C) 2012-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
11 PKG_REV
:=013223dc886a03719ca02db52162056249d99448
12 PKG_MIRROR_HASH
:=649bd012ab0944644ff83cc2974e7a5c374d568e0f4328d9f8d352d4b59f73bb
17 PKG_SOURCE_URL
:=https
://github.com
/fujita
/tgt.git
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
>
25 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_SUBDIR
)
27 include $(INCLUDE_DIR
)/package.mk
32 URL
:=http
://stgt.sourceforge.net
/
33 TITLE
:=userspace iSCSI target
34 DEPENDS
:=+libpthread
+libaio @KERNEL_AIO
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
).
45 CC
=$(TARGET_CC
) CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
46 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
47 DESTDIR
="$(PKG_INSTALL_DIR)" \
49 LDFLAGS
="$(TARGET_LDFLAGS)" \
53 define Package
/tgt
/conffiles
57 define Package
/tgt
/install
59 $(INSTALL_DIR
) $(1)/usr
/sbin
61 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/tgtd
$(1)/usr
/sbin
/
62 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/tgtadm
$(1)/usr
/sbin
/
65 $(eval
$(call BuildPackage
,tgt
))