Contents of /trunk/core/openssh/openssh-6.4p1-r3.smage2
Parent Directory | Revision Log
Revision 20557 -
(show annotations)
(download)
Mon Jan 27 15:29:50 2014 UTC (10 years, 7 months ago) by niro
File size: 2798 byte(s)
Mon Jan 27 15:29:50 2014 UTC (10 years, 7 months ago) by niro
File size: 2798 byte(s)
auto added: ver bump to 6.4p1-r3
1 | # $Id$ |
2 | |
3 | PNAME="openssh" |
4 | PVER="6.4p1" |
5 | PBUILD="r3" |
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 | >= virtual/sed" |
15 | |
16 | PROVIDE="virtual/ssh-server |
17 | virtual/ssh-client" |
18 | |
19 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
20 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
21 | |
22 | sminclude mbuild mtools systemd |
23 | msetfeature "!check" |
24 | |
25 | SVC_REV=1.4 |
26 | KEYGEN_DSA_REV=1.2 |
27 | KEYGEN_ECDSA_REV=1.2 |
28 | KEYGEN_RSA1_REV=1.2 |
29 | KEYGEN_RSA_REV=1.2 |
30 | |
31 | SRC_URI=( |
32 | ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${SRCFILE} |
33 | mirror://${PNAME}/${SRCFILE} |
34 | mirror://${PNAME}/sshd.service-${SVC_REV} |
35 | # mirror://${PNAME}/sshd.socket |
36 | mirror://${PNAME}/ssh-keygen-dsa.service-${KEYGEN_DSA_REV} |
37 | mirror://${PNAME}/ssh-keygen-ecdsa.service-${KEYGEN_ECDSA_REV} |
38 | mirror://${PNAME}/ssh-keygen-rsa1.service-${KEYGEN_RSA1_REV} |
39 | mirror://${PNAME}/ssh-keygen-rsa.service-${KEYGEN_RSA_REV} |
40 | mirror://${PNAME}/sshd.conf.tempfile |
41 | ) |
42 | |
43 | UP2DATE="updatecmd http://ftp2.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/ | lasttarball gz" |
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 | || die |
60 | |
61 | mmake || die |
62 | } |
63 | |
64 | src_install() |
65 | { |
66 | cd ${SRCDIR} |
67 | mmake DESTDIR=${BINDIR} install-nokeys || die |
68 | |
69 | # install systemd units |
70 | minstallunit sshd.service-${SVC_REV} sshd.service || die |
71 | # minstallunit sshd.socket || die |
72 | minstallunit ssh-keygen-dsa.service-${KEYGEN_DSA_REV} ssh-keygen-dsa.service || die |
73 | minstallunit ssh-keygen-ecdsa.service-${KEYGEN_ECDSA_REV} ssh-keygen-ecdsa.service || die |
74 | minstallunit ssh-keygen-rsa1.service-${KEYGEN_RSA1_REV} ssh-keygen-rsa1.service || die |
75 | minstallunit ssh-keygen-rsa.service-${KEYGEN_RSA_REV} ssh-keygen-rsa.service || die |
76 | minstalltmp sshd.conf.tempfile sshd.conf || die |
77 | |
78 | # needed to run sshd |
79 | mkeepdir /var/empty || die |
80 | mchown root:sys /var/empty || die |
81 | |
82 | minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \ |
83 | README* RFC.nroff TODO WARNING.RNG || die |
84 | } |
85 | |
86 | preinstall() |
87 | { |
88 | # adding ssh user |
89 | ${MLIBDIR}/mgroupadd -o "-g 22" sshd |
90 | ${MLIBDIR}/museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd |
91 | } |
92 | |
93 | postinstall() |
94 | { |
95 | # cleanup old symlinks |
96 | local i |
97 | for i in dsa ecdsa rsa1 rsa |
98 | do |
99 | if [ -L ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service ] |
100 | then |
101 | rm ${MROOT}/etc/systemd/system/multi-user.target.wants/ssh-keygen-${i}.service |
102 | fi |
103 | done |
104 | |
105 | mstartunit sshd.service |
106 | # per socket connection not supported atm |
107 | #mstartunit sshd.socket |
108 | } |
109 | |
110 | postremove() |
111 | { |
112 | mstopunit sshd.service |
113 | # per socket connection not supported atm |
114 | #mstopunit sshd.socket |
115 | } |