Magellan Linux

Annotation of /branches/magellan-next/core/openssh/openssh-5.8p2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7880 - (hide annotations) (download)
Thu Jun 2 21:22:15 2011 UTC (12 years, 11 months ago) by niro
File size: 2515 byte(s)
-enable socket unit and rely on mtools service_exec determination
1 niro 7875 # $Id$
2    
3     PNAME="openssh"
4     PVER="5.8p2"
5     PBUILD="r2"
6    
7     PCATEGORIE="net-misc"
8     STATE="unstable"
9    
10     DESCRIPTION="Port of OpenBSD's free SSH release."
11     HOMEPAGE="http://www.openssh.com/"
12    
13     DEPEND=">= dev-libs/openssl-1.0.0d
14     >= sys-libs/zlib-1.2.5
15     >= sys-apps/sed-4"
16    
17     SRCFILE="${PNAME}-${PVER}.tar.gz"
18     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19    
20     RC_CVS_REV=1.2
21    
22     sminclude mbuild mtools
23    
24     SRC_URI=(
25     ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${SRCFILE}
26     mirror://${PNAME}/${SRCFILE}
27     mirror://${PNAME}/sshd.rc-${RC_CVS_REV}
28     mirror://${PNAME}/sshd.service
29     mirror://${PNAME}/sshd.socket
30     mirror://${PNAME}/ssh-keygen-dsa.service
31     mirror://${PNAME}/ssh-keygen-ecdsa.service
32     mirror://${PNAME}/ssh-keygen-rsa1.service
33     mirror://${PNAME}/ssh-keygen-rsa.service
34     mirror://${PNAME}/sshd.conf.tempfile
35     )
36    
37     UP2DATE="updatecmd ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable | lasttarball gz"
38    
39     src_compile()
40     {
41     cd ${SRCDIR}
42    
43     mconfigure \
44     --sysconfdir=/etc/ssh \
45     --libexecdir=/usr/$(mlibdir)/misc \
46     --datadir=/usr/share/openssh \
47     --disable-suid-ssh \
48     --with-privsep-path=/var/empty \
49     --with-privsep-user=sshd \
50     --with-md5-passwords \
51     --with-ipv4-default \
52     --without-zlib-version-check \
53     || die
54    
55     mmake || die
56     }
57    
58     src_install()
59     {
60     cd ${SRCDIR}
61     mmake DESTDIR=${BINDIR} install-nokeys || die
62    
63     # install our initscript
64     minstallrc sshd.rc-${RC_CVS_REV} sshd || die
65    
66     # install systemd units
67     minstallunit sshd.service || die
68     minstallunit sshd.socket || die
69     minstallunit ssh-keygen-dsa.service || die
70     minstallunit ssh-keygen-ecdsa.service || die
71     minstallunit ssh-keygen-rsa1.service || die
72     minstallunit ssh-keygen-rsa.service || die
73     minstalltmp sshd.conf.tempfile sshd.conf || die
74    
75     # needed to run sshd
76     mkeepdir /var/empty || die
77     mchown root:sys /var/empty || die
78    
79     minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \
80     README* RFC.nroff TODO WARNING.RNG || die
81     }
82    
83     preinstall()
84     {
85     # adding ssh user
86     ${MLIBDIR}/mgroupadd -o "-g 22" sshd
87     ${MLIBDIR}/museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd
88     }
89    
90     postinstall()
91     {
92     mstartservice sshd
93    
94     mstartunit ssh-keygen-dsa.service sshd
95     mstartunit ssh-keygen-ecdsa.service sshd
96     mstartunit ssh-keygen-rsa1.service sshd
97     mstartunit ssh-keygen-rsa.service sshd
98 niro 7880 mstartunit sshd.service
99     mstartunit sshd.socket
100 niro 7875 }
101    
102     postremove()
103     {
104     mstopservice sshd
105    
106     mstopunit ssh-keygen-dsa.service sshd
107     mstopunit ssh-keygen-ecdsa.service sshd
108     mstopunit ssh-keygen-rsa1.service sshd
109     mstopunit ssh-keygen-rsa.service sshd
110 niro 7880 mstopunit sshd.service
111     mstopunit sshd.socket
112 niro 7875 }