PKGBUILDs/core/openssh/PKGBUILD

63 lines
2.2 KiB
Bash
Raw Normal View History

2009-09-26 14:35:50 +00:00
# Maintainer: Krzysztof "hiciu" Warzecha <kwarzecha7@gmail.com>
2009-09-26 16:30:17 +00:00
# Modified by OpenPogo
2009-09-26 14:35:50 +00:00
pkgname=openssh
pkgver=5.2p1
pkgrel=2
pkgdesc='A Secure SHell server/client'
arch=(arm)
license=('custom')
groups=('base')
url="http://www.openssh.org/portable.html"
2009-09-26 16:30:17 +00:00
backup=('opt/etc/ssh/ssh_config' 'opt/etc/ssh/sshd_config' 'opt/etc/pam.d/sshd')
2009-09-26 14:35:50 +00:00
depends=('openssl>=0.9.8g' 'zlib' 'pam' 'tcp_wrappers' 'heimdal>=1.2-1')
2009-09-26 16:30:17 +00:00
source=('http://openpogo.com/pkgsrc/core/openssh/openssh-5.2p1.tar.gz'
'sshd'
'sshd.confd'
'sshd.pam')
md5sums=('15f0a6ab975ad475176636e58cf1182a'
'ac6a93668c9e2b190b3acf73abfa02b4'
'e2cea70ac13af7e63d40eb04415eacd5'
'1c7c2ea8734ec7e3ca58d820634dc73a')
2009-09-26 14:35:50 +00:00
build() {
cd $startdir/src/$pkgname-$pkgver
2009-09-26 16:30:17 +00:00
./configure --prefix=/opt --libexecdir=/opt/lib/ssh \
--sysconfdir=/opt/etc/ssh --with-tcp-wrappers --with-privsep-user=nobody \
--with-md5-passwords --with-pam --with-mantype=man --mandir=/opt/man \
--with-xauth=/opt/bin/xauth --with-kerberos5=/opt --disable-strip
2009-09-26 14:35:50 +00:00
make || return 1
make DESTDIR=$startdir/pkg install
2009-09-26 16:30:17 +00:00
mkdir -p $startdir/pkg/opt/var/empty
2009-09-26 14:35:50 +00:00
2009-09-26 16:30:17 +00:00
install -D -m755 $startdir/src/sshd $startdir/pkg/opt/etc/rc.d/sshd
2009-09-26 14:35:50 +00:00
2009-09-26 16:30:17 +00:00
install -D -m644 LICENCE $startdir/pkg/opt/share/licenses/$pkgname/LICENCE
install -D -m644 $startdir/src/sshd.pam $startdir/pkg/opt/etc/pam.d/sshd
install -D -m644 $startdir/src/sshd.confd $startdir/pkg/opt/etc/conf.d/sshd
2009-09-26 14:35:50 +00:00
2009-09-26 16:30:17 +00:00
rm $startdir/pkg/opt/man/man1/slogin.1
ln -sf ssh.1.gz $startdir/pkg/opt/man/man1/slogin.1.gz
2009-09-26 14:35:50 +00:00
#additional contrib scripts that we like
2009-09-26 16:30:17 +00:00
install -D -m755 contrib/findssl.sh $startdir/pkg/opt/bin/findssl.sh
install -D -m755 contrib/ssh-copy-id $startdir/pkg/opt/bin/ssh-copy-id
install -D -m644 contrib/ssh-copy-id.1 $startdir/pkg/opt/man/man1/ssh-copy-id.1
2009-09-26 14:35:50 +00:00
# sshd_config
sed -i \
-e 's|^#ListenAddress 0.0.0.0|ListenAddress 0.0.0.0|g' \
-e 's|^#UsePAM no|UsePAM yes|g' \
-e 's|^#ChallengeResponseAuthentication yes|ChallengeResponseAuthentication no|g' \
2009-09-26 16:30:17 +00:00
$startdir/pkg/opt/etc/ssh/sshd_config
echo "HashKnownHosts yes" >> $startdir/pkg/opt/etc/ssh/ssh_config
echo "StrictHostKeyChecking ask" >> $startdir/pkg/opt/etc/ssh/ssh_config
2009-09-26 14:35:50 +00:00
#ssh_config
sed -i \
-e 's|^# Host \*|Host *|g' \
2009-09-26 16:30:17 +00:00
$startdir/pkg/opt/etc/ssh/ssh_config
2009-09-26 14:35:50 +00:00
}