1a02827021a106d9e93096e1248465b0e86b1731
[vuplus_openembedded] / packages / console-tools / console-tools_0.3.2.bb
1 SECTION = "base"
2 LICENSE = "GPL"
3 DESCRIPTION = "Allows you to set-up and manipulate the Linux console."
4 PR = "r3"
5
6 SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
7            file://codepage.patch;patch=1 \
8            file://configure.patch;patch=1 \
9            file://compile.patch;patch=1 \
10            file://kbdrate.patch;patch=1 \
11            file://uclibc-fileno.patch;patch=1 \
12            file://config/*.m4"
13
14 export SUBDIRS = "fontfiletools vttools kbdtools screenfonttools contrib \
15                   examples po intl compat"
16
17 acpaths = "-I config"
18 do_configure_prepend () {
19         mkdir -p config
20         cp ${WORKDIR}/config/*.m4 config/
21 }
22
23 do_compile () {
24         oe_runmake -C lib
25         oe_runmake 'SUBDIRS=${SUBDIRS}'
26 }
27
28 inherit autotools
29
30 do_install () {
31         autotools_do_install
32         mv ${D}${bindir}/chvt ${D}${bindir}/chvt.${PN}
33         mv ${D}${bindir}/deallocvt ${D}${bindir}/deallocvt.${PN}
34         mv ${D}${bindir}/openvt ${D}${bindir}/openvt.${PN}
35 }
36
37 pkg_postinst_${PN} () {
38         update-alternatives --install ${bindir}/chvt chvt chvt.${PN} 100
39         update-alternatives --install ${bindir}/deallocvt deallocvt deallocvt.${PN} 100
40         update-alternatives --install ${bindir}/openvt openvt openvt.${PN} 100
41 }
42
43 pkg_prerm_${PN} () {
44         update-alternatives --remove chvt chvt.${PN}
45         update-alternatives --remove deallocvt deallocvt.${PN}
46         update-alternatives --remove openvt openvt.${PN}
47 }
48