Makefile 3.9 KB

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