2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=ftp
://ftp.mamalinux.com
/pub
/atftp
/
17 PKG_MD5SUM
:=3b27365772d918050b2251d98a9c7c82
19 TAR_OPTIONS
+= || true
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/atftp
/Default
30 URL
:=ftp
://ftp.mamalinux.com
/pub
/atftp
/
34 $(call Package
/atftp
/Default
)
35 DEPENDS
:=+libreadline
+libpcre
40 $(call Package
/atftp
/Default
)
41 DEPENDS
:=+libreadline
+libpcre
45 define Package
/atftpd
/postinst
47 grep
-q
'^tftp[[:space:]]*69/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
48 if
[ $$?
-ne
0 ]; then
49 echo
"tftp 69/tcp" >>$${IPKG_INSTROOT}/etc
/services
50 echo
"tftp 69/udp" >>$${IPKG_INSTROOT}/etc
/services
51 echo
"tftp-mcast 1758/tcp" >>$${IPKG_INSTROOT}/etc
/services
52 echo
"tftp-mcast 1758/udp" >>$${IPKG_INSTROOT}/etc
/services
59 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
60 $(TARGET_CONFIGURE_OPTS
) \
61 CFLAGS
="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \
65 define Package
/atftp
/install
66 $(INSTALL_DIR
) $(1)/usr
/sbin
67 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/atftp
$(1)/usr
/sbin
70 define Package
/atftpd
/install
71 $(INSTALL_DIR
) $(1)/usr
/sbin
72 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/atftpd
$(1)/usr
/sbin
/
75 $(eval
$(call BuildPackage
,atftp
))
76 $(eval
$(call BuildPackage
,atftpd
))