Makefile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.7p1
  6. PKG_RELEASE:= 4
  7. PKG_HASH:= b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507
  8. PKG_DESCR:= secure shell implementation
  9. PKG_SECTION:= net/security
  10. PKG_BUILDDEP:= zlib
  11. PKG_DEPENDS:= zlib 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_FLAVOURS_OPENSSH:= WITH_KRB5
  28. PKGFD_WITH_KRB5:= enable kerberos 5 support
  29. PKGFS_WITH_KRB5:= libkrb5 libcom-err
  30. PKGFB_WITH_KRB5:= krb5
  31. PKG_CHOICES_OPENSSH:= WITH_LIBRESSL WITH_OPENSSL
  32. PKGCD_WITH_LIBRESSL:= with libressl
  33. PKGCS_WITH_LIBRESSL:= libressl
  34. PKGCB_WITH_LIBRESSL:= libressl
  35. PKGCD_WITH_OPENSSL:= with openssl
  36. PKGCS_WITH_OPENSSL:= libopenssl
  37. PKGCB_WITH_OPENSSL:= openssl
  38. include ${ADK_TOPDIR}/mk/package.mk
  39. $(eval $(call PKG_template,OPENSSH,openssh,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  40. $(eval $(call PKG_template,OPENSSH_SERVER,openssh-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SERVER},${PKGSD_OPENSSH_SERVER},${PKG_SECTION}))
  41. $(eval $(call PKG_template,OPENSSH_CLIENT,openssh-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT},${PKGSD_OPENSSH_CLIENT},${PKG_SECTION}))
  42. $(eval $(call PKG_template,OPENSSH_CLIENT_UTILS,openssh-client-utils,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_CLIENT_UTILS},${PKGSD_OPENSSH_CLIENT_UTILS},${PKG_SECTION}))
  43. $(eval $(call PKG_template,OPENSSH_SFTP_CLIENT,openssh-sftp-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_CLIENT},${PKGSD_OPENSSH_SFTP_CLIENT},${PKG_SECTION}))
  44. $(eval $(call PKG_template,OPENSSH_SFTP_SERVER,openssh-sftp-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSH_SFTP_SERVER},${PKGSD_OPENSSH_SFTP_SERVER},${PKG_SECTION}))
  45. AUTOTOOL_STYLE:= autoreconf
  46. ifeq ($(ADK_PACKAGE_OPENSSH_WITH_KRB5),y)
  47. CONFIGURE_ARGS+= --with-kerberos5="${STAGING_TARGET_DIR}/usr"
  48. endif
  49. ifeq ($(ADK_TARGET_USE_SSP),y)
  50. CONFIGURE_ARGS+= --with-stackprotect
  51. else
  52. CONFIGURE_ARGS+= --without-stackprotect
  53. endif
  54. ifeq ($(ADK_TARGET_USE_PIE),y)
  55. CONFIGURE_ARGS+= --with-pie
  56. else
  57. CONFIGURE_ARGS+= --without-pie
  58. endif
  59. CONFIGURE_ENV+= LD='${TARGET_CC}' \
  60. ac_cv_func_setlogin=no \
  61. ac_cv_have_decl_PR_SET_NO_NEW_PRIVS=no \
  62. ac_cv_lib_nsl_yp_match=no
  63. CONFIGURE_ARGS+= --disable-strip \
  64. --disable-etc-default-login \
  65. --disable-lastlog \
  66. --with-sandbox=no \
  67. --disable-utmp \
  68. --disable-utmpx \
  69. --disable-wtmp \
  70. --disable-wtmpx \
  71. --without-bsd-auth \
  72. --without-rpath \
  73. --without-pam \
  74. --without-zlib-version-check \
  75. --sysconfdir=/etc/ssh \
  76. --with-privsep-user=sshd \
  77. --with-privsep-path=/var/run/sshd \
  78. --with-ssl-dir="${STAGING_TARGET_DIR}/usr"
  79. openssh-install:
  80. ${INSTALL_DIR} ${IDIR_OPENSSH}/etc/ssh
  81. chmod 0700 ${IDIR_OPENSSH}/etc/ssh
  82. openssh-server-install:
  83. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/etc/ssh
  84. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr/bin
  85. ${INSTALL_DIR} ${IDIR_OPENSSH_SERVER}/usr/sbin
  86. ${CP} ./files/sshd_config ${IDIR_OPENSSH_SERVER}/etc/ssh
  87. ${INSTALL_BIN} ${WRKINST}/usr/bin/ssh-keygen \
  88. ${IDIR_OPENSSH_SERVER}/usr/bin
  89. ${INSTALL_BIN} ${WRKINST}/usr/sbin/sshd \
  90. ${IDIR_OPENSSH_SERVER}/usr/sbin
  91. # ssh pubkey
  92. test -z $(ADK_RUNTIME_SSH_PUBKEY) || ( \
  93. mkdir -p $(IDIR_OPENSSH_SERVER)/etc/ssh; \
  94. echo $(ADK_RUNTIME_SSH_PUBKEY) \
  95. >$(IDIR_OPENSSH_SERVER)/etc/ssh/authorized_keys; \
  96. )
  97. openssh-client-install:
  98. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/etc/ssh
  99. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT}/usr/bin
  100. ${INSTALL_DATA} ${WRKINST}/etc/ssh/ssh_config \
  101. ${IDIR_OPENSSH_CLIENT}/etc/ssh
  102. ${INSTALL_BIN} ${WRKINST}/usr/bin/{ssh,scp} \
  103. ${IDIR_OPENSSH_CLIENT}/usr/bin
  104. openssh-client-utils-install:
  105. ${INSTALL_DIR} ${IDIR_OPENSSH_CLIENT_UTILS}/usr/bin
  106. ${INSTALL_BIN} ${WRKINST}/usr/bin/ssh-{add,agent,keyscan} \
  107. ${IDIR_OPENSSH_CLIENT_UTILS}/usr/bin
  108. openssh-sftp-client-install:
  109. ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_CLIENT}/usr/bin
  110. ${INSTALL_BIN} ${WRKINST}/usr/bin/sftp \
  111. ${IDIR_OPENSSH_SFTP_CLIENT}/usr/bin
  112. openssh-sftp-server-install:
  113. ${INSTALL_DIR} ${IDIR_OPENSSH_SFTP_SERVER}/usr/libexec
  114. ${INSTALL_BIN} ${WRKINST}/usr/libexec/sftp-server \
  115. ${IDIR_OPENSSH_SFTP_SERVER}/usr/libexec
  116. include ${ADK_TOPDIR}/mk/pkg-bottom.mk