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