IGNOREPATH=/boot:/dev:/home:/mnt:/proc:/root:/tmp:/var:/storage STRIPLIB=y STRIPBIN=y SETATTR=y ARCH=i386 BUILD=1 # pkginfo VERSION=2.5.2p2 PROGNAME="OpenSSH free Secure Shell (SSH) implementation" DESC="\ Ssh (Secure Shell) a program for logging into a remote machine and for \n\ executing commands in a remote machine. It is intended to replace \n\ rlogin and rsh, and provide secure encrypted communications between \n\ two untrusted hosts over an insecure network. X11 connections and \n\ arbitrary TCP/IP ports can also be forwarded over the secure channel." # maintainer MAINTAINER="Robert Stan tg " SOURCE=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ # package name PKGNAME=openssh compile() { tar xvzf $CWD/$PKGNAME-$VERSION.tar.gz cd $PKGNAME-$VERSION CFLAGS=-O2 ./configure --prefix=/usr \ --sysconfdir=/etc/ssh \ --libexecdir=/usr/libexec/ssh \ --with-tcp-wrappers \ --with-md5-passwords \ --with-ipv4-default \ --with-rsh=/usr/bin/rsh \ --disable-suid-ssh CFLAGS=-O2 make -j2 cd contrib gcc -O -g `gnome-config --cflags gnome gnomeui` \ gnome-ssh-askpass.c -o gnome-ssh-askpass \ `gnome-config --libs gnome gnomeui` cd .. } install() { make manpages install-files mkdir -p /usr/libexec/ssh cat contrib/gnome-ssh-askpass > /usr/libexec/ssh/gnome-ssh-askpass cat contrib/ssh-copy-id > /usr/bin/ssh-copy-id cat contrib/make-ssh-known-hosts.pl > /usr/bin/make-ssh-known-hosts mv -f /etc/ssh/ssh_config /etc/ssh/ssh_config.pkgbak mv -f /etc/ssh/sshd_config /etc/ssh/sshd_config.pkgbak cat ssh_config.out > /etc/ssh/ssh_config cat sshd_config.out > /etc/ssh/sshd_config mkdir -p /usr/doc/$PKGNAME-$VERSION cp COPY* CREDITS ChangeLog INSTALL LICENCE OVERVIEW READ* \ TODO WARNING.RNG /usr/doc/$PKGNAME-$VERSION } attributes() { chmod 0755 $PKG/usr/bin/* chmod 0755 $PKG/usr/sbin/* chmod 0755 $PKG/usr/libexec/ssh/* } special() { cat << EOF >> $CTL/doinst.sh # Creates hostkey if test -f etc/ssh/ssh_host_key; then echo "You already have a host key in /etc/ssh/ssh_host_key."; else usr/bin/ssh-keygen -b 1024 -f etc/ssh/ssh_host_key -N '' fi if test -f etc/ssh/ssh_host_dsa_key; then echo "You already have a host key in /etc/ssh/ssh_host_dsa_key."; else usr/bin/ssh-keygen -d -f etc/ssh/ssh_host_dsa_key -N '' fi EOF rm -f $PKG/etc/ssh/ssh_config.pkgbak rm -f $PKG/etc/ssh/sshd_config.pkgbak mv /etc/ssh/ssh_config.pkgbak /etc/ssh/ssh_config mv /etc/ssh/sshd_config.pkgbak /etc/ssh/sshd_config }