dropbear: adjust packaging for micro
authorPhil Blundell <philb@gnu.org>
Sun, 14 Jun 2009 09:06:27 +0000 (10:06 +0100)
committerPhil Blundell <philb@gnu.org>
Sun, 14 Jun 2009 09:06:27 +0000 (10:06 +0100)
recipes/dropbear/dropbear.inc

index 364799f..f4addb5 100644 (file)
@@ -28,7 +28,13 @@ LD = "${CC}"
 
 SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
 BINCOMMANDS = "dbclient ssh scp"
+BINCOMMANDS_micro = "dbclient scp"
 EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
+EXTRA_OEMAKE_micro = 'PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
+PACKAGES_prepend_micro = "dropbear-client dropbear-utils "
+FILES_dropbear-client = "${bindir}/dbclient"
+FILES_dropbear-utils = "${sbindir}/dropbearkey ${sbindir}/dropbearconvert"
+EXTRA_OECONF_micro = "--disable-utmp --disable-wtmp --disable-lastlog --disable-shadow"
 
 do_configure_prepend() {
        if [ "x${DISTRO_TYPE}" = "xdebug" ]; then
@@ -46,13 +52,24 @@ do_install() {
        install -d ${D}${sbindir}
        install -d ${D}${localstatedir}
 
-       install -m 0755 dropbearmulti ${D}${sbindir}/
-       ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
+        if [ -f dropbearmulti ]; then
+               install -m 0755 dropbearmulti ${D}${sbindir}/
+                ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
        
-       for i in ${SBINCOMMANDS}
-       do
-               ln -sf ./dropbearmulti ${D}${sbindir}/$i
-       done
+               for i in ${SBINCOMMANDS}
+               do
+                       ln -sf ./dropbearmulti ${D}${sbindir}/$i
+                done
+        else
+               for i in ${SBINCOMMANDS}
+               do
+                       install -m 0755 $i ${D}${sbindir}/
+                done
+               for i in ${BINCOMMANDS}
+               do
+                       install -m 0755 $i ${D}${bindir}/
+                done
+        fi
        cat ${WORKDIR}/init | sed -e 's,/etc,${sysconfdir},g' \
                                  -e 's,/usr/sbin,${sbindir},g' \
                                  -e 's,/var,${localstatedir},g' \
@@ -69,6 +86,9 @@ pkg_postinst () {
        update-alternatives --install ${bindir}/ssh ssh ${sbindir}/dropbearmulti 20
 }
 
+pkg_postinst_micro() {
+}
+
 pkg_postrm_append () {
        if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
                rm ${sysconfdir}/dropbear/dropbear_rsa_host_key