1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
11 url = http://invisible-island.net/ncurses/ncurses.html
13 summary = Ncurses support utilities.
16 The curses library routines are a terminal-independent method of
17 updating character screens with reasonable optimization. The ncurses
18 (new curses) library is a freely distributable replacement for the
19 discontinued 4.4 BSD classic curses library.
29 configure_options += \
33 --with-ospeed=unsigned \
38 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo:/lib/terminfo \
43 export PKG_CONFIG_LIBDIR=%{libdir}/pkgconfig
46 mkdir -pv narrowc widec
48 # Build narrowc version.
50 ln -svf ../configure .
51 ./configure %{configure_options} --with-ticlib
52 make %{PARALLELISMFLAGS} libs
53 make %{PARALLELISMFLAGS} -C progs
55 # Build widec version.
57 ln -svf ../configure .
58 ./configure %{configure_options} --enable-widec --without-progs
59 make %{PARALLELISMFLAGS} libs
64 make -C narrowc DESTDIR=%{BUILDROOT} install.{libs,progs,data}
65 rm -rvf %{BUILDROOT}%{libdir}/libtinfo.*
66 make -C widec DESTDIR=%{BUILDROOT} install.{libs,includes,man}
68 chmod -v 755 %{BUILDROOT}%{libdir}/lib*.so.*.*
70 mkdir -pv %{BUILDROOT}/{etc,lib}/terminfo
72 # move few basic terminfo entries to /lib
75 ansi dumb linux vt100 vt100-nav vt102 vt220 vt52; do
76 for t in $(find %{BUILDROOT}/usr/share/terminfo \
77 -samefile %{BUILDROOT}/usr/share/terminfo/${termname::1}/$termname); do
78 baseterms="$baseterms $(basename $t)"
81 for termname in ${baseterms}; do
82 termpath=terminfo/${termname::1}/${termname}
83 mkdir -pv %{BUILDROOT}/lib/terminfo/${termname::1}
84 mv -v %{BUILDROOT}/usr/share/${termpath} %{BUILDROOT}/lib/${termpath}
85 ln -svf $(dirname /usr/share/${termpath} | \
86 sed 's,\(^/\|\)[^/][^/]*,..,g')/lib/${termpath} \
87 %{BUILDROOT}/usr/share//${termpath}
90 # can't replace directory with symlink, symlink all headers
91 #mkdir %{BUILDROOT}/usr/include/ncurses{,w}
92 #for l in %{BUILDROOT}/usr/include/*.h; do
93 # ln -s ../$(basename $l) %{BUILDROOT}/usr/include/ncurses
94 # ln -s ../$(basename $l) %{BUILDROOT}/usr/include/ncursesw
97 # don't require -ltinfo when linking with --no-add-needed
98 for l in %{BUILDROOT}%{libdir}/libncurses{,w}.so; do
99 soname=$(basename $(readlink $l))
101 echo "INPUT($soname -ltinfo)" > $l
104 rm -f %{BUILDROOT}%{libdir}/libcurses{,w}.so
105 echo "INPUT(-lncurses)" > %{BUILDROOT}%{libdir}/libcurses.so
106 echo "INPUT(-lncursesw)" > %{BUILDROOT}%{libdir}/libcursesw.so
107 echo "INPUT(-ltinfo)" > %{BUILDROOT}%{libdir}/libtermcap.so
109 rm -vf %{BUILDROOT}%{libdir}/terminfo
110 rm -vf %{BUILDROOT}%{libdir}/pkgconfig/{*_g,ncurses++*}.pc
121 %{name}-base=%{thisver}
125 package %{name}-devel
130 summary = Terminal descriptions for ncurses.
132 This package contains additional terminal descriptions not found in
133 the ncurses-base package.
136 provides += /usr/share/terminfo
144 summary = Terminal descriptions.
146 This package contains descriptions of common terminals. Other terminal
147 descriptions are included in the ncurses-term package.
150 conflicts = ncurses<=5.9-1
154 /usr/share/terminfo/*/Eterm*
155 /usr/share/terminfo/*/aterm
156 /usr/share/terminfo/*/bterm
157 /usr/share/terminfo/*/cons25
158 /usr/share/terminfo/*/cygwin
159 /usr/share/terminfo/*/eterm*
160 /usr/share/terminfo/*/gnome
161 /usr/share/terminfo/*/gnome-256color
162 /usr/share/terminfo/*/hurd
163 /usr/share/terminfo/*/jfbterm
164 /usr/share/terminfo/*/konsole
165 /usr/share/terminfo/*/konsole-256color
166 /usr/share/terminfo/*/mach*
167 /usr/share/terminfo/*/mlterm
168 /usr/share/terminfo/*/mrxvt
169 /usr/share/terminfo/*/nsterm
170 /usr/share/terminfo/*/putty*
171 /usr/share/terminfo/*/pcansi
172 /usr/share/terminfo/*/rxvt
173 /usr/share/terminfo/*/rxvt-*
174 /usr/share/terminfo/*/screen
175 /usr/share/terminfo/*/screen-*color
176 /usr/share/terminfo/*/screen.*
177 /usr/share/terminfo/*/sun
178 /usr/share/terminfo/*/teraterm
179 /usr/share/terminfo/*/teraterm2.3
180 /usr/share/terminfo/*/vte
181 /usr/share/terminfo/*/vte-256color
182 /usr/share/terminfo/*/vwmterm
183 /usr/share/terminfo/*/wsvt25*
184 /usr/share/terminfo/*/xfce
185 /usr/share/terminfo/*/xterm xterm-*
189 package %{name}-debuginfo