Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= dropbear
  5. PKG_VERSION:= 0.52
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= 1c69ec674481d7745452f68f2ea5597e
  8. PKG_DESCR:= SSH 2 server/client designed for embedded systems
  9. PKG_SECTION:= net/security
  10. PKG_URL:= http://matt.ucc.asn.au/dropbear
  11. PKG_SITES:= http://matt.ucc.asn.au/dropbear/releases/
  12. PKG_DESCR_UTIL:= Utility for converting SSH private keys
  13. include $(TOPDIR)/mk/package.mk
  14. $(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  15. $(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_UTIL},${PKG_SECTION}))
  16. PKGDFLT_DROPBEAR:= y if !ADK_TOOLCHAIN_ONLY
  17. BUILD_STYLE:= manual
  18. INSTALL_STYLE:= manual
  19. CONFIGURE_ARGS+= --disable-pam \
  20. --enable-openpty \
  21. --enable-syslog \
  22. --enable-shadow \
  23. --disable-lastlog \
  24. --disable-utmp \
  25. --disable-utmpx \
  26. --disable-wtmp \
  27. --disable-wtmpx \
  28. --disable-loginfunc \
  29. --disable-pututline \
  30. --disable-pututxline \
  31. --disable-zlib
  32. pre-configure:
  33. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(WRKBUILD)/options.h
  34. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(WRKBUILD)/options.h
  35. do-build:
  36. cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
  37. PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 SCPPROGRESS=1
  38. cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
  39. PROGRAMS=dropbearconvert
  40. do-install:
  41. # main package
  42. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
  43. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
  44. $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
  45. $(IDIR_DROPBEAR)/usr/sbin/dropbear
  46. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
  47. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
  48. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
  49. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
  50. # subpackage dropbearconvert
  51. $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
  52. $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
  53. $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
  54. # ssh pubkey
  55. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  56. mkdir -p $(IDIR_DROPBEAR)/etc/dropbear; \
  57. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  58. >$(IDIR_DROPBEAR)/etc/dropbear/authorized_keys; \
  59. )
  60. include ${TOPDIR}/mk/pkg-bottom.mk