Contents of /trunk/core/openssh/openssh-6.5p1-r1.smage2
Parent Directory | Revision Log
Revision 20611 -
(show annotations)
(download)
Fri Jan 31 14:03:21 2014 UTC (10 years, 7 months ago) by niro
File size: 3077 byte(s)
Fri Jan 31 14:03:21 2014 UTC (10 years, 7 months ago) by niro
File size: 3077 byte(s)
auto added: ver bump to 6.5p1-r1
1 | # $Id$ |
2 | |
3 | PNAME="openssh" |
4 | PVER="6.5p1" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="net-misc" |
8 | |
9 | DESCRIPTION="Port of OpenBSD's free SSH release." |
10 | HOMEPAGE="http://www.openssh.com/" |
11 | |
12 | DEPEND=">= dev-libs/openssl-1.0.1f |
13 | >= sys-libs/zlib-1.2.5 |
14 | >= sys-libs/pam-1.1 |
15 | >= virtual/sed" |
16 | |
17 | PROVIDE="virtual/ssh-server |
18 | virtual/ssh-client" |
19 | |
20 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
22 | |
23 | sminclude mbuild mtools systemd |
24 | msetfeature "!check" |
25 | |
26 | SVC_REV=1.4 |
27 | KEYGEN_DSA_REV=1.2 |
28 | KEYGEN_ECDSA_REV=1.2 |
29 | KEYGEN_RSA1_REV=1.2 |
30 | KEYGEN_RSA_REV=1.2 |
31 | |
32 | SRC_URI=( |
33 | ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${SRCFILE} |
34 | mirror://${PNAME}/${SRCFILE} |
35 | mirror://${PNAME}/sshd.service-${SVC_REV} |
36 | # mirror://${PNAME}/sshd.socket |
37 | mirror://${PNAME}/ssh-keygen-dsa.service-${KEYGEN_DSA_REV} |
38 | mirror://${PNAME}/ssh-keygen-ecdsa.service-${KEYGEN_ECDSA_REV} |
39 | mirror://${PNAME}/ssh-keygen-rsa1.service-${KEYGEN_RSA1_REV} |
40 | mirror://${PNAME}/ssh-keygen-rsa.service-${KEYGEN_RSA_REV} |
41 | mirror://${PNAME}/sshd.conf.tempfile |
42 | mirror://${PNAME}/sshd.pam |
43 | ) |
44 | |
45 | UP2DATE="updatecmd http://ftp2.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/ | lasttarball gz" |
46 | |
47 | src_compile() |
48 | { |
49 | cd ${SRCDIR} |
50 | |
51 | mconfigure \ |
52 | --sysconfdir=/etc/ssh \ |
53 | --libexecdir=/usr/$(mlibdir)/misc \ |
54 | --datadir=/usr/share/openssh \ |
55 | --disable-suid-ssh \ |
56 | --with-privsep-path=/var/empty \ |
57 | --with-privsep-user=sshd \ |
58 | --with-md5-passwords \ |
59 | --with-ipv4-default \ |
60 | --without-zlib-version-check \ |
61 | --with-pam \ |
62 | || die |
63 | |
64 | mmake || die |
65 | } |
66 | |
67 | src_install() |
68 | { |
69 | cd ${SRCDIR} |
70 | mmake DESTDIR=${BINDIR} install-nokeys || die |
71 | |
72 | # install systemd units |
73 | minstallunit sshd.service-${SVC_REV} sshd.service || die |
74 | # minstallunit sshd.socket || die |
75 | minstallunit ssh-keygen-dsa.service-${KEYGEN_DSA_REV} ssh-keygen-dsa.service || die |
76 | minstallunit ssh-keygen-ecdsa.service-${KEYGEN_ECDSA_REV} ssh-keygen-ecdsa.service || die |
77 | minstallunit ssh-keygen-rsa1.service-${KEYGEN_RSA1_REV} ssh-keygen-rsa1.service || die |
78 | minstallunit ssh-keygen-rsa.service-${KEYGEN_RSA_REV} ssh-keygen-rsa.service || die |
79 | minstalltmp sshd.conf.tempfile sshd.conf || die |
80 | minstallpam sshd.pam sshd || die |
81 | |
82 | # fix sshd_config to enable pam support |
83 | sed -i -e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \ |
84 | -e '/^#UsePAM no$/c UsePAM yes' \ |
85 | ${BINDIR}/etc/ssh/sshd_config || die |
86 | |
87 | # needed to run sshd |
88 | mkeepdir /var/empty || die |
89 | mchown root:sys /var/empty || die |
90 | |
91 | minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \ |
92 | README* RFC.nroff TODO WARNING.RNG || die |
93 | } |
94 | |
95 | preinstall() |
96 | { |
97 | # adding ssh user |
98 | ${MLIBDIR}/mgroupadd -o "-g 22" sshd |
99 | ${MLIBDIR}/museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd |
100 | } |
101 | |
102 | postinstall() |
103 | { |
104 | # cleanup old symlinks |
105 | local i |
106 | for i in dsa ecdsa rsa1 rsa |
107 | do |
108 | if [ -L ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service ] |
109 | then |
110 | rm ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service |
111 | fi |
112 | done |
113 | |
114 | mstartunit sshd.service |
115 | # per socket connection not supported atm |
116 | #mstartunit sshd.socket |
117 | } |
118 | |
119 | postremove() |
120 | { |
121 | mstopunit sshd.service |
122 | # per socket connection not supported atm |
123 | #mstopunit sshd.socket |
124 | } |