source: spec/trunk/SPECS/ncurses.spec@ 433

Last change on this file since 433 was 283, checked in by Yuri Dario, 14 years ago

spec: nspr, nss, openssl, ncurses, readline, rebuild with libc 0.6.4 runtime.

  • Property svn:eol-style set to native
File size: 8.4 KB
Line 
1
2Summary: Ncurses support utilities
3Name: ncurses
4Version: 5.7
5Release: 4%{?dist}
6License: MIT
7Group: System Environment/Base
8URL: http://invisible-island.net/ncurses/ncurses.html
9Source0: ftp://invisible-island.net/ncurses/ncurses-%{version}.tar.gz
10
11Patch1: ncurses-5.7-os2.diff
12
13#BuildRequires: gpm-devel pkgconfig
14BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15
16Requires: %{name}-libs = %{version}-%{release}
17
18%description
19The curses library routines are a terminal-independent method of
20updating character screens with reasonable optimization. The ncurses
21(new curses) library is a freely distributable replacement for the
22discontinued 4.4 BSD classic curses library.
23
24This package contains support utilities, including a terminfo compiler
25tic, a decompiler infocmp, clear, tput, tset, and a termcap conversion
26tool captoinfo.
27
28%package libs
29Summary: Ncurses libraries
30Group: System Environment/Libraries
31Requires: %{name}-base = %{version}-%{release}
32# libs introduced in 5.6-13
33Obsoletes: ncurses < 5.6-13
34Conflicts: ncurses < 5.6-13
35Obsoletes: libtermcap < 2.0.8-48
36
37%description libs
38The curses library routines are a terminal-independent method of
39updating character screens with reasonable optimization. The ncurses
40(new curses) library is a freely distributable replacement for the
41discontinued 4.4 BSD classic curses library.
42
43This package contains the ncurses libraries.
44
45%package base
46Summary: Descriptions of common terminals
47Group: System Environment/Base
48Obsoletes: termcap < 1:5.5-2
49# base introduced in 5.6-13
50Conflicts: ncurses < 5.6-13
51
52%description base
53This package contains descriptions of common terminals. Other terminal
54descriptions are included in the ncurses-term package.
55
56#%package term
57#Summary: Terminal descriptions
58#Group: System Environment/Base
59#Requires: %{name}-base = %{version}-%{release}
60
61#%description term
62#This package contains additional terminal descriptions not found in
63#the ncurses-base package.
64
65%package devel
66Summary: Development files for the ncurses library
67Group: Development/Libraries
68Requires: %{name}-libs = %{version}-%{release}
69Requires: pkgconfig
70Obsoletes: libtermcap-devel < 2.0.8-48
71Provides: libtermcap-devel = 2.0.8-48
72
73%description devel
74The header files and libraries for developing applications that use
75the ncurses terminal handling library.
76
77Install the ncurses-devel package if you want to develop applications
78which will use ncurses.
79
80#%package static
81#Summary: Static libraries for the ncurses library
82#Group: Development/Libraries
83#Requires: %{name}-devel = %{version}-%{release}
84
85#%description static
86#The ncurses-static package includes static libraries of the ncurses library.
87
88%prep
89%setup -q
90
91%patch1 -p1 -b .os2~
92
93# this will be in documentation, drop executable bits
94#cp -p install-sh test
95#chmod 644 test/*
96
97#for f in ANNOUNCE; do
98# iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&
99# touch -r ${f}{,_} && mv -f ${f}{_,}
100#done
101
102%build
103%define rootdatadir /@unixroot/lib
104%define ncurses_options \\\
105 --with-shared --without-ada --with-ospeed=unsigned \\\
106 --enable-hard-tabs --enable-xmc-glitch --enable-colorfgbg \\\
107 --with-terminfo-dirs=%{_sysconfdir}/terminfo:%{_datadir}/terminfo:%{rootdatadir}/terminfo \\\
108 --enable-overwrite \\\
109 --enable-pc-files \\\
110 --with-termlib=tinfo \\\
111 --with-chtype=long
112
113#export PKG_CONFIG_LIBDIR=%{_libdir}/pkgconfig
114
115export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
116export AWK="awk" ; \
117export CC="gcc" ; \
118export CXX="gcc" ; \
119export AR_OPTS="cru" ; \
120export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
121export LIBS="-lurpo -lmmap -lpthread" ; \
122%configure \
123 --with-shared --without-normal --without-debug \
124 --without-cxx-binding \
125 --without-ada --with-ospeed=unsigned \
126 --enable-hard-tabs --enable-xmc-glitch --enable-colorfgbg \
127 --with-default-terminfo-dir=/@unixroot/usr/share/terminfo \
128 --enable-overwrite \
129 --enable-pc-files \
130 --with-termlib=tinfo \
131 --with-chtype=long \
132 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
133
134make %{_smp_mflags}
135
136%install
137rm -rf ${RPM_BUILD_ROOT}
138
139#make -C narrowc DESTDIR=$RPM_BUILD_ROOT install.{libs,progs,data}
140#rm -f $RPM_BUILD_ROOT%{_libdir}/libtinfo.*
141#make -C widec DESTDIR=$RPM_BUILD_ROOT install.{libs,includes,man}
142
143make DESTDIR=$RPM_BUILD_ROOT install
144
145#chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.*.*
146#chmod 644 ${RPM_BUILD_ROOT}%{_libdir}/lib*.a
147
148# move lib{ncurses{,w},tinfo}.so.* to /lib*
149#mkdir $RPM_BUILD_ROOT/%{_lib}
150#mv $RPM_BUILD_ROOT%{_libdir}/lib{ncurses{,w},tinfo}.so.* $RPM_BUILD_ROOT/%{_lib}
151#for l in $RPM_BUILD_ROOT%{_libdir}/lib{ncurses{,w},tinfo}.so; do
152# ln -sf $(echo %{_libdir} | \
153# sed 's,\(^/\|\)[^/][^/]*,..,g')/%{_lib}/$(readlink $l) $l
154#done
155
156mv $RPM_BUILD_ROOT%{_bindir}/*.dll $RPM_BUILD_ROOT/%{_libdir}
157
158#mkdir -p $RPM_BUILD_ROOT%{rootdatadir}/terminfo
159mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/terminfo
160
161# move few basic terminfo entries to /lib
162#baseterms=
163#for termname in \
164# ansi dumb linux vt100 vt100-nav vt102 vt220 vt52
165#do
166# for t in $(find $RPM_BUILD_ROOT%{_datadir}/terminfo \
167# -samefile $RPM_BUILD_ROOT%{_datadir}/terminfo/${termname::1}/$termname)
168# do
169# baseterms="$baseterms $(basename $t)"
170# done
171#done
172#for termname in $baseterms; do
173# termpath=terminfo/${termname::1}/$termname
174# mkdir $RPM_BUILD_ROOT%{rootdatadir}/terminfo/${termname::1} &> /dev/null || :
175# mv $RPM_BUILD_ROOT%{_datadir}/$termpath $RPM_BUILD_ROOT%{rootdatadir}/$termpath
176# ln -s $(dirname %{_datadir}/$termpath | \
177# sed 's,\(^/\|\)[^/][^/]*,..,g')%{rootdatadir}/$termpath \
178# $RPM_BUILD_ROOT%{_datadir}/$termpath
179#done
180
181# prepare -base and -term file lists
182#for termname in \
183# Eterm\* aterm bterm cons25 cygwin eterm\* gnome gnome-256color hurd jfbterm \
184# konsole konsole-256color mach\* mlterm mrxvt nsterm putty\* pcansi \
185# rxvt rxvt-\* screen screen-\* screen.\* sun teraterm teraterm2.3 \
186# vwmterm wsvt25\* xfce xterm xterm-\*
187#do
188# for i in $RPM_BUILD_ROOT%{_datadir}/terminfo/?/$termname; do
189# for t in $(find $RPM_BUILD_ROOT%{_datadir}/terminfo -samefile $i); do
190# baseterms="$baseterms $(basename $t)"
191# done
192# done
193#done 2> /dev/null
194#for t in $baseterms; do
195# echo "%dir %{_datadir}/terminfo/${t::1}"
196# echo %{_datadir}/terminfo/${t::1}/$t
197#done 2> /dev/null | sort -u > terms.base
198#find $RPM_BUILD_ROOT%{_datadir}/terminfo \! -type d | \
199# sed "s|^$RPM_BUILD_ROOT||" | while read t
200#do
201# echo "%dir $(dirname $t)"
202# echo $t
203#done 2> /dev/null | sort -u | comm -2 -3 - terms.base > terms.term
204
205# can't replace directory with symlink (rpm bug), symlink all headers
206#mkdir $RPM_BUILD_ROOT%{_includedir}/ncurses{,w}
207#for l in $RPM_BUILD_ROOT%{_includedir}/*.h; do
208# ln -s ../$(basename $l) $RPM_BUILD_ROOT%{_includedir}/ncurses
209# ln -s ../$(basename $l) $RPM_BUILD_ROOT%{_includedir}/ncursesw
210#done
211
212# don't require -ltinfo when linking with --no-add-needed
213#for l in $RPM_BUILD_ROOT%{_libdir}/libncurses{,w}.so; do
214# soname=$(basename $(readlink $l))
215# rm -f $l
216# echo "INPUT($soname -ltinfo)" > $l
217#done
218
219#rm -f $RPM_BUILD_ROOT%{_libdir}/libcurses{,w}.so
220#echo "INPUT(-lncurses)" > $RPM_BUILD_ROOT%{_libdir}/libcurses.so
221#echo "INPUT(-lncursesw)" > $RPM_BUILD_ROOT%{_libdir}/libcursesw.so
222
223#echo "INPUT(-ltinfo)" > $RPM_BUILD_ROOT%{_libdir}/libtermcap.so
224
225rm -f $RPM_BUILD_ROOT%{_libdir}/terminfo
226#rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/{*_g,ncurses++*}.pc
227
228#bzip2 NEWS
229
230#%post libs -p /sbin/ldconfig
231
232#%postun libs -p /sbin/ldconfig
233
234%files
235%defattr(-,root,root)
236%doc ANNOUNCE AUTHORS NEWS README TO-DO
237%{_bindir}/[cirt]*
238%{_mandir}/man1/*
239%{_mandir}/man5/*
240%{_mandir}/man7/*
241
242%files libs
243%defattr(-,root,root)
244%{_libdir}/*.dll
245
246%files base
247# -f terms.base
248%defattr(-,root,root)
249%dir %{_sysconfdir}/terminfo
250#%dir %{rootdatadir}/terminfo
251%{_datadir}/tabset
252%{_datadir}/terminfo
253
254#%files term
255# -f terms.term
256#%defattr(-,root,root)
257
258%files devel
259%defattr(-,root,root)
260#%doc test
261#%doc doc/html/hackguide.html
262#%doc doc/html/ncurses-intro.html
263#%doc c++/README*
264#%doc misc/ncurses.supp
265%{_bindir}/ncurses*-config
266%{_libdir}/*.dll
267%{_libdir}/*.a
268%{_libdir}/*.lib
269#%{_libdir}/pkgconfig/*.pc
270#%dir %{_includedir}/ncurses
271#%dir %{_includedir}/ncursesw
272#%{_includedir}/ncurses/*.h
273#%{_includedir}/ncursesw/*.h
274%{_includedir}/*.h
275%{_mandir}/man3/*
276
277#%files static
278#%defattr(-,root,root)
279#%{_libdir}/lib*.a
280
281%clean
282rm -rf ${RPM_BUILD_ROOT}
283
284%changelog
285* Mon Jan 16 2012 yd
286- rebuild with libc 0.6.4 runtime.
Note: See TracBrowser for help on using the repository browser.