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