Makefile 3.6 KB

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