diff options
Diffstat (limited to 'main/openssh/APKBUILD')
-rw-r--r-- | main/openssh/APKBUILD | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/main/openssh/APKBUILD b/main/openssh/APKBUILD new file mode 100644 index 0000000000..0b22131d4b --- /dev/null +++ b/main/openssh/APKBUILD @@ -0,0 +1,92 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=openssh +pkgver=5.8_p2 +_myver=${pkgver%_*}${pkgver#*_} +pkgrel=0 +pkgdesc="Port of OpenBSD's free SSH release" +url="http://www.openssh.org/portable.html" +arch="all" +license="as-is" +depends="openssh-client" +makedepends="openssl-dev zlib-dev" +subpackages="$pkgname-doc $pkgname-client" +source="ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$pkgname-$_myver.tar.gz + http://www.psc.edu/networking/projects/hpn-ssh/openssh${pkgver%_*}-dynwindow_noneswitch.diff.gz + http://www.psc.edu/networking/projects/hpn-ssh/openssh${pkgver%_*}-peaktput.diff + sshd.initd + sshd.confd + " + +_builddir="$srcdir"/$pkgname-$_myver +prepare() { + cd "$_builddir" + for i in $source; do + case "$i" in + *.diff.gz) + msg "Applying $i" + gunzip -c "$srcdir"/"${i##*/}" | patch -p1 -N || return 1 + ;; + *.diff) + msg "Applying $i" + patch -p1 -N -i "$srcdir"/${i##*/} + if [ $? -gt 1 ]; then + return 1 + fi + ;; + esac + done + sed -i -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \ + pathnames.h || return 1 + +} + +build () +{ + cd "$_builddir" + ./configure --prefix=/usr \ + --with-mantype=man \ + --mandir=/usr/share/man \ + --with-ldflags="${LDFLAGS}" \ + --disable-strip \ + --disable-lastlog \ + --sysconfdir=/etc/ssh \ + --datadir=/usr/share/openssh \ + --with-privsep-path=/var/empty \ + --with-privsep-user=sshd \ + --with-md5-passwords \ + --with-ssl-engine \ + --libexecdir=/usr/lib/ssh \ + --without-tcp-wrappers \ + --without-pam \ + || return 1 + make +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + mkdir -p "$pkgdir"/var/empty + install -D -m755 "$srcdir"/sshd.initd "$pkgdir"/etc/init.d/sshd + install -D -m644 "$srcdir"/sshd.confd "$pkgdir"/etc/conf.d/sshd +} + +client() { + pkgdesc="OpenBSD's SSH client" + replaces="openssh" + install -d "$subpkgdir"/usr/bin \ + "$subpkgdir"/usr/lib/ssh \ + "$subpkgdir"/etc/ssh \ + "$subpkgdir"/var/run \ + "$subpkgdir"/var/empty + + mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/lib/ssh/ssh-keysign "$subpkgdir"/usr/lib/ssh/ + mv "$pkgdir"/etc/ssh/ssh_config "$pkgdir"/etc/ssh/moduli \ + "$subpkgdir"/etc/ssh/ +} + +md5sums="88a4a83b0e0e60cd545430d4e4bd7e0c openssh-5.8p2.tar.gz +4c96723cb6dd02f76fe263c4d68c6a6f openssh5.8-dynwindow_noneswitch.diff.gz +578fb646bab2d312172ec716970031b1 openssh5.8-peaktput.diff +dda71d60ff5b4fbb61ad99fe83de6bc3 sshd.initd +b35e9f3829f4cfca07168fcba98749c7 sshd.confd" |