PATCH_LIST="move-moduli.diff setlogin.diff" FILE_LIST= MAKEDEPENDS=( "tcp_wrappers-*:::*.a *.h" "openssl-*:::*.so *.so.* *.h" "zlib-*:::*.so *.h *.so.*" ) SRC_FETCH_PATH="http://ftp2.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.7p1.tar.gz" SRC_FETCH_METHOD="http" # only these two targets depend on libresolv function do_config { CFLAGS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL -g0 -Dcrypt=DES_crypt" \ LD_LIBRARY_PATH=$FLXROOTDIR/usr/lib/ \ ./configure --prefix=/usr --sysconfdir=/etc/ssh --datadir=/usr/share/openssh \ --libexecdir=/usr/bin --with-pid-dir=/var/run \ --without-pam --with-md5-passwords --with-shadow --with-tcp-wrappers \ --with-ssl-dir=$FLXROOTDIR/usr/lib/ \ --with-ipaddr-display --with-ipv4-default --without-4in6i \ --host=$FLXTARGARCH --build=$FLXHOSTARCH ###--libexecdir=/usr/bin --with-pid-dir=/var/run \ } function do_compile_only { local ARGS="ASKPASS_LOCATION=/usr/bin AR=$AR RANLIB=$RANLIB LD=$CC" $FLXPMAKE $ARGS ssh LIBS="-lcrypto -lresolv -lz " || exit $? $FLXPMAKE $ARGS scp LIBS="" || exit $? $FLXPMAKE $ARGS sftp sftp-server LIBS="-lcrypto" || exit $? $FLXPMAKE $ARGS ssh-rand-helper ssh-agent ssh-add LIBS="-lcrypto" || exit $? $FLXPMAKE $ARGS ssh-keyscan ssh-keysign LIBS="-lcrypto -lz" || exit $? $FLXPMAKE $ARGS sshd LIBS="-lcrypto -lz -lutil " || exit $? $FLXPMAKE $ARGS ssh-keygen LIBS="-lcrypto -lresolv" || exit $? # $FLXPMAKE $ARGS all } function do_prepack { $FLXMAKE install DESTDIR=$ROOTDIR if [ -L $ROOTDIR/usr/bin/slogin ]; then # this link is a bit wrong rm -f $ROOTDIR/usr/bin/slogin ln -s ssh $ROOTDIR/usr/bin/slogin fi mv $ROOTDIR/etc/ssh/moduli $ROOTDIR/usr/share/openssh/ mkdir -m 0755 -p $ROOTDIR/usr/share/examples/openssh #mkdir -m 0500 -p $ROOTDIR/var/empty ( rmdir $ROOTDIR/var/empty && rmdir $ROOTDIR/var; ) 2>/dev/null rm -rf $ROOTDIR/etc/ssh/ssh_host_* mv $ROOTDIR/etc $EXAMPLEDIR/$PKGRADIX/ mv $EXAMPLEDIR/$PKGRADIX/etc/ssh/sshd_config $EXAMPLEDIR/$PKGRADIX/etc/ssh/sshd_config.default cp $PKGDIR/add-ons/sshd_config $EXAMPLEDIR/$PKGRADIX/etc/ssh/ mkdir -p $ROOTDIR/etc/ssh $ROOTDIR/sbin/init.d cp $PKGDIR/add-ons/sshd $ROOTDIR/sbin/init.d/ cd $ROOTDIR set_default_perm $ROOTDIR set_perm root:adm 751 $ROOTDIR/etc/ssh set_perm root:adm 755 $ROOTDIR/sbin/init.d/sshd set_perm root:adm 644 $EXAMPLEDIR/$PKGRADIX/etc/ssh/sshd_config }