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