diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/tinylogin/tinylogin_1.4.bb | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/tinylogin/tinylogin_1.4.bb')
-rw-r--r-- | recipes/tinylogin/tinylogin_1.4.bb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes/tinylogin/tinylogin_1.4.bb b/recipes/tinylogin/tinylogin_1.4.bb new file mode 100644 index 0000000000..54708b2d4b --- /dev/null +++ b/recipes/tinylogin/tinylogin_1.4.bb @@ -0,0 +1,52 @@ +DESCRIPTION = "TinyLogin is a suite of tiny UNIX \ +utilities for handling logins, user authentication, \ +changing passwords, and otherwise maintaining users \ +and groups on an embedded system." +HOMEPAGE = "http://tinylogin.busybox.net/" +SECTION = "base" +LICENSE = "GPL" +PR = "r6" + +SRC_URI = "http://tinylogin.busybox.net/downloads/tinylogin-${PV}.tar.bz2 \ + file://cvs-20040608.patch;patch=1;pnum=1 \ + file://add-system.patch;patch=1;pnum=1 \ + file://adduser-empty_pwd.patch;patch=1 \ + file://remove-index.patch;patch=1" + +EXTRA_OEMAKE = "" + +do_compile () { + oe_runmake 'CC=${CC}' 'CROSS=${HOST_PREFIX}' +} + +do_install () { + install -d ${D}${base_bindir} + install -m 4755 tinylogin ${D}${base_bindir}/tinylogin + install -d ${D}${sysconfdir} + install -m 0644 tinylogin.links ${D}${sysconfdir} +} + +pkg_postinst_${PN} () { + # If we are not making an image we create links for the utilities that doesn't exist + # so the update-alternatives script will get the utilities it needs + # (update-alternatives have no problem replacing links later anyway) + if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/tinylogin";; /bin/*) to="tinylogin";; /*/*) to="../bin/tinylogin";; esac; ln -s $to $link; fi; done </etc/tinylogin.links; fi + + # This adds the links, remember that this has to work when building an image too, hence the $D + while read link; do case "$link" in /*/*/*) to="../../bin/tinylogin";; /bin/*) to="tinylogin";; /*/*) to="../bin/tinylogin";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 60; done <$D/etc/tinylogin.links +} + + +pkg_prerm_${PN} () { + while read link + do + case "$link" in + /*/*/*) to="../../bin/tinylogin";; + /bin/*) to="tinylogin";; + /*/*) to="../bin/tinylogin";; + esac + bn=`basename $link` + sh /usr/bin/update-alternatives --remove $bn $to + done < /etc/tinylogin.links +} + |