Contents of /trunk/core/openssh/openssh-7.6p1-r1.smage2
Parent Directory | Revision Log
Revision 29832 -
(show annotations)
(download)
Fri Oct 13 12:08:02 2017 UTC (6 years, 11 months ago) by niro
File size: 2572 byte(s)
Fri Oct 13 12:08:02 2017 UTC (6 years, 11 months ago) by niro
File size: 2572 byte(s)
auto added: ver bump to 7.6p1-r1
1 | # $Id$ |
2 | |
3 | PNAME="openssh" |
4 | PVER="7.6p1" |
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.1.0f |
13 | >= sys-libs/zlib-1.2.8 |
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.6 |
27 | |
28 | SRC_URI=( |
29 | ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${SRCFILE} |
30 | ftp://ftp-stud.fht-esslingen.de/pub/OpenBSD/OpenSSH/portable/${SRCFILE} |
31 | mirror://${PNAME}/${SRCFILE} |
32 | mirror://${PNAME}/sshd.service-${SVC_REV} |
33 | # mirror://${PNAME}/sshd.socket |
34 | mirror://${PNAME}/ssh-keygen.service |
35 | mirror://${PNAME}/sshd.conf.tempfile |
36 | mirror://${PNAME}/sshd.pam |
37 | ) |
38 | |
39 | UP2DATE="updatecmd http://ftp2.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/ | highesttarball gz" |
40 | |
41 | pkg_setup() |
42 | { |
43 | preinstall |
44 | } |
45 | |
46 | src_compile() |
47 | { |
48 | cd ${SRCDIR} |
49 | |
50 | mconfigure \ |
51 | --sysconfdir=/etc/ssh \ |
52 | --libexecdir=/usr/$(mlibdir)/misc \ |
53 | --datadir=/usr/share/openssh \ |
54 | --disable-suid-ssh \ |
55 | --with-privsep-path=/var/empty \ |
56 | --with-privsep-user=sshd \ |
57 | --with-md5-passwords \ |
58 | --with-ipv4-default \ |
59 | --without-zlib-version-check \ |
60 | --with-pam \ |
61 | || die |
62 | |
63 | mmake || die |
64 | } |
65 | |
66 | src_install() |
67 | { |
68 | cd ${SRCDIR} |
69 | mmake DESTDIR=${BINDIR} install-nokeys || die |
70 | |
71 | # install systemd units |
72 | minstallunit sshd.service-${SVC_REV} sshd.service || die |
73 | # minstallunit sshd.socket || die |
74 | minstallunit ssh-keygen.service || die |
75 | minstalltmp sshd.conf.tempfile sshd.conf || die |
76 | minstallpam sshd.pam sshd || die |
77 | |
78 | # fix sshd_config to enable pam support |
79 | sed -i -e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \ |
80 | -e '/^#UsePAM no$/c UsePAM yes' \ |
81 | ${BINDIR}/etc/ssh/sshd_config || die |
82 | |
83 | # needed to run sshd |
84 | mkeepdir /var/empty || die |
85 | mchown root:sys /var/empty || die |
86 | |
87 | minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \ |
88 | README* RFC.nroff TODO WARNING.RNG || die |
89 | } |
90 | |
91 | preinstall() |
92 | { |
93 | # adding ssh user |
94 | mgroupadd -o "-g 22" sshd |
95 | museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd |
96 | } |
97 | |
98 | postinstall() |
99 | { |
100 | # cleanup old symlinks |
101 | local i |
102 | for i in dsa ecdsa rsa1 rsa ed25519 |
103 | do |
104 | if [ -L ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service ] |
105 | then |
106 | rm ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service |
107 | fi |
108 | done |
109 | |
110 | mstartunit sshd.service |
111 | # per socket connection not supported atm |
112 | #mstartunit sshd.socket |
113 | } |
114 | |
115 | postremove() |
116 | { |
117 | mstopunit sshd.service |
118 | # per socket connection not supported atm |
119 | #mstopunit sshd.socket |
120 | } |