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