Makefile 2.6 KB

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