Makefile 2.6 KB

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