Browse Source

atftp: add new package

TODO:
	- add init script for atftpd
	- merge '120-retry-option.patch' from old atftp packages.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
Daniel Danzberger 9 years ago
parent
commit
46f94304d3
2 changed files with 70 additions and 0 deletions
  1. 57
    0
      net/atftp/Makefile
  2. 13
    0
      net/atftp/patches/01-missing-u_char-type-patch.patch

+ 57
- 0
net/atftp/Makefile View File

@@ -0,0 +1,57 @@
1
+#
2
+# Copyright (C) 2006-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
+include $(TOPDIR)/rules.mk
8
+
9
+PKG_NAME:=atftp
10
+PKG_VERSION:=0.7.1
11
+PKG_RELEASE:=3
12
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
13
+PKG_LICENSE:=GPL-2.0
14
+
15
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16
+PKG_SOURCE_URL:=http://freefr.dl.sourceforge.net/project/atftp/
17
+PKG_MD5SUM:=367bf401965fbed04585b1229c2191a8
18
+
19
+PKG_BUILD_DEPENDS:=libpcre libreadline
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/atftp/Default
24
+  SECTION:=net
25
+  CATEGORY:=Network
26
+  TITLE:=TFTP
27
+  SUBMENU:=File Transfer
28
+endef
29
+
30
+define Package/atftp
31
+  $(call Package/atftp/Default)
32
+  DEPENDS:=+libreadline +libncurses
33
+  TITLE+= client
34
+endef
35
+
36
+define Package/atftpd
37
+  $(call Package/atftp/Default)
38
+  DEPENDS:=+libpcre +libpthread
39
+  TITLE+= server
40
+endef
41
+
42
+CONFIGURE_ARGS += \
43
+	--disable-libwrap
44
+
45
+define Package/atftp/install
46
+	$(INSTALL_DIR) $(1)/usr/sbin
47
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/atftp $(1)/usr/sbin/
48
+endef
49
+
50
+define Package/atftpd/install
51
+	$(INSTALL_DIR) $(1)/etc
52
+	$(INSTALL_DIR) $(1)/usr/sbin
53
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/atftpd $(1)/usr/sbin/
54
+endef
55
+
56
+$(eval $(call BuildPackage,atftp))
57
+$(eval $(call BuildPackage,atftpd))

+ 13
- 0
net/atftp/patches/01-missing-u_char-type-patch.patch View File

@@ -0,0 +1,13 @@
1
+diff --git a/tftpd.h b/tftpd.h
2
+index 945065e..4c2f214 100644
3
+--- a/tftpd.h
4
++++ b/tftpd.h
5
+@@ -46,7 +46,7 @@ struct thread_data {
6
+      char *mc_addr;             /* multicast address */
7
+      struct sockaddr_storage sa_mcast;
8
+      union ip_mreq_storage mcastaddr;
9
+-     u_char mcast_ttl;
10
++     unsigned char mcast_ttl;
11
+      
12
+      /*
13
+       * Self can read/write until client_ready is set. Then only allowed to read.