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

Last change on this file since 62 was 25, checked in by Yuri Dario, 15 years ago

spec: added ncurses package.

  • Property svn:eol-style set to native
File size: 8.2 KB
Line 
1
2Summary: Ncurses support utilities
3Name: ncurses
4Version: 5.7
5Release: 1
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 AR_OPTS="cru" ; \
116export CONFIG_SHELL="/bin/sh" ; \
117export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
118export LIBS="-lurpo -lmmap -lpthread" ; \
119%configure \
120 --with-shared --without-normal --without-debug \
121 --without-ada --with-ospeed=unsigned \
122 --enable-hard-tabs --enable-xmc-glitch --enable-colorfgbg \
123 --with-default-terminfo-dir=/@unixroot/usr/share/terminfo \
124 --enable-overwrite \
125 --enable-pc-files \
126 --with-termlib=tinfo \
127 --with-chtype=long \
128 "--cache-file=%{_topdir}/cache/%{name}.cache"
129
130make %{_smp_mflags}
131
132%install
133rm -rf ${RPM_BUILD_ROOT}
134
135#make -C narrowc DESTDIR=$RPM_BUILD_ROOT install.{libs,progs,data}
136#rm -f $RPM_BUILD_ROOT%{_libdir}/libtinfo.*
137#make -C widec DESTDIR=$RPM_BUILD_ROOT install.{libs,includes,man}
138
139make DESTDIR=$RPM_BUILD_ROOT install
140
141#chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/lib*.so.*.*
142#chmod 644 ${RPM_BUILD_ROOT}%{_libdir}/lib*.a
143
144# move lib{ncurses{,w},tinfo}.so.* to /lib*
145#mkdir $RPM_BUILD_ROOT/%{_lib}
146#mv $RPM_BUILD_ROOT%{_libdir}/lib{ncurses{,w},tinfo}.so.* $RPM_BUILD_ROOT/%{_lib}
147#for l in $RPM_BUILD_ROOT%{_libdir}/lib{ncurses{,w},tinfo}.so; do
148# ln -sf $(echo %{_libdir} | \
149# sed 's,\(^/\|\)[^/][^/]*,..,g')/%{_lib}/$(readlink $l) $l
150#done
151
152mv "$RPM_BUILD_ROOT%{_bindir}/*.dll" $RPM_BUILD_ROOT/%{_libdir}
153
154mkdir -p $RPM_BUILD_ROOT%{rootdatadir}/terminfo
155mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/terminfo
156
157# move few basic terminfo entries to /lib
158#baseterms=
159#for termname in \
160# ansi dumb linux vt100 vt100-nav vt102 vt220 vt52
161#do
162# for t in $(find $RPM_BUILD_ROOT%{_datadir}/terminfo \
163# -samefile $RPM_BUILD_ROOT%{_datadir}/terminfo/${termname::1}/$termname)
164# do
165# baseterms="$baseterms $(basename $t)"
166# done
167#done
168#for termname in $baseterms; do
169# termpath=terminfo/${termname::1}/$termname
170# mkdir $RPM_BUILD_ROOT%{rootdatadir}/terminfo/${termname::1} &> /dev/null || :
171# mv $RPM_BUILD_ROOT%{_datadir}/$termpath $RPM_BUILD_ROOT%{rootdatadir}/$termpath
172# ln -s $(dirname %{_datadir}/$termpath | \
173# sed 's,\(^/\|\)[^/][^/]*,..,g')%{rootdatadir}/$termpath \
174# $RPM_BUILD_ROOT%{_datadir}/$termpath
175#done
176
177# prepare -base and -term file lists
178#for termname in \
179# Eterm\* aterm bterm cons25 cygwin eterm\* gnome gnome-256color hurd jfbterm \
180# konsole konsole-256color mach\* mlterm mrxvt nsterm putty\* pcansi \
181# rxvt rxvt-\* screen screen-\* screen.\* sun teraterm teraterm2.3 \
182# vwmterm wsvt25\* xfce xterm xterm-\*
183#do
184# for i in $RPM_BUILD_ROOT%{_datadir}/terminfo/?/$termname; do
185# for t in $(find $RPM_BUILD_ROOT%{_datadir}/terminfo -samefile $i); do
186# baseterms="$baseterms $(basename $t)"
187# done
188# done
189#done 2> /dev/null
190#for t in $baseterms; do
191# echo "%dir %{_datadir}/terminfo/${t::1}"
192# echo %{_datadir}/terminfo/${t::1}/$t
193#done 2> /dev/null | sort -u > terms.base
194#find $RPM_BUILD_ROOT%{_datadir}/terminfo \! -type d | \
195# sed "s|^$RPM_BUILD_ROOT||" | while read t
196#do
197# echo "%dir $(dirname $t)"
198# echo $t
199#done 2> /dev/null | sort -u | comm -2 -3 - terms.base > terms.term
200
201# can't replace directory with symlink (rpm bug), symlink all headers
202#mkdir $RPM_BUILD_ROOT%{_includedir}/ncurses{,w}
203#for l in $RPM_BUILD_ROOT%{_includedir}/*.h; do
204# ln -s ../$(basename $l) $RPM_BUILD_ROOT%{_includedir}/ncurses
205# ln -s ../$(basename $l) $RPM_BUILD_ROOT%{_includedir}/ncursesw
206#done
207
208# don't require -ltinfo when linking with --no-add-needed
209#for l in $RPM_BUILD_ROOT%{_libdir}/libncurses{,w}.so; do
210# soname=$(basename $(readlink $l))
211# rm -f $l
212# echo "INPUT($soname -ltinfo)" > $l
213#done
214
215#rm -f $RPM_BUILD_ROOT%{_libdir}/libcurses{,w}.so
216#echo "INPUT(-lncurses)" > $RPM_BUILD_ROOT%{_libdir}/libcurses.so
217#echo "INPUT(-lncursesw)" > $RPM_BUILD_ROOT%{_libdir}/libcursesw.so
218
219#echo "INPUT(-ltinfo)" > $RPM_BUILD_ROOT%{_libdir}/libtermcap.so
220
221rm -f $RPM_BUILD_ROOT%{_libdir}/terminfo
222#rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/{*_g,ncurses++*}.pc
223
224#bzip2 NEWS
225
226#%post libs -p /sbin/ldconfig
227
228#%postun libs -p /sbin/ldconfig
229
230%files
231%defattr(-,root,root)
232%doc ANNOUNCE AUTHORS NEWS README TO-DO
233%{_bindir}/[cirt]*
234%{_mandir}/man1/*
235%{_mandir}/man5/*
236%{_mandir}/man7/*
237
238%files libs
239%defattr(-,root,root)
240%{_libdir}/*.dll
241
242%files base
243# -f terms.base
244%defattr(-,root,root)
245%dir %{_sysconfdir}/terminfo
246%dir %{rootdatadir}/terminfo
247%{_datadir}/tabset
248%{_datadir}/terminfo
249
250#%files term
251# -f terms.term
252#%defattr(-,root,root)
253
254%files devel
255%defattr(-,root,root)
256#%doc test
257#%doc doc/html/hackguide.html
258#%doc doc/html/ncurses-intro.html
259#%doc c++/README*
260#%doc misc/ncurses.supp
261%{_bindir}/ncurses*-config
262%{_libdir}/*.dll
263%{_libdir}/*.a
264%{_libdir}/*.lib
265#%{_libdir}/pkgconfig/*.pc
266#%dir %{_includedir}/ncurses
267#%dir %{_includedir}/ncursesw
268#%{_includedir}/ncurses/*.h
269#%{_includedir}/ncursesw/*.h
270%{_includedir}/*.h
271%{_mandir}/man3/*
272
273#%files static
274#%defattr(-,root,root)
275#%{_libdir}/lib*.a
276
277%clean
278rm -rf ${RPM_BUILD_ROOT}
279
280%changelog
Note: See TracBrowser for help on using the repository browser.