blob: 17d846c2dbb2b661bf8a195c3d4ef16586a31a6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openssh
pkgver=5.9_p1
_myver=${pkgver%_*}${pkgver#*_}
pkgrel=1
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
openssh${pkgver%_*}-dynwindow_noneswitch.diff
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"
depends=
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="afe17eee7e98d3b8550cc349834a85d0 openssh-5.9p1.tar.gz
f3db05e57e7af4cb2b55b85117652ed3 openssh5.9-dynwindow_noneswitch.diff
949ff348573438163240c60d6c3618eb openssh5.9-peaktput.diff
cb0dd08c413fad346f0c594107b4a2e0 sshd.initd
b35e9f3829f4cfca07168fcba98749c7 sshd.confd"
|