1
0

Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:= 2017.75
  6. PKG_RELEASE:= 2
  7. PKG_HASH:= 6cbc1dcb1c9709d226dff669e5604172a18cf5dbf9a201474d5618ae4465098c
  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)/etc/dropbear
  49. $(INSTALL_DIR) $(IDIR_DROPBEAR)/bin
  50. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
  51. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
  52. $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
  53. $(IDIR_DROPBEAR)/usr/sbin/dropbear
  54. ln -sf ../usr/sbin/dropbear $(IDIR_DROPBEAR)/bin/scp
  55. ln -sf ../usr/sbin/dropbear $(IDIR_DROPBEAR)/bin/ssh
  56. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
  57. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
  58. # subpackage dropbearconvert
  59. $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
  60. $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
  61. $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
  62. # ssh pubkey
  63. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  64. $(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/dropbear; \
  65. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  66. >$(IDIR_DROPBEAR)/etc/dropbear/authorized_keys; \
  67. )
  68. include ${ADK_TOPDIR}/mk/pkg-bottom.mk