1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_MD5SUM
:=3b27365772d918050b2251d98a9c7c82
15 PKG_SOURCE_URL
:=ftp
://ftp.mamalinux.com
/pub
/atftp
/
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 TAR_OPTIONS
+= || true
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
28 DEPENDS
:=+libreadline
+libpcre
31 DESCRIPTION
:=TFTP client
32 URL
:=ftp
://ftp.mamalinux.com
/pub
/atftp
/
38 DEPENDS
:=atftp
+libreadline
+libpcre
40 DESCRIPTION
:=TFTP server
41 URL
:=ftp
://ftp.mamalinux.com
/pub
/atftp
/
44 define Package
/atftpd
/postinst
46 grep
-q
'^tftp[[:space:]]*69/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
47 if
[ $$?
-ne
0 ]; then
48 echo
"tftp 69/tcp" >>$${IPKG_INSTROOT}/etc
/services
49 echo
"tftp 69/udp" >>$${IPKG_INSTROOT}/etc
/services
50 echo
"tftp-mcast 1758/tcp" >>$${IPKG_INSTROOT}/etc
/services
51 echo
"tftp-mcast 1758/udp" >>$${IPKG_INSTROOT}/etc
/services
56 rm -rf
$(PKG_INSTALL_DIR
)
57 mkdir
-p
$(PKG_INSTALL_DIR
)
58 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
59 $(TARGET_CONFIGURE_OPTS
) \
60 CFLAGS
="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \
61 DESTDIR
=$(PKG_INSTALL_DIR
) \
65 define Package
/atftp
/install
66 install -m0755
-d
$(1)/usr
/sbin
67 $(CP
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(1)/usr
/sbin
70 define Package
/atftpd
/install
71 install -m0755
-d
$(1)/usr
/sbin
72 $(CP
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(1)/usr
/sbin
/
75 $(eval
$(call BuildPackage
,atftp
))
76 $(eval
$(call BuildPackage
,atftpd
))