1
0

Makefile 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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:= openssh
  5. PKG_VERSION:= 6.6p1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 3e9800e6bca1fbac0eea4d41baa7f239
  8. PKG_DESCR:= secure shell implementation
  9. PKG_SECTION:= net/security
  10. PKG_BUILDDEP:= zlib openssl
  11. PKG_DEPENDS:= zlib libopenssl libpthread
  12. PKG_URL:= http://www.openssh.com/
  13. PKG_SITES:= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
  14. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
  15. PKG_SUBPKGS:= OPENSSH OPENSSH_SERVER OPENSSH_CLIENT OPENSSH_CLIENT_UTILS
  16. PKG_SUBPKGS+= OPENSSH_SFTP_CLIENT OPENSSH_SFTP_SERVER
  17. PKGSD_OPENSSH_SERVER:= secure shell server
  18. PKGSN_OPENSSH_SERVER:= openssh
  19. PKGSD_OPENSSH_CLIENT:= secure shell client
  20. PKGSN_OPENSSH_CLIENT:= openssh
  21. PKGSD_OPENSSH_CLIENT_UTILS:= client utilities
  22. PKGSN_OPENSSH_CLIENT_UTILS:= openssh
  23. PKGSD_OPENSSH_SFTP_CLIENT:= sftp client
  24. PKGSN_OPENSSH_SFTP_CLIENT:= openssh
  25. PKGSD_OPENSSH_SFTP_SERVER:= sftp server
  26. PKGSN_OPENSSH_SFTP_SERVER:= openssh
  27. PKG_CHOICES_OPENSSH:= NOKRB WITH_KRB5
  28. PKGCD_NOKRB:= no Kerberos support
  29. PKGCD_WITH_KRB5:= with MIT Kerberos
  30. PKGCS_WITH_KRB5:= libkrb5 libcom-err
  31. PKGCB_WITH_KRB5:= krb5
  32. include ${ADK_TOPDIR}/mk/package.mk
  33. $(eval $(call PKG_template,OPENSSH,openssh,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  34. $(eval $(call PKG_template,OPENSSH_SERVER,openssh-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SERVER},${PKGSD_OPENSSH_SERVER},${PKG_SECTION}))
  35. $(eval $(call PKG_template,OPENSSH_CLIENT,openssh-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT},${PKGSD_OPENSSH_CLIENT},${PKG_SECTION}))
  36. $(eval $(call PKG_template,OPENSSH_CLIENT_UTILS,openssh-client-utils,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT_UTILS},${PKGSD_OPENSSH_CLIENT_UTILS},${PKG_SECTION}))
  37. $(eval $(call PKG_template,OPENSSH_SFTP_CLIENT,openssh-sftp-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_CLIENT},${PKGSD_OPENSSH_SFTP_CLIENT},${PKG_SECTION}))
  38. $(eval $(call PKG_template,OPENSSH_SFTP_SERVER,openssh-sftp-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_SERVER},${PKGSD_OPENSSH_SFTP_SERVER},${PKG_SECTION}))
  39. ifeq ($(ADK_PACKAGE_OPENSSH_WITH_KRB5),y)
  40. CONFIGURE_ARGS+= --with-kerberos5="${STAGING_TARGET_DIR}/usr"
  41. endif
  42. ifeq ($(ADK_TARGET_USE_SSP),y)
  43. CONFIGURE_ARGS+= --with-stackprotect
  44. else
  45. CONFIGURE_ARGS+= --without-stackprotect
  46. endif
  47. CONFIGURE_ENV+= LD='${TARGET_CC}' \
  48. ac_cv_func_setlogin=no \
  49. ac_cv_have_decl_PR_SET_NO_NEW_PRIVS=no \
  50. ac_cv_lib_nsl_yp_match=no
  51. CONFIGURE_ARGS+= --disable-strip \
  52. --disable-etc-default-login \
  53. --disable-lastlog \
  54. --with-sandbox=no \
  55. --disable-utmp \
  56. --disable-utmpx \
  57. --disable-wtmp \
  58. --disable-wtmpx \
  59. --without-bsd-auth \
  60. --without-rpath \
  61. --without-pam \
  62. --without-x \
  63. --without-zlib-version-check \
  64. --sysconfdir=/etc/ssh \
  65. --with-privsep-user=sshd \
  66. --with-privsep-path=/var/run/sshd \
  67. --with-ssl-dir="${STAGING_TARGET_DIR}/usr"
  68. openssh-install:
  69. ${INSTALL_DIR} ${IDIR_OPENSSH}/etc/ssh
  70. chmod 0700 ${IDIR_OPENSSH}/etc/ssh
  71. openssh-server-install:
  72. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/etc/ssh
  73. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr/bin
  74. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr/sbin
  75. ${CP} ./files/sshd_config ${IDIR_OPENSSH_SERVER}/etc/ssh
  76. ${INSTALL_BIN} ${WRKINST}/usr/bin/ssh-keygen \
  77. ${IDIR_OPENSSH_SERVER}/usr/bin
  78. ${INSTALL_BIN} ${WRKINST}/usr/sbin/sshd \
  79. ${IDIR_OPENSSH_SERVER}/usr/sbin
  80. # ssh pubkey
  81. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  82. mkdir -p $(IDIR_OPENSSH_SERVER)/etc/ssh; \
  83. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  84. >$(IDIR_OPENSSH_SERVER)/etc/ssh/authorized_keys; \
  85. )
  86. openssh-client-install:
  87. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/etc/ssh
  88. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/usr/bin
  89. ${INSTALL_DATA} ${WRKINST}/etc/ssh/ssh_config \
  90. ${IDIR_OPENSSH_CLIENT}/etc/ssh
  91. ${INSTALL_BIN} ${WRKINST}/usr/bin/{ssh,scp} \
  92. ${IDIR_OPENSSH_CLIENT}/usr/bin
  93. openssh-client-utils-install:
  94. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT_UTILS}/usr/bin
  95. ${INSTALL_BIN} ${WRKINST}/usr/bin/ssh-{add,agent,keyscan} \
  96. ${IDIR_OPENSSH_CLIENT_UTILS}/usr/bin
  97. openssh-sftp-client-install:
  98. ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_CLIENT}/usr/bin
  99. ${INSTALL_BIN} ${WRKINST}/usr/bin/sftp \
  100. ${IDIR_OPENSSH_SFTP_CLIENT}/usr/bin
  101. openssh-sftp-server-install:
  102. ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_SERVER}/usr/libexec
  103. ${INSTALL_BIN} ${WRKINST}/usr/libexec/sftp-server \
  104. ${IDIR_OPENSSH_SFTP_SERVER}/usr/libexec
  105. include ${ADK_TOPDIR}/mk/pkg-bottom.mk