enigma2 : change vfd font (skin_user.xml)
[vuplus_openembedded] / recipes / tinylogin / tinylogin_1.4.bb
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/"
6 SECTION = "base"
7 LICENSE = "GPL"
8 PR = "r6"
9
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"
16
17 EXTRA_OEMAKE = ""
18
19 do_compile () {
20         oe_runmake 'CC=${CC}' 'CROSS=${HOST_PREFIX}'
21 }
22
23 do_install () {
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}
28 }
29
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
35
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
38 }
39
40
41 pkg_prerm_${PN} () {
42     while read link
43     do  
44         case "$link" in
45             /*/*/*) to="../../bin/tinylogin";;
46             /bin/*) to="tinylogin";;
47             /*/*) to="../bin/tinylogin";;
48         esac
49         bn=`basename $link`
50         sh /usr/bin/update-alternatives --remove $bn $to
51     done < /etc/tinylogin.links
52 }
53