Magellan Linux

Contents of /smage/trunk/core/dropbear/dropbear-2012.55-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4636 - (show annotations) (download)
Wed Mar 20 08:53:19 2013 UTC (11 years, 2 months ago) by niro
File size: 2482 byte(s)
-fixed a typo in service files
1 # $Id$
2
3 PNAME="dropbear"
4 PVER="2012.55"
5 PBUILD="r3"
6
7 PCAT="net-misc"
8
9 DESCRIPTION="Dropbear SSH2 has a small memory footprint and is suitable for memory-constrained environments."
10 HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
11
12 DEPEND=">= sys-libs/zlib-1.2.5
13 >= dev-libs/libtommath-0.42"
14
15 PROVIDE=">= virtual/ssh-server
16 >= virtual/ssh-client"
17
18 SRCFILE="${PNAME}-${PVER}.tar.bz2"
19 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
20
21 # todo: remove dbclient too?
22 ALX_PKG_KEEP="etc
23 usr/bin/dbclient
24 usr/bin/dropbearkey
25 usr/bin/scp
26 usr/sbin/dropbear
27 usr/bin/dropbearmulti
28 usr/lib/systemd
29 var"
30 sminclude mbuild mtools alx-split
31
32 # dropbear.rc cvs revision
33 CVS_REV=1.2
34
35 SRC_URI=(
36 http://matt.ucc.asn.au/${PNAME}/releases/${SRCFILE}
37 mirror://${PNAME}/${SRCFILE}
38 mirror://${PNAME}/dropbear.service
39 mirror://${PNAME}/dropbear-keygen-dss.service
40 mirror://${PNAME}/dropbear-keygen-rsa.service
41 mirror://${PNAME}/dropbear.conf.tempfile
42 )
43
44 UP2DATE="updatecmd 'http://matt.ucc.asn.au/dropbear/releases/?C=M;O=A' | grep ${PNAME}- | lasttarball"
45
46 src_compile()
47 {
48 cd ${SRCDIR}
49
50 mconfigure --enable-zlib --disable-pam || die
51 mmake PROGRAMS="dbclient scp dropbearkey dropbear" MULTI=1 || die
52 }
53
54 alx_generic_src_install()
55 {
56 cd ${SRCDIR}
57 mmake DESTDIR=${BINDIR} PROGRAMS="dbclient scp dropbearkey dropbear" MULTI=1 install || die
58
59 # create missing symlinks
60 minstalldir /usr/sbin || die
61 mlink dropbearmulti /usr/bin/dbclient || die
62 mlink dropbearmulti /usr/bin/scp || die
63 mlink dropbearmulti /usr/bin/dropbearkey || die
64 mlink ../bin/dropbearmulti /usr/sbin/dropbear || die
65
66 # systemd units
67 minstallunit dropbear.service || die
68 minstallunit dropbear-keygen-dss.service || die
69 minstallunit dropbear-keygen-rsa.service || die
70 minstalltmp dropbear.conf.tempfile dropbear.conf || die
71
72 # needed to run sshd
73 mkeepdir /etc/dropbear || die
74 mkeepdir /var/empty || die
75 mchown root:sys /var/empty || die
76
77 minstalldocs CHANGES INSTALL LICENSE _MTN MULTI SMALL TODO || die
78 }
79
80 preinstall-dropbear()
81 {
82 add_conf_prot_mask /etc/tmpfiles.d
83
84 # adding ssh user
85 ${MLIBDIR}/mgroupadd -o "-g 22" sshd
86 ${MLIBDIR}/museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd
87 }
88
89 postinstall-dropbear()
90 {
91 mstartunit dropbear-keygen-dss.service dropbearkey
92 mstartunit dropbear-keygen-rsa.service dropbearkey
93 mstartunit dropbear.service
94 }
95
96 postremove-dropbear()
97 {
98 mstopunit dropbear-keygen-dss.service dropbearkey
99 mstopunit dropbear-keygen-rsa.service dropbearkey
100 mstopunit dropbear.service
101 }