Makefile 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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.8p2
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 0541579adf9d55abb15ef927048d372e
  8. PKG_DESCR:= OpenSSH
  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_MULTI:= 1
  15. PKG_SUBPKGS:= OPENSSH OPENSSH_SERVER OPENSSH_CLIENT OPENSSH_CLIENT_UTILS
  16. PKG_SUBPKGS+= OPENSSH_SFTP_CLIENT OPENSSH_SFTP_SERVER
  17. PKGSD_OPENSSH_SERVER:= OpenSSH server
  18. PKGSD_OPENSSH_CLIENT:= OpenSSH client
  19. PKGSD_OPENSSH_CLIENT_UTILS:= OpenSSH client utilities
  20. PKGSD_OPENSSH_SFTP_CLIENT:= OpenSSH sftp client
  21. PKGSD_OPENSSH_SFTP_SERVER:= OpenSSH sftp server
  22. PKG_CHOICES_OPENSSH:= NOKRB WITH_KRB5 WITH_HEIMDAL
  23. PKGCD_NOKRB:= no Kerberos support
  24. PKGCD_WITH_KRB5:= with MIT Kerberos
  25. PKGCS_WITH_KRB5:= libkrb5 libcom-err
  26. PKGCB_WITH_KRB5:= krb5
  27. PKGCD_WITH_HEIMDAL:= with Heimdal Kerberos
  28. PKGCS_WITH_HEIMDAL:= libheimdal libcom-err
  29. PKGCB_WITH_HEIMDAL:= heimdal
  30. include ${TOPDIR}/mk/package.mk
  31. $(eval $(call PKG_template,OPENSSH,openssh,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  32. $(eval $(call PKG_template,OPENSSH_SERVER,openssh-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SERVER},${PKGSD_OPENSSH_SERVER},${PKG_SECTION}))
  33. $(eval $(call PKG_template,OPENSSH_CLIENT,openssh-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT},${PKGSD_OPENSSH_CLIENT},${PKG_SECTION}))
  34. $(eval $(call PKG_template,OPENSSH_CLIENT_UTILS,openssh-client-utils,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT_UTILS},${PKGSD_OPENSSH_CLIENT_UTILS},${PKG_SECTION}))
  35. $(eval $(call PKG_template,OPENSSH_SFTP_CLIENT,openssh-sftp-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_CLIENT},${PKGSD_OPENSSH_SFTP_CLIENT},${PKG_SECTION}))
  36. $(eval $(call PKG_template,OPENSSH_SFTP_SERVER,openssh-sftp-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_SERVER},${PKGSD_OPENSSH_SFTP_SERVER},${PKG_SECTION}))
  37. ifeq ($(ADK_PACKAGE_OPENSSH_WITH_KRB5),y)
  38. CONFIGURE_ARGS+= --with-kerberos5="${STAGING_TARGET_DIR}/usr"
  39. endif
  40. ifeq ($(ADK_PACKAGE_OPENSSH_WITH_HEIMDAL),y)
  41. CONFIGURE_ARGS+= --with-kerberos5="${STAGING_TARGET_DIR}/usr"
  42. endif
  43. ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
  44. CONFIGURE_ARGS+= --with-stackprotect
  45. else
  46. CONFIGURE_ARGS+= --without-stackprotect
  47. endif
  48. CONFIGURE_ENV+= LD='${TARGET_CC}' \
  49. ac_cv_func_setlogin=no \
  50. ac_cv_lib_nsl_yp_match=no
  51. CONFIGURE_ARGS+= --disable-strip \
  52. --disable-etc-default-login \
  53. --disable-lastlog \
  54. --disable-utmp \
  55. --disable-utmpx \
  56. --disable-wtmp \
  57. --disable-wtmpx \
  58. --without-bsd-auth \
  59. --without-rpath \
  60. --without-pam \
  61. --without-x \
  62. --without-zlib-version-check \
  63. --sysconfdir=/etc/ssh \
  64. --with-privsep-user=sshd \
  65. --with-privsep-path=/var/run/sshd \
  66. --with-ssl-dir="${STAGING_TARGET_DIR}/usr"
  67. ifeq ($(ADK_STATIC),y)
  68. TARGET_CFLAGS+= -static
  69. TARGET_LDFLAGS+= -static
  70. endif
  71. openssh-install:
  72. ${INSTALL_DIR} ${IDIR_OPENSSH}/etc/ssh
  73. chmod 0700 ${IDIR_OPENSSH}/etc/ssh
  74. openssh-server-install:
  75. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/etc/ssh
  76. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr/bin
  77. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr/sbin
  78. ${CP} ./files/sshd_config ${IDIR_OPENSSH_SERVER}/etc/ssh
  79. ${INSTALL_BIN} ${WRKINST}/usr/bin/ssh-keygen \
  80. ${IDIR_OPENSSH_SERVER}/usr/bin
  81. ${INSTALL_BIN} ${WRKINST}/usr/sbin/sshd \
  82. ${IDIR_OPENSSH_SERVER}/usr/sbin
  83. # ssh pubkey
  84. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  85. mkdir -p $(IDIR_OPENSSH_SERVER)/etc/ssh; \
  86. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  87. >$(IDIR_OPENSSH_SERVER)/etc/ssh/authorized_keys; \
  88. )
  89. openssh-client-install:
  90. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/etc/ssh
  91. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/usr/bin
  92. ${INSTALL_DATA} ${WRKINST}/etc/ssh/ssh_config \
  93. ${IDIR_OPENSSH_CLIENT}/etc/ssh
  94. ${INSTALL_BIN} ${WRKINST}/usr/bin/{ssh,scp} \
  95. ${IDIR_OPENSSH_CLIENT}/usr/bin
  96. openssh-client-utils-install:
  97. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT_UTILS}/usr/bin
  98. ${INSTALL_BIN} ${WRKINST}/usr/bin/ssh-{add,agent,keyscan} \
  99. ${IDIR_OPENSSH_CLIENT_UTILS}/usr/bin
  100. openssh-sftp-client-install:
  101. ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_CLIENT}/usr/bin
  102. ${INSTALL_BIN} ${WRKINST}/usr/bin/sftp \
  103. ${IDIR_OPENSSH_SFTP_CLIENT}/usr/bin
  104. openssh-sftp-server-install:
  105. ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_SERVER}/usr/libexec
  106. ${INSTALL_BIN} ${WRKINST}/usr/libexec/sftp-server \
  107. ${IDIR_OPENSSH_SFTP_SERVER}/usr/libexec
  108. include ${TOPDIR}/mk/pkg-bottom.mk