1
0

Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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:= 4
  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_DFLT_DROPBEAR:= y if !ADK_TOOLCHAIN_ONLY
  13. PKG_SUBPKGS:= DROPBEAR DBCONVERT
  14. PKGSD_DBCONVERT:= Utility for converting SSH private keys
  15. include $(TOPDIR)/mk/package.mk
  16. $(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  17. $(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBCONVERT},${PKG_SECTION}))
  18. BUILD_STYLE:= manual
  19. INSTALL_STYLE:= manual
  20. CONFIGURE_ARGS+= --disable-pam \
  21. --enable-openpty \
  22. --enable-syslog \
  23. --enable-shadow \
  24. --disable-lastlog \
  25. --disable-utmp \
  26. --disable-utmpx \
  27. --disable-wtmp \
  28. --disable-wtmpx \
  29. --disable-loginfunc \
  30. --disable-pututline \
  31. --disable-pututxline \
  32. --disable-zlib
  33. pre-configure:
  34. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(WRKBUILD)/options.h
  35. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(WRKBUILD)/options.h
  36. do-build:
  37. cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
  38. PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 SCPPROGRESS=1
  39. cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
  40. PROGRAMS=dropbearconvert
  41. do-install:
  42. # main package
  43. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
  44. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
  45. $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
  46. $(IDIR_DROPBEAR)/usr/sbin/dropbear
  47. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
  48. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
  49. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
  50. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
  51. # subpackage dropbearconvert
  52. $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
  53. $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
  54. $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
  55. # ssh pubkey
  56. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  57. $(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/dropbear; \
  58. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  59. >$(IDIR_DROPBEAR)/etc/dropbear/authorized_keys; \
  60. )
  61. include ${TOPDIR}/mk/pkg-bottom.mk