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
:=http
://www.mirrorservice.org
/sites
/www.ibiblio.org
/gentoo
/distfiles
/
17 PKG_MD5SUM
:=3b27365772d918050b2251d98a9c7c82
19 PKG_BUILD_DEPENDS
:=libncurses libpcre libreadline
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/atftp
/Default
31 $(call Package
/atftp
/Default
)
32 DEPENDS
:=+libreadline
+libncurses
37 $(call Package
/atftp
/Default
)
38 DEPENDS
:=+libpcre
+libpthread
42 define Package
/atftpd
/postinst
44 grep
-q
'^tftp[[:space:]]*69/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
45 if
[ $$?
-ne
0 ]; then
46 echo
"tftp 69/tcp" >>$${IPKG_INSTROOT}/etc
/services
47 echo
"tftp 69/udp" >>$${IPKG_INSTROOT}/etc
/services
48 echo
"tftp-mcast 1758/tcp" >>$${IPKG_INSTROOT}/etc
/services
49 echo
"tftp-mcast 1758/udp" >>$${IPKG_INSTROOT}/etc
/services
57 CFLAGS
="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \
60 define Package
/atftp
/install
61 $(INSTALL_DIR
) $(1)/usr
/sbin
62 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/atftp
$(1)/usr
/sbin
/
65 define Package
/atftpd
/install
66 $(INSTALL_DIR
) $(1)/etc
67 $(INSTALL_DIR
) $(1)/usr
/sbin
68 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/atftpd
$(1)/usr
/sbin
/
71 $(eval
$(call BuildPackage
,atftp
))
72 $(eval
$(call BuildPackage
,atftpd
))