Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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:= 2014.63
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 7066bb9a2da708f3ed06314fdc9c47fd
  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. 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 $(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. ifeq ($(ADK_STATIC),y)
  21. TARGET_LDFLAGS+= -static
  22. endif
  23. TARGET_LDFLAGS+= -static-libgcc
  24. BUILD_STYLE:= manual
  25. INSTALL_STYLE:= manual
  26. CONFIGURE_ARGS+= --disable-pam \
  27. --enable-openpty \
  28. --enable-syslog \
  29. --enable-shadow \
  30. --disable-lastlog \
  31. --disable-utmpx \
  32. --disable-wtmp \
  33. --disable-wtmpx \
  34. --disable-loginfunc \
  35. --disable-pututxline \
  36. --disable-zlib
  37. ifeq (${ADK_PACKAGE_DROPBEAR_WITH_UTMP},)
  38. CONFIGURE_ARGS+= --disable-utmp --disable-pututline
  39. else
  40. CONFIGURE_ENV+= conf_utmp_location=/var/run/utmp
  41. endif
  42. pre-configure:
  43. $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(WRKBUILD)/options.h
  44. $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(WRKBUILD)/options.h
  45. do-build:
  46. cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
  47. PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 SCPPROGRESS=1
  48. cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
  49. PROGRAMS=dropbearconvert
  50. do-install:
  51. # main package
  52. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin $(IDIR_DROPBEAR)/bin
  53. $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
  54. $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
  55. $(IDIR_DROPBEAR)/usr/sbin/dropbear
  56. ln -sf ../usr/sbin/dropbear $(IDIR_DROPBEAR)/bin/scp
  57. ln -sf ../usr/sbin/dropbear $(IDIR_DROPBEAR)/bin/ssh
  58. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
  59. ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
  60. # subpackage dropbearconvert
  61. $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
  62. $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
  63. $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
  64. # ssh pubkey
  65. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  66. $(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/dropbear; \
  67. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  68. >$(IDIR_DROPBEAR)/etc/dropbear/authorized_keys; \
  69. )
  70. include ${TOPDIR}/mk/pkg-bottom.mk