]>
Commit | Line | Data |
---|---|---|
166a6c21 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
166a6c21 MT |
4 | ############################################################################### |
5 | ||
802ea3af MT |
6 | name = ncurses |
7 | version = 5.9 | |
051ef3b7 | 8 | release = 7 |
166a6c21 | 9 | |
802ea3af MT |
10 | groups = System/Base |
11 | url = http://invisible-island.net/ncurses/ncurses.html | |
12 | license = MIT | |
13 | summary = Ncurses support utilities. | |
166a6c21 | 14 | |
802ea3af MT |
15 | description |
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 | |
166a6c21 | 19 | discontinued 4.4 BSD classic curses library. |
802ea3af MT |
20 | end |
21 | ||
22 | source_dl = | |
23 | ||
24 | build | |
25 | requires | |
26 | gcc-c++ | |
27 | end | |
28 | ||
29 | configure_options += \ | |
802ea3af MT |
30 | --with-shared \ |
31 | --without-debug \ | |
e1b31c03 MT |
32 | --without-ada \ |
33 | --with-ospeed=unsigned \ | |
34 | --with-chtype=long \ | |
35 | --enable-hard-tabs \ | |
36 | --enable-xmc-glitch \ | |
37 | --enable-colorfgbg \ | |
38 | --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo:/lib/terminfo \ | |
39 | --enable-overwrite \ | |
40 | --enable-pc-files \ | |
41 | --with-termlib=tinfo | |
802ea3af | 42 | |
06eef4c6 | 43 | export PKG_CONFIG_LIBDIR=%{libdir}/pkgconfig |
e1b31c03 MT |
44 | |
45 | build | |
46 | mkdir -pv narrowc widec | |
47 | ||
48 | # Build narrowc version. | |
49 | cd narrowc | |
50 | ln -svf ../configure . | |
51 | ./configure %{configure_options} --with-ticlib | |
52 | make %{PARALLELISMFLAGS} libs | |
53 | make %{PARALLELISMFLAGS} -C progs | |
54 | ||
55 | # Build widec version. | |
56 | cd ../widec | |
57 | ln -svf ../configure . | |
58 | ./configure %{configure_options} --enable-widec --without-progs | |
59 | make %{PARALLELISMFLAGS} libs | |
60 | cd .. | |
61 | end | |
62 | ||
63 | install | |
64 | make -C narrowc DESTDIR=%{BUILDROOT} install.{libs,progs,data} | |
06eef4c6 | 65 | rm -rvf %{BUILDROOT}%{libdir}/libtinfo.* |
e1b31c03 MT |
66 | make -C widec DESTDIR=%{BUILDROOT} install.{libs,includes,man} |
67 | ||
06eef4c6 | 68 | chmod -v 755 %{BUILDROOT}%{libdir}/lib*.so.*.* |
e1b31c03 | 69 | |
e1b31c03 MT |
70 | mkdir -pv %{BUILDROOT}/{etc,lib}/terminfo |
71 | ||
72 | # move few basic terminfo entries to /lib | |
73 | baseterms= | |
74 | for termname in \ | |
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)" | |
79 | done | |
80 | done | |
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} | |
88 | done | |
89 | ||
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 | |
95 | #done | |
96 | ||
97 | # don't require -ltinfo when linking with --no-add-needed | |
06eef4c6 | 98 | for l in %{BUILDROOT}%{libdir}/libncurses{,w}.so; do |
e1b31c03 MT |
99 | soname=$(basename $(readlink $l)) |
100 | rm -f $l | |
101 | echo "INPUT($soname -ltinfo)" > $l | |
102 | done | |
103 | ||
06eef4c6 MT |
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 | |
802ea3af | 108 | |
06eef4c6 MT |
109 | rm -vf %{BUILDROOT}%{libdir}/terminfo |
110 | rm -vf %{BUILDROOT}%{libdir}/pkgconfig/{*_g,ncurses++*}.pc | |
802ea3af MT |
111 | end |
112 | end | |
113 | ||
114 | packages | |
115 | package %{name} | |
1f9bc2f0 | 116 | |
802ea3af MT |
117 | package %{name}-libs |
118 | template LIBS | |
1f9bc2f0 | 119 | |
802ea3af | 120 | requires |
b98d319e | 121 | %{name}-base=%{thisver} |
802ea3af MT |
122 | end |
123 | end | |
1f9bc2f0 | 124 | |
802ea3af MT |
125 | package %{name}-devel |
126 | template DEVEL | |
127 | end | |
128 | ||
129 | package %{name}-term | |
130 | summary = Terminal descriptions for ncurses. | |
131 | description | |
132 | This package contains additional terminal descriptions not found in | |
133 | the ncurses-base package. | |
134 | end | |
135 | ||
e5ec988f MT |
136 | provides += /usr/share/terminfo |
137 | ||
802ea3af MT |
138 | files |
139 | /usr/share/terminfo | |
140 | end | |
141 | end | |
142 | ||
143 | package %{name}-base | |
144 | summary = Terminal descriptions. | |
145 | description | |
146 | This package contains descriptions of common terminals. Other terminal | |
147 | descriptions are included in the ncurses-term package. | |
148 | end | |
149 | ||
e5ec988f MT |
150 | conflicts = ncurses<=5.9-1 |
151 | ||
802ea3af | 152 | files |
e1b31c03 | 153 | /lib/terminfo |
802ea3af MT |
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-* | |
186 | end | |
187 | end | |
1f9bc2f0 MT |
188 | |
189 | package %{name}-debuginfo | |
190 | template DEBUGINFO | |
191 | end | |
802ea3af | 192 | end |