wok view openssh-pam/receipt @ rev 17733
linux-libre: build all modules packages
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 06 10:51:35 2015 +0100 (2015-03-06) |
parents | 95ae6a87842c |
children | 7ef2138f2667 |
line source
1 # SliTaz package receipt.
3 PACKAGE="openssh-pam"
4 VERSION="6.7p1"
5 CATEGORY="security"
6 SHORT_DESC="Openbsd Secure Shell using PAM."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 SOURCE="openssh"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.openssh.org/"
12 WGET_URL="ftp://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/$TARBALL"
13 CONFIG_FILES="/etc/ssh /etc/inetd.conf"
14 TAZPANEL_DAEMON="man::sshd|edit::/etc/ssh/sshd_config|options::OPENSSH_OPTIONS|web::$WEB_SITE"
15 PROVIDE="openssh:pam ssh:pam"
16 TAGS="ssh"
18 DEPENDS="sftp-server libcrypto zlib pam"
19 BUILD_DEPENDS="libcrypto-dev zlib-dev openssl-dev pam pam-dev"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 cd $src
25 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam \
26 --with-privsep-user=nobody --with-privsep-path=/var/run/sshd \
27 --with-xauth=/usr/bin/xauth \
28 --libexecdir=/usr/sbin \
29 $CONFIGURE_ARGS &&
30 make &&
31 make DESTDIR=$DESTDIR install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr $fs/etc/init.d $fs/etc/ssh
38 cp -a $install/usr/sbin $install/usr/bin $fs/usr
39 rm -f $fs/usr/sbin/sftp-server
40 cp -a $install/etc $fs
41 cp ../$SOURCE/stuff/openssh $fs/etc/init.d
42 sed -i 's/.*UsePAM.*/UsePAM yes/' $fs/etc/ssh/sshd_config
43 }
45 post_install()
46 {
47 grep -q ssh $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
48 #ssh stream tcp nowait root sshd sshd -i
49 EOT
50 while read dropbear openssh ; do
51 [ -s $1$dropbear ] || continue
52 dropbearconvert dropbear openssh $1$dropbear $1$openssh
53 dropbearkey -y -f $1$dropbear | grep ssh > $1$openssh.pub
54 dropbearkey -y -f $1$dropbear | grep Fingerprint
55 done <<EOT
56 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key
57 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key
58 EOT
59 ssh-keygen -A
60 }
62 post_remove()
63 {
64 grep -q sshd $1/etc/inetd.conf && sed -i '/sshd/d' $1/etc/inetd.conf
65 }