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