[packages] uftp: update to 4.1.4
[openwrt/svn-archive/archive.git] / net / uftp / Makefile
1 #
2 # Copyright (C) 2011-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=uftp
11 PKG_VERSION:=4.1.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar
15 PKG_SOURCE_URL:=@SF/uftp-multicast
16 PKG_MD5SUM:=9a9074a628caaabd6599e53a36a09a51
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/uftp/Default
25 SECTION:=net
26 CATEGORY:=Network
27 SUBMENU:=File Transfer
28 TITLE:=Multicast UDP FTP
29 URL:=http://uftp-multicast.sourceforge.net/
30 endef
31
32 define Package/uftp/Default/description
33 UFTP is an encrypted multicast file transfer program, designed to securely,
34 reliably, and efficiently transfer files to multiple receivers
35 simultaneously.
36 endef
37
38 define Package/uftp
39 $(call Package/uftp/Default)
40 TITLE+= server with TLS support
41 VARIANT:=tls
42 DEPENDS:=+libopenssl +libpthread
43 endef
44
45 define Package/uftp/description
46 $(call Package/uftp/Default/description)
47 This package contains the server built with TLS support.
48 endef
49
50 define Package/uftp-notls
51 $(call Package/uftp/Default)
52 TITLE+= server without TLS support
53 VARIANT:=notls
54 DEPENDS:=+libpthread
55 endef
56
57 define Package/uftp-notls/description
58 $(call Package/uftp/Default/description)
59 This package contains the server built without TLS support.
60 endef
61
62 define Package/uftpd
63 $(call Package/uftp/Default)
64 TITLE+= client daemon with TLS support
65 VARIANT:=tls
66 DEPENDS:=+libopenssl
67 endef
68
69 define Package/uftpd/description
70 $(call Package/uftp/Default/description)
71 This package contains the client daemon built with TLS support.
72 endef
73
74 define Package/uftpd-notls
75 $(call Package/uftp/Default)
76 TITLE+= client daemon without TLS support
77 VARIANT:=notls
78 endef
79
80 define Package/uftpd-notls/description
81 $(call Package/uftp/Default/description)
82 This package contains the client daemon built without TLS support.
83 endef
84
85 define Package/uftpproxyd
86 $(call Package/uftp/Default)
87 TITLE+= proxy daemon with TLS support
88 VARIANT:=tls
89 DEPENDS:=+libopenssl
90 endef
91
92 define Package/uftpproxyd/description
93 $(call Package/uftp/Default/description)
94 This package contains the proxy daemon built with TLS support.
95 endef
96
97 define Package/uftpproxyd-notls
98 $(call Package/uftp/Default)
99 TITLE+= proxy daemon without TLS support
100 VARIANT:=notls
101 endef
102
103 define Package/uftpproxyd-notls/description
104 $(call Package/uftp/Default/description)
105 This package contains the proxy daemon built without TLS support.
106 endef
107
108 define Package/uftp-keymgt
109 $(call Package/uftp/Default)
110 TITLE+= key management utility
111 VARIANT:=tls
112 DEPENDS:=+libopenssl
113 endef
114
115 define Package/uftp-keymgt/description
116 $(call Package/uftp/Default/description)
117 This package contains the key management utility.
118 endef
119
120 MAKE_FLAGS += \
121 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
122 UNAME_S="Linux"
123
124 ifeq ($(BUILD_VARIANT),tls)
125 MAKE_FLAGS += \
126 NO_EC="1" \
127 OPENSSL="$(STAGING_DIR)/usr"
128 endif
129
130 ifeq ($(BUILD_VARIANT),notls)
131 MAKE_FLAGS += \
132 NO_ENCRYPTION="1"
133 endif
134
135 define Package/uftp/install
136 $(INSTALL_DIR) $(1)/usr/bin
137 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/uftp $(1)/usr/bin/
138 endef
139
140 define Package/uftpd/install
141 $(INSTALL_DIR) $(1)/usr/sbin
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uftpd $(1)/usr/sbin/
143 endef
144
145 define Package/uftpproxyd/install
146 $(INSTALL_DIR) $(1)/usr/sbin
147 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uftpproxyd $(1)/usr/sbin/
148 endef
149
150 Package/uftp-notls/install=$(Package/uftp/install)
151 Package/uftpd-notls/install=$(Package/uftpd/install)
152 Package/uftpproxyd-notls/install=$(Package/uftpproxyd/install)
153
154 define Package/uftp-keymgt/install
155 $(INSTALL_DIR) $(1)/usr/bin
156 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/uftp_keymgt $(1)/usr/bin/
157 endef
158
159 $(eval $(call BuildPackage,uftp))
160 $(eval $(call BuildPackage,uftp-notls))
161 $(eval $(call BuildPackage,uftpd))
162 $(eval $(call BuildPackage,uftpd-notls))
163 $(eval $(call BuildPackage,uftpproxyd))
164 $(eval $(call BuildPackage,uftpproxyd-notls))
165 $(eval $(call BuildPackage,uftp-keymgt))