e16f75207bc54555acdeb665581bbe5da47f167f
[platform/upstream/ncurses.git] / packaging / ncurses.spec
1 #
2 # spec file for package ncurses
3 #
4 # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
16 #
17
18
19 Name:           ncurses
20 %define terminfo() %{_datadir}/%{0}/%{1}
21 %define tabset()   %{_datadir}/%{0}/%{1}
22 Version:        5.9
23 Release:        0
24 License:        MIT
25 Summary:        New curses Libraries
26 Url:            http://invisible-island.net/ncurses/ncurses.html
27 Group:          System/Base
28 Source0:        ncurses-%{version}.tar.bz2
29 Source1:        ncurses-%{version}-patches.tar.bz2
30 Source2:        handle.linux
31 Source3:        README.devel
32 Source4:        ncurses-rpmlintrc
33 Source5:        tack-1.07-20120303.tar.bz2
34 Source6:        edit.sed
35 Source7:        baselibs.conf
36 Patch0:         ncurses-%{version}.dif
37 Patch1:         ncurses-5.9-overflow.dif
38 Patch3:         ncurses-5.9-overwrite.dif
39 Patch4:         ncurses-5.7-tack.dif
40 Patch5:         ncurses-5.9-environment.dif
41 #!BuildIgnore: terminfo
42 BuildRequires:  gcc-c++
43 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
44 %global         _sysconfdir /etc
45 %global         _miscdir    %{_datadir}/misc
46 %global         _incdir     %{_includedir}
47 %global         root        %{_tmppath}/%{name}-%{version}-store
48 %global         abi         %(ver=%{version}; echo ${ver%.*})
49
50 %description
51 As soon as a text application needs to directly control its output to
52 the screen (if it wants to place the cursor at location (x,y) then
53 write text), ncurses is used. The panel and the forms libraries are
54 included in this package. These new libraries support color, special
55 characters, and panels.
56
57 %package -n ncurses-utils
58 License:        MIT
59 Summary:        Tools using the new curses libraries
60 Group:          System/Base
61 Provides:       ncurses:%{_bindir}/tput
62
63 %description -n ncurses-utils
64 The ncurses based utilities are as follows:
65
66 clear -- emits clear-screen for current terminal
67
68 tabs -- set tabs on a terminal
69
70 toe   -- table of entries utility
71
72 tput  -- shell-script access to terminal capabilities.
73
74 tset  -- terminal-initialization utility
75
76 reset -- terminal initialization utility
77
78 %package -n terminfo-base
79 License:        MIT
80 Summary:        A terminal descriptions database
81 Group:          System/Base
82 Provides:       ncurses:%{_datadir}/tabset
83
84 %description -n terminfo-base
85 This is the terminfo basic database, maintained in the ncurses package.
86 This database is the official successor to the 4.4BSD termcap file and
87 contains information about any known terminal. The ncurses library
88 makes use of this database to use terminals correctly.
89
90 %if %abi == 5
91
92 %package -n libncurses
93 License:        MIT
94 Summary:        The New curses Libraries
95 Group:          System/Libraries
96 Requires:       terminfo-base
97 Recommends:     ncurses-utils = %{version}
98 Provides:       ncurses = %{version}
99 Obsoletes:      ncurses < %{version}
100
101 %description -n libncurses
102 The ncurses library is used by the most curses based terminal
103 applications for controling its output and input to the screen.
104
105 %endif
106
107 %package -n libncurses6
108 License:        MIT
109 Summary:        The New curses Libraries
110 Group:          System/Libraries
111 Requires:       terminfo-base
112 %if %abi == 5
113 Provides:       ncurses = 6.0
114 %else
115 Provides:       ncurses = %{version}
116 %endif
117
118 %description -n libncurses6
119 The ncurses library is used by the most curses based terminal
120 applications for controling its output and input to the screen.
121
122 %package -n terminfo
123 License:        SUSE-Public-Domain
124 Summary:        A terminal descriptions database
125 Group:          System/Base
126
127 %description -n terminfo
128 This is the terminfo reference database, maintained in the ncurses
129 package. This database is the official successor to the 4.4BSD termcap
130 file and contains information about any known terminal. The ncurses
131 library makes use of this database to use terminals correctly. If you
132 just use the Linux console, xterm, and VT100, you probably will not
133 need this database -- a minimal /usr/share/terminfo tree for these
134 terminals is already included in the terminfo-base package.
135
136 %package -n ncurses-devel
137 License:        MIT
138 Summary:        Include Files and Libraries mandatory for Development
139 Group:          Development/Libraries/C and C++
140 Requires:       %{_bindir}/tack
141 Requires:       ncurses = %{version}
142 Provides:       ncurses:%{_incdir}/ncurses.h
143 %if %abi >= 6
144 Requires:       libncurses6 = %{version}
145 %else
146 Requires:       libncurses = %{version}
147 Requires:       libncurses6 = %{version}
148 %endif
149
150 %description -n ncurses-devel
151 This package contains all necessary include files and libraries needed
152 to develop applications that require these.
153
154 %package -n tack
155 License:        GPL-2.0+
156 Summary:        Terminfo action checker
157 Group:          Development/Tools/Building
158 Requires:       ncurses = %{version}
159 Provides:       ncurses-devel:%{_bindir}/tack
160
161 %description -n tack
162 This package contains the tack utility to help to build a new terminfo
163 entry describing an unknown terminal. It can also be used to test the
164 correctness of an existing entry, and to develop the correct pad
165 timings needed to ensure that screen updates do not fall behind the
166 incoming data stream.
167
168 %prep
169 %setup -q -n ncurses-%{version}
170 rm -fr tack
171 rm -f  Ada95/src/terminal_interface-curses.adb
172 rm -f  mkinstalldirs
173 tar Oxfj %{SOURCE1} | patch -p1 -s
174 tar  xfj %{SOURCE5}
175 mv tack-* tack
176 %patch1 -p0 -b .of
177 %patch3 -p0 -b .ow
178 %patch4 -p0 -b .hs
179 %patch5 -p0 -b .lc
180 %patch0 -p0 -b .p0
181 rm -vf include/ncurses_dll.h
182 rm -vf mkdirs.sh
183 rm -vf tar-copy.sh
184 rm -vf mk-dlls.sh
185
186 %build
187     cflags ()
188     {
189         local flag=$1; shift
190         local var=$1; shift
191         test -n "${flag}" -a -n "${var}" || return
192         case "${!var}" in
193         *${flag}*) return
194         esac
195         set -o noclobber
196         case "$flag" in
197         -Wl,*)
198             if echo 'int main () { return 0; }' | \
199                ${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
200                 eval $var=\${$var:+\$$var\ }$flag
201             fi
202             ;;
203         *)
204             if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
205                 eval $var=\${$var:+\$$var\ }$flag
206             fi
207             if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
208                 eval $var=\${$var:+\$$var\ }$flag
209             fi
210         esac
211         set +o noclobber
212     }
213
214     test ! -f /.buildenv || . /.buildenv
215        OPATH=$PATH
216       FALLBK="xterm,linux,vt100,vt102"
217           CC=gcc
218          CXX=g++
219     CFLAGS="%{optflags} -pipe -D_REENTRANT"
220     if [[ "$BUILD_BASENAME" = debug-* ]] ; then
221         CFLAGS="${CFLAGS} -g -DTRACE"
222     fi
223     cflags -Wl,-O2                  LDFLAGS
224     cflags -Wl,-Bsymbolic-functions LDFLAGS
225     cflags -Wl,--hash-size=8599     LDFLAGS
226     cflags -Wl,--as-needed          LDFLAGS
227     CXXFLAGS=$CFLAGS
228     test -n "$TERM" || TERM=linux
229     GZIP="-9"
230     export CC CFLAGS CXX CXXFLAGS GZIP TERM LDFLAGS
231     #
232     # Detect 64bit architecures and be sure that
233     # we use an unsigned long for chtype to be
234     # backward compatible with ncurses 5.4
235     #
236     echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 -
237     if ./test64 ; then
238         WITHCHTYPE="--with-chtype=long"
239     else
240         WITHCHTYPE=""
241         CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCES -D_FILE_OFFSET_BITS=64"
242     fi
243     rm -f ./test64
244     #
245     # For security of some configure and install scripts
246     #
247     TMPDIR=$(mktemp -d /tmp/ncurses.XXXXXXXX) || exit 1
248     trap 'rm -rf ${TMPDIR}' EXIT
249     export TMPDIR
250     #
251     # No --enable-term-driver as this had crashed last time
252     # in ncurses/tinfo/lib_setup.c due to the fact that
253     # _nc_globals.term_driver was a NULL function pointer
254     #
255     # No --enable-tcap-names because we may have to recompile
256     # programs or foreign programs won't work
257     #
258     # No --enable-safe-sprintf because this seems to
259     # crash on some architectures
260     #
261     # No --enable-xmc-glitch because this seems to break yast2
262     # on console/konsole (no magic cookie support on those?)
263     #
264     # No --with-termlib=tinfo because libncurses depend on
265     # libtinfo (is linked with) and therefore there is no
266     # advantage about splitting of a libtinfo (IMHO).
267     #
268     touch --reference=README config.sub config.guess
269     %configure \
270         --without-ada           \
271         --without-debug         \
272         --without-profile       \
273         --without-manpage-tbl   \
274         --with-shared           \
275         --with-normal           \
276         --with-manpage-format=gzip \
277         --with-manpage-renames=${PWD}/man/man_db.renames \
278         --with-manpage-aliases  \
279         --with-ospeed=speed_t   \
280         --with-gpm              \
281         --with-dlsym            \
282         --with-termlib=tinfo    \
283         --with-ticlib=tic       \
284         --with-xterm-kbs=del    \
285         --disable-root-environ  \
286         --disable-termcap       \
287         --disable-overwrite     \
288         --disable-rpath         \
289         --disable-leaks         \
290         --disable-xmc-glitch    \
291         --enable-symlinks       \
292         --enable-big-core       \
293         --enable-const          \
294         --enable-hashmap        \
295         --enable-no-padding     \
296         --enable-symlinks       \
297         --enable-sigwinch       \
298         --enable-colorfgbg      \
299         --enable-sp-funcs       \
300 %if %abi >= 6
301         --with-pthread          \
302         --enable-reentrant      \
303         --enable-ext-mouse      \
304         --disable-widec         \
305         --enable-ext-colors     \
306 %else
307         --without-pthread       \
308         --disable-reentrant     \
309         --disable-ext-mouse     \
310         --disable-widec         \
311         --disable-ext-colors    \
312 %endif
313         --enable-weak-symbols   \
314         --enable-wgetch-events  \
315         --enable-pthreads-eintr \
316         --enable-string-hacks   \
317         --prefix=%{_prefix}     \
318         --exec-prefix=%{_prefix}\
319         --libdir=%{_libdir}     \
320         --datadir=%{_datadir}   \
321         --mandir=%{_mandir}     \
322         --includedir=%{_incdir} \
323         "${WITHCHTYPE}"         \
324         --disable-widec         \
325         --disable-tic-depends   \
326         --with-ticlib=tic
327     #
328     #  The configure line
329     #
330     c=$(grep '^ *$ *\./configure' config.log)
331     #
332     # This is a hack to be able to boot strap
333     # a libncurses with correct fallback.c.
334     #
335     make %{?_smp_mflags} -C include
336     make %{?_smp_mflags} -C ncurses fallback.c FALLBACK_LIST=""
337     make %{?_smp_mflags} -C progs   termsort.c transform.h infocmp tic
338     rm   -f ncurses/fallback.c
339     PATH=$PWD/progs:$OPATH
340     LD_LIBRARY_PATH=$PWD/lib
341     export LD_LIBRARY_PATH PATH
342     pushd ncurses/
343         TERMINFO=$PWD/tmp
344         export TERMINFO
345         mkdir -p $TERMINFO
346 %if 0%{?_crossbuild}
347 export BUILD_TIC=/usr/bin/tic
348 %else
349 export BUILD_TIC=$PWD/../progs/tic
350 %endif
351         $BUILD_TIC -I -r -e $FALLBK ../misc/terminfo.src > terminfo.src
352         $BUILD_TIC -o $TERMINFO -s terminfo.src
353         sh -e ./tinfo/MKfallback.sh $TERMINFO ../misc/terminfo.src $BUILD_TIC ${FALLBK//,/ } > fallback.c
354         rm -rf $TERMINFO
355         unset  TERMINFO
356         cp -p fallback.c ../fallback.c.backup
357     popd
358     PATH=$OPATH
359     unset LD_LIBRARY_PATH
360     #
361     # Refresh second install path
362     #
363     rm -rf %{root}
364     mkdir  %{root}
365     #
366     # Now rebuild libncurses and do the rest of this job
367     #
368     find -name fallback.o | xargs -r rm -vf
369     cp fallback.c.backup ncurses/fallback.c
370     make %{?_smp_mflags}
371     lib=%{_libdir}
372     inc=%{_incdir}/ncurses
373     # must not use %jobs here (would lead to: ln: ncurses.h already exists)
374     make install DESTDIR=%{root} includedir=${inc} libdir=${lib}
375     ln -sf ${inc##*/}/{curses,ncurses,term,termcap}.h %{root}${inc%%/*}/
376     sh %{SOURCE6} --cflags "-I${inc}" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses5-config
377     #
378     # Check for tack program on base of above ncurses
379     #
380     LD_LIBRARY_PATH=$PWD/lib
381     export LD_LIBRARY_PATH PATH
382     pushd tack/
383 %if 0%{?qemu_user_space_build:1}%{?_crossbuild}
384         echo "Skipping LDD test due to running under QEMU / cross-building"
385 %else
386         ldd ./tack
387 %endif
388     popd
389     unset LD_LIBRARY_PATH
390     test ! -L tack || rm -f tack
391 %if %abi < 6
392     #
393     # Now use --with-pthread for reentrant pthread support (abi > 5).
394     #
395     eval ./${c#*./} --with-pthread --enable-reentrant --enable-ext-mouse --disable-widec --disable-ext-colors --without-progs
396     find -name fallback.o | xargs -r rm -vf
397     cp fallback.c.backup ncurses/fallback.c
398     make %{?_smp_mflags}
399     lib=%{_libdir}/ncurses6
400     inc=%{_incdir}/ncurses6/ncurses
401     # must not use %jobs here (would lead to: ln: ncurses.h already exists)
402     make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
403     ln -sf ${inc##*/}/{curses,ncurses,term}.h %{root}${inc%%/*}/
404     sh %{SOURCE6} --cflags "-I${inc} -I${inc%%/*}" --libs "-L${lib} -lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses6-config
405     pushd man
406         sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1
407     popd
408 %endif
409     #
410     # Now use --enable-widec for UTF8/wide character support.
411     # The libs with 16 bit wide characters are binary incompatible
412     # to the normal 8bit wide character libs.
413     #
414 %if %abi >= 6
415     eval ./${c#*./} --with-pthread --enable-reentrant --enable-ext-mouse --enable-widec --enable-ext-colors --without-progs
416 %else
417     eval ./${c#*./} --disable-ext-mouse --enable-widec --disable-ext-colors --without-progs
418 %endif
419     find -name fallback.o | xargs -r rm -vf
420     cp fallback.c.backup ncurses/fallback.c
421     make %{?_smp_mflags}
422     lib=%{_libdir}
423     inc=%{_incdir}/ncursesw
424     # must not use %jobs here (would lead to: ln: ncurses.h already exists)
425     make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
426     sh %{SOURCE6} --cflags "-I${inc}" --libs "-lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw5-config
427     pushd man
428         sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1
429     popd
430 %if %abi < 6
431     #
432     # Do both --enable-widec and --with-pthread (abi > 5).
433     #
434     eval ./${c#*./} --with-pthread --enable-reentrant --enable-ext-mouse --enable-widec --enable-ext-colors --without-progs
435     find -name fallback.o | xargs -r rm -vf
436     cp fallback.c.backup ncurses/fallback.c
437     make %{?_smp_mflags}
438     lib=%{_libdir}/ncurses6
439     inc=%{_incdir}/ncurses6/ncursesw
440     # must not use %jobs here (would lead to: ln: ncurses.h already exists)
441     make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
442     sh %{SOURCE6} --cflags "-I${inc} -I${inc%%/*}" --libs "-L${lib} -lncursesw" --libs "-ltinfo" %{root}%{_bindir}/ncursesw6-config
443     pushd man
444         sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw6-config.1
445     popd
446 %endif
447
448 %install
449     GZIP="-9"
450     export GZIP
451     (cd %{root}/; tar -cpsSf - *)|tar -xpsSf - -C %{buildroot}/
452     rm -rf %{root}
453     mkdir %{buildroot}/%{_lib}
454     for model in libncurses libncursest libncursesw libncursestw libtinfo
455     do
456         for lib in %{buildroot}%{_libdir}/${model}.so.* ; do
457             test   -e "${lib}" || continue
458             mv "${lib}" %{buildroot}/%{_lib}/ || continue
459         done
460         for lib in %{buildroot}/%{_lib}/${model}.so.%{abi} ; do
461             test -e "${lib}" || continue
462             test -L "${lib}" || continue
463             lib=${lib#%{buildroot}}
464             lnk=%{buildroot}%{_libdir}/${model}.so
465             case "${lib##*/}" in
466             libncurses*)
467                 rm -f ${lnk}
468                 echo '/* GNU ld script */'              >  ${lnk}
469                 echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
470                 ;;
471             *)  ln -sf ${lib} %{buildroot}%{_libdir}/${model}.so
472             esac
473         done
474     done
475 %if 0
476     lnk=%{buildroot}%{_libdir}/libtermcap.so
477     echo '/* GNU ld script */'          >  ${lnk}
478     echo "INPUT(AS_NEEDED(-ltinfo))"    >> ${lnk}
479 %endif
480     chmod 0755 %{buildroot}/%{_lib}/lib*.so.*
481     chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
482     chmod a-x  %{buildroot}/%{_libdir}/lib*.a
483 %if %abi < 6
484     if test -d %{buildroot}%{_libdir}/ncurses6 ; then
485         mv %{buildroot}%{_libdir}/ncurses6/*.so.6*   %{buildroot}%{_libdir}/
486         for lib in %{buildroot}%{_libdir}/ncurses6/*.so
487         do
488             lnk=$lib
489             lib=/%{_lib}/${lib##*/}.6
490             case "${lib##*/}" in
491             libncurses*)
492                 rm -f "${lnk}"
493                 echo '/* GNU ld script */'              >  ${lnk}
494                 echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
495                 ;;
496             libtinfo*)
497                 test -L "${lnk}" || continue
498                 ln -sf ${lib} ${lnk}
499                 ;;
500             *)
501                 test -L "${lnk}" || continue
502                 ln -sf ../${lib##*/} ${lnk}
503             esac
504         done
505         for model in libncurses libncursest libncursesw libncursestw libtinfo
506         do
507             for lib in %{buildroot}%{_libdir}/${model}.so.* ; do
508                 test   -e "${lib}" || continue
509                 mv "${lib}" %{buildroot}/%{_lib}/ || continue
510             done
511             for lib in %{buildroot}/%{_lib}/${model}.so.6 ; do
512                 test -e "${lib}" || continue
513                 test -L "${lib}" || continue
514                 lib=${lib#%{buildroot}}
515                 lnk=%{buildroot}%{_libdir}/ncurses6/${model}.so
516                 case "${lib##*/}" in
517                 libncurses*)
518                     rm -f ${lnk}
519                     echo '/* GNU ld script */'              >  ${lnk}
520                     echo 'SEARCH_DIR(%{_libdir}/ncurses6)'  >> ${lnk}
521                     echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
522                     ;;
523                 *)  ln -sf ${lib} %{buildroot}%{_libdir}/ncurses6/${model}.so
524             esac
525             done
526         done
527         chmod 0755 %{buildroot}/%{_lib}/lib*.so.6*
528         chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6*
529         chmod a-x  %{buildroot}/%{_libdir}/ncurses6/lib*.a
530     fi
531 %endif
532     test -n %{buildroot} || ldconfig -N
533     mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
534     bzip2 -c misc/terminfo.src > misc/terminfo.src.bz2
535     install -m 644 misc/terminfo.src.bz2        %{buildroot}%{_defaultdocdir}/ncurses/
536     install -m 644 doc/html/*.html              %{buildroot}%{_defaultdocdir}/ncurses/
537     bzip2 doc/ncurses-intro.doc -c > doc/ncurses-intro.txt.bz2
538     install -m 644 doc/ncurses-intro.txt.bz2    %{buildroot}%{_defaultdocdir}/ncurses/
539     bzip2 doc/hackguide.doc -c > doc/hackguide.txt.bz2
540     install -m 644 doc/hackguide.txt.bz2        %{buildroot}%{_defaultdocdir}/ncurses/
541     install -m 644 %{SOURCE3}                   %{buildroot}%{_defaultdocdir}/ncurses/
542     install -m 644 README                       %{buildroot}%{_defaultdocdir}/ncurses/
543     install -m 644 NEWS                         %{buildroot}%{_defaultdocdir}/ncurses/
544     mkdir -p %{buildroot}%{_sysconfdir}
545     mkdir -p %{buildroot}%{_miscdir}
546     LD_LIBRARY_PATH=$PWD/lib
547     export LD_LIBRARY_PATH
548     pushd ncurses/
549         { echo "# See annotated version in %{_defaultdocdir}/ncurses/terminfo.src.bz2"
550 %if 0%{?_crossbuild}
551         BUILD_TIC=/usr/bin/tic
552 %else
553         BUILD_TIC=$PWD/../progs/tic
554 %endif
555         $BUILD_TIC -C -r ../misc/terminfo.src | grep -E -v '^#'; } > termcap
556         # Gererate new termcap entries for various linux consoles
557         TERMCAP=termcap \
558         TERMINFO=%{buildroot}%{_datadir}/terminfo \
559             bash %{SOURCE2}
560         install -m 0644 termcap.new %{buildroot}%{_miscdir}/termcap
561     popd
562     unset LD_LIBRARY_PATH
563     if test `%{_bindir}/id -u` = '0' ; then
564         chown root:root %{buildroot}%{_miscdir}/termcap
565         chmod 0644      %{buildroot}%{_miscdir}/termcap
566     fi
567     ln -sf %{_miscdir}/termcap %{buildroot}%{_sysconfdir}/termcap
568     (cat > default.list) <<-EOF
569         %{tabset std}
570         %{tabset stdcrt}
571         %{tabset vt100}
572         %{tabset vt300}
573         %{terminfo a/ansi}
574         %{terminfo a/arpanet}
575         %{terminfo d/dumb}
576         %{terminfo d/dialup}
577         %{terminfo g/gnome}
578         %{terminfo g/gnome-rh72}
579         %{terminfo k/klone+color}
580         %{terminfo k/kvt}
581         %{terminfo k/kvt-rh}
582         %{terminfo l/linux}
583         %{terminfo l/linux-m}
584         %{terminfo l/linux-nic}
585         %{terminfo m/mlterm}
586         %{terminfo n/net}
587         %{terminfo n/network}
588         %{terminfo n/nxterm}
589         %{terminfo p/patch}
590         %{terminfo r/rxvt}
591         %{terminfo s/screen}
592         %{terminfo s/screen-w}
593         %{terminfo s/screen-256color}
594         %{terminfo s/sun}
595         %{terminfo s/switch}
596         %{terminfo u/unknown}
597         %{terminfo v/vt100}
598         %{terminfo v/vt102}
599         %{terminfo v/vt220}
600         %{terminfo v/vt220-8}
601         %{terminfo v/vt220-8bit}
602         %{terminfo v/vt320}
603         %{terminfo v/vt52}
604         %{terminfo x/xterm}
605         %{terminfo x/xterm-color}
606         %{terminfo x/xterm-256color}
607         %{terminfo x/xterm-basic}
608         %{terminfo x/xterm-nic}
609         %{terminfo x/xterm-r6}
610         EOF
611     find %{buildroot}%{tabset ""} %{buildroot}%{terminfo ""} \
612         \( -type f -or -type l \) | \
613         sed "s@^%{buildroot}@@g" | \
614         grep -v -F -x -f default.list \
615         > extension.list
616     rm -f %{buildroot}%{_prefix}/lib/terminfo
617 %if %abi < 6
618
619 %post   -n libncurses -p /sbin/ldconfig
620
621 %postun -n libncurses -p /sbin/ldconfig
622 %endif
623
624 %post   -n libncurses6 -p /sbin/ldconfig
625
626 %postun -n libncurses6 -p /sbin/ldconfig
627
628 %files -n terminfo-base -f default.list
629 %defattr(-,root,root)
630 %{_sysconfdir}/termcap
631 %config %{_miscdir}/termcap
632 %dir %{_datadir}/tabset/
633 %dir %{_datadir}/terminfo/
634 %dir %{_datadir}/terminfo/*/
635
636 %files -n ncurses-utils
637 %defattr(-,root,root)
638 %{_bindir}/clear
639 %{_bindir}/reset
640 %{_bindir}/tabs
641 %{_bindir}/toe
642 %{_bindir}/tput
643 %{_bindir}/tset
644 %doc %{_mandir}/man1/clear.1.gz
645 %doc %{_mandir}/man1/reset.1.gz
646 %doc %{_mandir}/man1/tabs.1.gz
647 %doc %{_mandir}/man1/toe.1.gz
648 %doc %{_mandir}/man1/tput.1.gz
649 %doc %{_mandir}/man1/tset.1.gz
650 %doc %{_mandir}/man5/*.gz
651 %if %abi == 5
652
653 %files -n libncurses
654 %defattr(-,root,root)
655 /%{_lib}/lib*.so.5*
656 %{_libdir}/lib*.so.5*
657 %endif
658
659 %files -n libncurses6
660 %defattr(-,root,root)
661 /%{_lib}/lib*.so.6*
662 %{_libdir}/lib*.so.6*
663
664 %files -n ncurses-devel
665 %defattr(-,root,root)
666 %dir %{_defaultdocdir}/ncurses/
667 %doc %{_defaultdocdir}/ncurses/*
668 %{_bindir}/ncurses*-config
669 %{_bindir}/captoinfo
670 %{_bindir}/infocmp
671 %{_bindir}/infotocap
672 %{_bindir}/tic
673 %dir %{_incdir}/ncurses/
674 %dir %{_incdir}/ncursesw/
675 %dir %{_incdir}/ncurses6/
676 %dir %{_incdir}/ncurses6/ncurses/
677 %dir %{_incdir}/ncurses6/ncursesw/
678 %{_incdir}/*.h
679 %{_incdir}/ncurses*/*.h
680 %{_incdir}/ncurses*/*/*.h
681 %dir %{_libdir}/ncurses6/
682 %{_libdir}/lib*.a
683 %{_libdir}/lib*.so
684 %{_libdir}/ncurses6/lib*.a
685 %{_libdir}/ncurses6/lib*.so
686 %doc %{_mandir}/man1/*-config.1.gz
687 %doc %{_mandir}/man1/captoinfo.1.gz
688 %doc %{_mandir}/man1/infocmp.1.gz
689 %doc %{_mandir}/man1/infotocap.1.gz
690 %doc %{_mandir}/man1/tic.1.gz
691 %doc %{_mandir}/man3/*.gz
692 %doc %{_mandir}/man7/*.gz
693
694 %files -n tack
695 %defattr(-,root,root)
696 %{_bindir}/tack
697 %doc %{_mandir}/man1/tack.1.gz
698
699 %files -f extension.list -n terminfo
700 %defattr(-,root,root)
701
702 %changelog