summaryrefslogtreecommitdiffstats
path: root/meta/packages/ncurses/ncurses.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/ncurses/ncurses.inc
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/ncurses/ncurses.inc')
-rw-r--r--meta/packages/ncurses/ncurses.inc86
1 files changed, 86 insertions, 0 deletions
diff --git a/meta/packages/ncurses/ncurses.inc b/meta/packages/ncurses/ncurses.inc
new file mode 100644
index 0000000000..030cd1034c
--- /dev/null
+++ b/meta/packages/ncurses/ncurses.inc
@@ -0,0 +1,86 @@
1DESCRIPTION = "Ncurses library"
2HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
3LICENSE = "MIT"
4SECTION = "libs"
5DEPENDS = "ncurses-native"
6PACKAGES_prepend = "ncurses-tools "
7PACKAGES_append = " ncurses-terminfo"
8FILES_ncurses_append = " ${datadir}/tabset"
9RSUGGESTS_${PN} = "ncurses-terminfo"
10RPROVIDES = "libncurses5"
11
12inherit autotools
13
14# This keeps only tput/tset in ncurses
15# clear/reset are in already busybox
16FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack "
17FILES_ncurses-terminfo = "${datadir}/terminfo"
18FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* usr/share/tabset etc/terminfo"
19
20PARALLEL_MAKE=""
21
22EXTRA_OECONF = "--with-shared \
23 --without-profile \
24 --without-debug \
25 --disable-rpath \
26 --enable-echo \
27 --enable-const \
28 --without-ada \
29 --enable-termcap \
30 --without-cxx-binding \
31 --with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \
32 --enable-overwrite"
33export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}"
34export BUILD_LDFLAGS = ""
35export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
36
37do_stage() {
38 autotools_stage_all
39 ln -sf curses.h ${STAGING_INCDIR}/ncurses.h
40 ln -sf libncurses.so ${STAGING_LIBDIR}/libtermcap.so
41 ln -sf libncurses.a ${STAGING_LIBDIR}/libtermcap.a
42}
43
44do_install() {
45 autotools_do_install
46
47 # our ncurses has termcap support
48 ln -sf libncurses.so ${D}${libdir}/libtermcap.so
49 ln -sf libncurses.a ${D}${libdir}/libtermcap.a
50
51 # include some basic terminfo files
52 # stolen ;) from gentoo and modified a bit
53 for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86
54 do
55 local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
56 local basedir="$(basename $(dirname "${termfile}"))"
57
58 if [ -n "${termfile}" ]
59 then
60 install -d ${D}${sysconfdir}/terminfo/${basedir}
61 mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/
62 ln -s /etc/terminfo/${basedir}/${x} \
63 ${D}${datadir}/terminfo/${basedir}/${x}
64 fi
65 done
66 # i think we can use xterm-color as default xterm
67 if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ]
68 then
69 ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
70 fi
71
72 mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
73 mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
74}
75
76
77pkg_postinst_ncurses-tools () {
78 update-alternatives --install ${bindir}/clear clear clear.${PN} 100
79 update-alternatives --install ${bindir}/reset reset reset.${PN} 100
80}
81
82
83pkg_prerm_ncurses-tools () {
84 update-alternatives --remove clear clear.${PN}
85 update-alternatives --remove reset reset.${PN}
86}