1 DESCRIPTION = "TinyLogin is a suite of tiny UNIX \
2 utilities for handling logins, user authentication, \
3 changing passwords, and otherwise maintaining users \
4 and groups on an embedded system."
5 HOMEPAGE = "http://tinylogin.busybox.net/"
10 #SRC_URI = "http://tinylogin.busybox.net/downloads/tinylogin-${PV}.tar.bz2 \
11 SRC_URI = "http://limpens.net/trac/at91-kit-trac/export/4/trunk/sources/tinylogin-${PV}.tar.bz2 \
12 file://cvs-20040608.patch;patch=1;pnum=1 \
13 file://add-system.patch;patch=1;pnum=1 \
14 file://adduser-empty_pwd.patch;patch=1 \
15 file://remove-index.patch;patch=1"
20 oe_runmake 'CC=${CC}' 'CROSS=${HOST_PREFIX}'
24 install -d ${D}${base_bindir}
25 install -m 4755 tinylogin ${D}${base_bindir}/tinylogin
26 install -d ${D}${sysconfdir}
27 install -m 0644 tinylogin.links ${D}${sysconfdir}
30 pkg_postinst_${PN} () {
31 # If we are not making an image we create links for the utilities that doesn't exist
32 # so the update-alternatives script will get the utilities it needs
33 # (update-alternatives have no problem replacing links later anyway)
34 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
36 # This adds the links, remember that this has to work when building an image too, hence the $D
37 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
45 /*/*/*) to="../../bin/tinylogin";;
46 /bin/*) to="tinylogin";;
47 /*/*) to="../bin/tinylogin";;
50 sh /usr/bin/update-alternatives --remove $bn $to
51 done < /etc/tinylogin.links