Пакет ncurses: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
Name: ncurses
Version: 5.6
Release: alt3

Packager: Stanislav Ievlev <inger@altlinux.org>

%define rootdatadir /lib

Summary: A CRT screen handling and optimization package
Copyright: MIT
Group: System/Base
Url: http://invisible-island.net/%name/%name.html
Source: ftp://invisible-island.net/%name/%name-%version.tar

Source100: %name-alt-terms.tar
Source101: %name-baseterms
Source102: %name-resetall.sh

Obsoletes: ncurses3
Requires: termutils-devel = 0:%version-%release

# Automatically added by buildreq on Tue Apr 27 2004
BuildRequires: libgpm-devel libncurses-devel libtinfo-devel sharutils

#build parameters
%def_with utf8
%def_with shared
%def_with normal
%def_without debug
%def_without profile
%def_without cxx
%def_with gpm
%def_without ada
%def_without libtool

%package -n terminfo
Summary: Descriptions of common terminal types
Group: System/Base
Conflicts: %name < 0:%version-%release
Conflicts: screen < 3.9.11-alt1

%package -n terminfo-extra
Summary: Additional terminal type definitions
Group: System/Base
Provides: %name-extraterms = %version
Obsoletes: %name-extraterms
PreReq: terminfo = 0:%version-%release

%package -n libtinfo
Summary: A low-level terminfo shared library
Group: System/Libraries
PreReq: terminfo = 0:%version-%release

%package -n libtinfo-devel
Summary: A low-level terminfo development library
Group: Development/C
Conflicts: libtermcap-devel < 0:2.0.8-ipl24mdk
# due to incorrect terminfo handling in old libgpm.
Conflicts: libgpm < 1.20.1-alt3.1
Requires: libtinfo = 0:%version-%release

%package -n libtinfo-devel-static
Summary: A low-level terminfo static library
Group: Development/C
Requires: libtinfo-devel = 0:%version-%release

%package -n termutils
Summary: Basic terminal utilities
Group: System/Base
PreReq: terminfo = 0:%version-%release, libtinfo = 0:%version-%release
Provides: /bin/tput

%package -n termutils-devel
Summary: Additional terminal utilities
Group: Development/Other
Requires: termutils = 0:%version-%release

%package -n lib%name
Summary: A CRT screen handling and optimization libraries
Group: System/Libraries
Provides: libncurses.so.4 libncurses.so.3
PreReq: libtinfo = 0:%version-%release
Conflicts: %name < 0:%version-%release

%package -n lib%name-devel
Summary: Development files for applications which use %name
Group: Development/C
Requires: lib%name = 0:%version-%release, libtinfo-devel = 0:%version-%release
Provides: %name-devel = 0:%version-%release
Obsoletes: %name-devel

%package -n lib%name-devel-static
Summary: Development static %name libraries
Group: Development/C
Requires: lib%name-devel = 0:%version-%release, libtinfo-devel-static = 0:%version-%release

%package -n lib%name++
Summary: C++ interface to lib%name
Group: System/Libraries
Requires: lib%name = 0:%version-%release

%package -n lib%name++-devel
Summary: Development files for applications which use lib%name++
Group: Development/C++
Requires: lib%name++ = 0:%version-%release, lib%name-devel = 0:%version-%release

%package -n lib%name++-devel-static
Summary: Development static lib%name++ library
Group: Development/C++
Requires: lib%name++-devel = 0:%version-%release, lib%name-devel-static = 0:%version-%release

# UTF-8 extentions
%if_with utf8
%package -n lib%{name}w
Summary: A CRT screen handling and optimization libraries with wide character support
Group: System/Libraries
PreReq: libtinfo = 0:%version-%release

%package -n lib%{name}w-devel
Summary: Development files for applications which use %name (widechar version)
Group: Development/C
Requires: lib%{name}w = 0:%version-%release, lib%name-devel = 0:%version-%release
%endif

%description
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

%description -n terminfo
Terminfo is a data base describing terminals, used by screen-oriented
programs and libraries such as curses(3X).  Terminfo describes terminals
by giving a set of capabilities which they have, by specifying how to
perform screen operations, and by specifying padding requirements and
initialization sequences.

This package contains what should be a reasonable subset of terminal
definitions, including: ansi, dumb, linux, rxvt, screen, sun, vt100,
vt102, vt220, vt52, and xterm.

%description -n terminfo-extra
Terminfo is a data base describing terminals, used by screen-oriented
programs and libraries such as curses(3X).  Terminfo describes terminals
by giving a set of capabilities which they have, by specifying how to
perform screen operations, and by specifying padding requirements and
initialization sequences.

This package contains all of the terminal definitions not found in
the terminfo package.  There are far too many to list here.

%description -n libtinfo
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains a low-level terminfo shared library.

%description -n libtinfo-devel
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains a low-level terminfo development library and include
files.

%description -n libtinfo-devel-static
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains a low-level terminfo static library.

%description -n termutils
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains basic terminal manipulation utilities.

%description -n termutils-devel
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains additional terminal manipulation utilities.

%description -n lib%name
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

%description -n lib%name-devel
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains include files for developing applications that use
the %name CRT screen handling and optimization package.

%description -n lib%name-devel-static
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains staic libraries for developing statically linked
applications that use the %name CRT screen handling and optimization package.

%description -n lib%name++
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains a c++ interface shared library.

%description -n lib%name++-devel
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains include files for developing applications that use
c++ interface to ncurses routines.

%description -n lib%name++-devel-static
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains staic library for developing statically linked
applications that use c++ interface to ncurses routines.

#UTF8 extentions
%if_with utf8
%description -n lib%{name}w
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.
This package contains a %name library with wide character support.

%description -n lib%{name}w-devel
The curses library routines are a terminal-independent method of updating
character screens with reasonable optimization.  The %name (new curses)
library is a freely distributable replacement for the discontinued 4.4BSD
classic curses library.

This package contains include files for developing applications that use
the %name CRT screen handling and optimization package (widechar version).
%endif

%prep
%setup -q -a100

%__subst 's/EXTRA_LIBS="-ldl -lncurses $EXTRA_LIBS"/EXTRA_LIBS="$EXTRA_LIBS"/
s/SHLIB_LIST="-ldl $SHLIB_LIST"/SHLIB_LIST="-lgpm $SHLIB_LIST"/ 
s/TINFO_LIST="$SHLIB_LIST"/TINFO_LIST=/' ./configure


%build
%remove_optflags %optflags_notraceback %optflags_nocpp
%ifarch %ix86
%add_optflags -momit-leaf-frame-pointer
%endif


# Predefine these for configure:
export \
	ac_cv_func_mkstemp=yes \
	ac_cv_prog_AWK=gawk \
	ac_cv_prog_MAKE_LOWER_TAGS=yes \
	ac_cv_prog_MAKE_UPPER_TAGS=yes \
	ac_cv_prog_MAN=man \
	#

%define _configure_script ../configure
%__rm -rf build-classic build-utf8
%__mkdir_p build-classic build-utf8

# configure classic version
pushd build-classic
%configure \
	--program-transform-name= \
	%{subst_with shared} \
	%{subst_with normal} \
	%{subst_with debug} \
	%{subst_with profile} \
	%{subst_with cxx} \
	%{subst_with ada} \
	%{subst_with libtool} \
	%{subst_with gpm} \
	--without-dlsym \
	--with-termlib \
	--with-ospeed="unsigned int" \
	--with-terminfo-dirs="%rootdatadir/terminfo:%_datadir/terminfo" \
	--disable-termcap \
	--enable-const \
	--enable-hard-tabs \
	--enable-no-padding \
	--enable-sigwinch \
	--enable-echo \
	--enable-warnings \
	--disable-rpath \
	--disable-root-environ \
	--disable-home-terminfo \
	--with-chtype=long \
	#

popd # build-classic

# configure utf8 version
%if_with utf8
pushd build-utf8
%configure \
	--program-transform-name= \
	%{subst_with shared} \
	%{subst_with normal} \
	%{subst_with debug} \
	%{subst_with profile} \
	%{subst_with cxx} \
	%{subst_with ada} \
	%{subst_with libtool} \
	%{subst_with gpm} \
	--without-dlsym \
	--with-termlib=tinfo \
	--with-ospeed="unsigned int" \
	--with-terminfo-dirs="%rootdatadir/terminfo:%_datadir/terminfo" \
	--disable-termcap \
	--enable-const \
	--enable-hard-tabs \
	--enable-no-padding \
	--enable-sigwinch \
	--enable-echo \
	--enable-warnings \
	--disable-rpath \
	--disable-root-environ \
	--disable-home-terminfo \
	--with-chtype=long \
	--enable-widec \
	#
# Workaround for utf8, rename libtinfow to libtinfo, addon for ncurses-*-alt-utf8-fix.patch
# will be removed when Thomas finish termlib=name feature
    find -type f -name Makefile -print0 |
	xargs -r0 subst s,tinfow,tinfo,g

popd # build-utf8
%endif # with_utf8

# build classic version
pushd build-classic
#NO SMP
%make

%if_with cxx
# Build c++ shared library.
pushd lib
g++ -shared -Wl,-soname,libncurses++.so.5 -o libncurses++.so.%version \
	-Wl,-whole-archive libncurses++.a -Wl,-no-whole-archive \
	-L. -lform -lmenu -lpanel -lncurses -ltinfo
%__ln_s libncurses++.so.%version libncurses++.so.5
%__ln_s libncurses++.so.5 libncurses++.so
popd # lib
# Rebuild c++ demo.
%__rm -f c++/demo
make -C c++
%endif # with_cxx
popd # build-classic

# build utf8 version
%if_with utf8
pushd build-utf8
#NO SMP
%make

%if_with cxx
# Build c++ shared library.
pushd lib
g++ -shared -Wl,-soname,libncursesw++.so.5 -o libncursesw++.so.%version \
	-Wl,-whole-archive libncursesw++.a -Wl,-no-whole-archive \
	-L. -lform -lmenu -lpanel -lncurses -ltinfo
%__ln_s libncursesw++.so.%version libncursesw++.so.5
%__ln_s libncursesw++.so.5 libncursesw++.so
popd # lib
# Rebuild c++ demo.
%__rm -f c++/demo
make -C c++
%endif # with_cxx
popd # build-utf8
%endif # with_utf8

%install
#install classic ncurses library version
pushd build-classic
%make_install install \
	DESTDIR=$RPM_BUILD_ROOT \
	includedir=%_includedir/%name

%if_with cxx
# Install c++ shared library.
%__install -p -m644 lib/libncurses++.so.%version $RPM_BUILD_ROOT%_libdir/
%__ln_s libncurses++.so.%version $RPM_BUILD_ROOT%_libdir/libncurses++.so.5
%__ln_s libncurses++.so.5 $RPM_BUILD_ROOT%_libdir/libncurses++.so
%endif # with_cxx
popd # build-classic

#install utf8 ncurses library version
%if_with utf8
pushd build-utf8
%make_install install \
	DESTDIR=$RPM_BUILD_ROOT \
	includedir=%_includedir/%name



%__ln_s %name $RPM_BUILD_ROOT%_includedir/%{name}w
%if_with cxx
# Install c++ shared library.
%__install -p -m644 lib/libncursesw++.so.%version $RPM_BUILD_ROOT%_libdir/
%__ln_s libncursesw++.so.%version $RPM_BUILD_ROOT%_libdir/libncursesw++.so.5
%__ln_s libncursesw++.so.5 $RPM_BUILD_ROOT%_libdir/libncursesw++.so
%endif # with_cxx
popd # build-utf8
%endif # with_utf8

# The resetall script.
%__install -pD -m755 %SOURCE102 $RPM_BUILD_ROOT%_bindir/resetall

%__ln_s -nf %name/curses.h $RPM_BUILD_ROOT%_includedir/%name.h
for n in curses eti form menu panel term termcap unctrl; do
	%__ln_s -nf "%name/$n.h" "$RPM_BUILD_ROOT%_includedir/$n.h"
done

# Relocate libtinfo from %_libdir/ to /lib/.
for f in $RPM_BUILD_ROOT%_libdir/libtinfo*.so; do
	t=`objdump -p "$f" |awk '/SONAME/ {print $2}'`
	[ -n "$t" ]
	%__ln_s -nf ../../%_lib/"$t" "$f"
done
%__mkdir_p $RPM_BUILD_ROOT/%_lib
%__mv $RPM_BUILD_ROOT%_libdir/libtinfo*.so.* $RPM_BUILD_ROOT/%_lib/

%__ln_s -nf lib%name.so $RPM_BUILD_ROOT%_libdir/libcurses.so

t=`objdump -p "$RPM_BUILD_ROOT%_libdir/lib%name.so" |awk '/SONAME/ {print $2}'`
# Library compatibility symlinks.
for v in 4 3; do
	%__ln_s "$t" "$RPM_BUILD_ROOT%_libdir/lib%name.so.$v"
done

chmod 644 $RPM_BUILD_ROOT{/%_lib,%_libdir}/lib*.so.* ||:

# Relocate tput.
%__mkdir_p $RPM_BUILD_ROOT/bin
%__mv $RPM_BUILD_ROOT%_bindir/tput $RPM_BUILD_ROOT/bin/
%__ln_s ../../bin/tput $RPM_BUILD_ROOT%_bindir/

# Generate new terminfo entries (deb).
for n in rxvt rxvt-unicode screen; do
	LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%_lib:$RPM_BUILD_ROOT%_libdir \
        TERMINFO=$RPM_BUILD_ROOT%_datadir/terminfo \
		$RPM_BUILD_ROOT%_bindir/tic -s %name-alt-terms/$n.ti
done

# Split terminfo entries into /lib/terminfo and %_datadir/terminfo.
%__ln_s -nf ../l/linux $RPM_BUILD_ROOT%_datadir/terminfo/c/console

%__rm -f relocation_error
cat %SOURCE101 |while read -r n; do
	f="${n:0:1}"
	%__mkdir_p "$RPM_BUILD_ROOT/%rootdatadir/terminfo/$f"
	%__mv "$RPM_BUILD_ROOT%_datadir/terminfo/$f/$n" "$RPM_BUILD_ROOT/%rootdatadir/terminfo/$f/" ||
		{ touch relocation_error; exit 1; }
	%__ln_s `relative "$RPM_BUILD_ROOT/%rootdatadir/terminfo/$f/$n" "$RPM_BUILD_ROOT%_datadir/terminfo/$f/"` \
		"$RPM_BUILD_ROOT%_datadir/terminfo/$f/" ||
		{ touch relocation_error; exit 1; }
	echo "%dir %_datadir/terminfo/$f"
	echo "%_datadir/terminfo/$f/$n"
done |sort -u >base.list
[ ! -f relocation_error ]

find $RPM_BUILD_ROOT%_datadir/terminfo -type f -mindepth 2 |
	%__sed -e "s|$RPM_BUILD_ROOT||g" >extra.list

# Prepare docs.
%__rm -rf $RPM_BUILD_ROOT%_docdir/%name-%version
%__mkdir_p $RPM_BUILD_ROOT%_docdir/%name-%version
%__install -p -m644 ANNOUNCE NEWS README TO-DO \
	c++/demo.cc doc/*.doc doc/html/*.html \
	$RPM_BUILD_ROOT%_docdir/%name-%version/
%__install -p -m644 c++/README-first \
	$RPM_BUILD_ROOT%_docdir/%name-%version/README.c++
#make clean -C test

#replace ncurses.so symlink with a special linker script
rm -f $RPM_BUILD_ROOT%_libdir/lib%name.so
cat >>$RPM_BUILD_ROOT%_libdir/lib%name.so<<EOF
/* GNU ld script */
GROUP(%_libdir/lib%name.so.5 -ltinfo)
EOF


%post -n libtinfo -p %post_ldconfig
%postun -n libtinfo -p %postun_ldconfig

%post -n lib%name -p %post_ldconfig
%postun -n lib%name -p %postun_ldconfig

%post -n lib%{name}w -p %post_ldconfig
%postun -n lib%{name}w -p %postun_ldconfig

%files
# ncurses is pure virtual package.

# TERMINFO
%files -n terminfo -f base.list
%rootdatadir/terminfo
%dir %_datadir/terminfo
%ifnarch x86_64
%_libdir/terminfo
%endif
%_datadir/tabset
%_man5dir/*

%files -n terminfo-extra -f extra.list
%dir %_datadir/terminfo
%dir %_datadir/terminfo/*
%_datadir/terminfo/c/console

# LIBTINFO
%files -n libtinfo
/%_lib/libtinfo.*

%files -n libtinfo-devel
%_libdir/libtinfo.so
%_includedir/termcap.h
%_includedir/term.h
%dir %_includedir/%name
%_includedir/%name/termcap.h
%_includedir/%name/term.h
%_includedir/%name/ncurses_dll.h

%files -n libtinfo-devel-static
%_libdir/libtinfo.a

# TERMUTILS
%files -n termutils
/bin/tput
%_bindir/clear
%_bindir/reset*
%_bindir/toe
%_bindir/tput
%_bindir/tset
%_man7dir/*
%_man1dir/clear.*
%_man1dir/reset.*
%_man1dir/toe.*
%_man1dir/tput.*
%_man1dir/tset.*

%files -n termutils-devel
%_bindir/*info*
%_bindir/tack
%_bindir/tic
%_man1dir/*info*
%_man1dir/tack.*
%_man1dir/tic.*

# LIBNCURSES
%files -n lib%name
%_libdir/lib*[musl].so.*
%if_with cxx
%exclude %_libdir/libncurses++*.so.*
%endif # with_cxx
%dir %_docdir/%name-%version
%_docdir/%name-%version/[A-Z]*

%files -n lib%name-devel
%_bindir/%{name}5-config
%_libdir/lib*.so
%if_with utf8
%exclude %_libdir/lib*[musl]w.so
%endif # with_utf8
%exclude %_libdir/libtinfo*.so
%if_with cxx
%exclude %_libdir/libncurses++*.so
%endif # with_cxx
%_includedir/*
%exclude %_includedir/term*.h
%exclude %_includedir/%name/term*.h
%exclude %_includedir/%name/ncurses_dll.h
%if_with cxx
%exclude %_includedir/%name/cursesapp.h
%exclude %_includedir/%name/curses?.h
%exclude %_includedir/%name/cursslk.h
%exclude %_includedir/%name/etip.h
%endif # with_cxx
%if_with utf8
%exclude %_includedir/%{name}w
%endif # with_utf8
%_man3dir/*
%dir %_docdir/%name-%version
%_docdir/%name-%version/[a-z]*
#%doc test

%files -n lib%name-devel-static
%_libdir/lib*.a
%exclude %_libdir/libtinfo.a
%if_with cxx
%exclude %_libdir/libncurses++*.a
%endif # with_cxx

# LIBNCURSES++
%if_with cxx
%files -n lib%name++
%_libdir/libncurses++*.so.*

%files -n lib%name++-devel
%_libdir/libncurses++*.so
%dir %_includedir/%name
%_includedir/%name/cursesapp.h
%_includedir/%name/curses?.h
%_includedir/%name/cursslk.h
%_includedir/%name/etip.h

%files -n lib%name++-devel-static
%_libdir/libncurses++*.a
%endif # with_cxx

%if_with utf8
%files -n lib%{name}w
%_libdir/lib*[musl]w.so.*

%files -n lib%{name}w-devel
%_bindir/%{name}w5-config
%_libdir/lib*[musl]w.so
%_includedir/%{name}w
%endif # with_utf8

%changelog
* Fri May 11 2007 Stanislav Ievlev <inger@altlinux.org> 5.6-alt3
- merge with current upstream version (20070505)
- mk-1st patch dropped (upstream has improved build system)
- use upstream xterm definition
- add rxvt-unicode
- new patches:
    fix tack build (TODO tack will be maintained in separate tarball),
    fix kbs in xterm terminal description (replace ^H with /177 to satisfy emacs)

* Mon Apr 09 2007 Stanislav Ievlev <inger@altlinux.org> 5.6-alt2
- move %_lib/terminfo to /lib/terminfo

* Wed Dec 27 2006 Stanislav Ievlev <inger@altlinux.org> 5.6-alt1
- update to current snapshot (20061223) of 5.6

* Fri Sep 08 2006 Stanislav Ievlev <inger@altlinux.org> 5.5-alt4
- update to current snapshot (20060903)

* Tue Aug 29 2006 Stanislav Ievlev <inger@altlinux.org> 5.5-alt3
- merged with current version
- replaced ncurses.so symlink with a linker script

* Tue May 30 2006 Stanislav Ievlev <inger@altlinux.org> 5.5-alt2
- merge with current version
- added libinfow-devel library (patch from raorn@)

* Thu May 18 2006 Stanislav Ievlev <inger@altlinux.org> 5.5-alt1
- 5.5, enable utf8 again

* Mon Feb 14 2005 Stanislav Ievlev <inger@altlinux.org> 5.4.20050108-alt3
- latest snapshot, fixed bugs 6092,4889

* Mon Jan 17 2005 Stanislav Ievlev <inger@altlinux.org> 5.4.20050108-alt2
- temporary turn off building of widechar version 
  (tinfo and tinfow are binary incompatible now)

* Wed Jan 12 2005 Stanislav Ievlev <inger@altlinux.org> 5.4.20050108-alt1
- latest rollup

* Fri Aug 06 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040731-alt1
- latest rollup, apply x86_64 fixes from mouse@

* Tue Apr 27 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040424-alt1
- latest rollup, rebuild with glibc2.3

* Thu Feb 26 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040221-alt1
- 5.4 final, wide-char support now really works

* Thu Feb 05 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040131-alt1
- latest patches from Thomas
- disable home terminfo feature, so please use TERMINFO variable instead

* Fri Jan 30 2004 Dmitry V. Levin <ldv@altlinux.org> 5.4.20040125-alt1
- Minor specfile tweaks.

* Fri Jan 30 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040125-alt0.3
- Added '--with gpm' building feature (#2827).
- Fixed build for non-x86 platforms (#2827).

* Fri Jan 30 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040125-alt0.2
- Added conflicts with libgpm < 1.20.1-alt3.1.
  All old libgpm versions are incompatible with 5.4

* Thu Jan 29 2004 Stanislav Ievlev <inger@altlinux.org> 5.4.20040125-alt0.1
- Updated code to patchlevel 20040125 (5.4 prerelease).
- Do not build orphaned c++ bindings.
- Build both classic and utf8 libraries.
- Build single terminfo library both for classic and utf8 ncurses.

* Wed Jul 09 2003 Dmitry V. Levin <ldv@altlinux.org> 5.3.20021019-alt2
- Fixed smp build.
- Build libncurses++ as shared library, too (0002675).
- Move all ncurses++ stuff to separate subpackages.

* Sun Dec 08 2002 Dmitry V. Levin <ldv@altlinux.org> 5.3.20021019-alt1
- Updated code to patchlevel 20021019 (minor fixes).
- Relocated /usr/bin/tput to /bin/tput.

* Wed Oct 16 2002 Dmitry V. Levin <ldv@altlinux.org> 5.3.20021012-alt1
- Updated code to patchlevel 20021012 (5.3 release).

* Thu Sep 26 2002 Dmitry V. Levin <ldv@altlinux.org> 5.2.20020921-alt1
- Updated code to patchlevel 20020921.
- xterm.ti:
  + updated from xterm-167/terminfo;
  + dropped all changes made in 5.2.20020901-alt1 except khome/kend.

* Mon Sep 09 2002 Dmitry V. Levin <ldv@altlinux.org> 5.2.20020907-alt1
- Updated code to patchlevel 20020907.

* Mon Sep 02 2002 Dmitry V. Levin <ldv@altlinux.org> 5.2.20020901-alt1
- Updated code to patchlevel 20020901.
- xterm.ti: fixed entries for khome, kend,
  kf1, kf13, kf14, kf15, kf16, kf17, kf18, kf19, kf2, kf20, kf3, kf4.
- Updated devel-static requirements.

* Wed Aug 14 2002 Dmitry V. Levin <ldv@altlinux.org> 5.2.20020810-alt1
- Updated code to patchlevel 20020810.
- Added "Eterm" to list of basic terminfo entries (28 items now).
- Added "Conflicts: screen < 3.9.11-alt1" to terminfo (#0001177).
- Relocated manpages from 5th section to terminfo subpackage.
- Redistributed contents of ncurses subpackage:
  + to termutils: clear, reset*, toe, tput, tset;
  + to termutils-devel: *info*, tack, tic;
  + to libncurses: documentation.
 
* Fri Jul 19 2002 Ivan Zakharyaschev <imz@altlinux.ru> 5.2.20020622-alt2
- moved term.h from libncurses-devel to libtinfo-devel;

* Mon Jul 01 2002 Dmitry V. Levin <ldv@altlinux.org> 5.2.20020622-alt1
- Updated code to patchlevel 20020622.
- Relocated libncurses shared library back to %_libdir/:
  reverted first relocation made in 990110 (no need).

* Sat Jun 22 2002 Dmitry V. Levin <ldv@altlinux.org> 5.2.20020615-alt1
- Updated code to patchlevel 20020615, reviewed and updated patches.
- Imported terminfo definitions for screen, xterm and rxvt from Debian.
- Reviewed configure flags; most significant changes are:
  --with-terminfo-dirs="/lib/terminfo:/usr/share/terminfo"
  --disable-termcap
  --disable-safe-sprintf
  --disable-root-environ
- When building the ncurses library, organize this as two parts:
  the curses library (libncurses) and the low-level terminfo library (libtinfo).
  This is done to accommodate applications that use only the latter.
  The terminfo library is about half the size of the total.
- Moved libtinfo libraries to separate subpackages.
- Reduced number of basic terminfo entries (27 atm.) and moved them
  to /lib/terminfo.
- Don't build debug and profile static libraries by default.
- Relocated documentation.

* Fri Mar 22 2002 Dmitry V. Levin <ldv@alt-linux.org> 5.2-ipl5mdk
- Moved terminfo database into separate subpackage.
- Renamed %name-extraterms subpackage to terminfo-extra.
- Corrected dependencies:
  + lib%name: PreReq: terminfo = %%version-%%release;
  + lib%name: Conflicts: %name < %%version-%%release;
  + terminfo: Conflicts: %name < %%version-%%release.

* Tue Dec 25 2001 Stanislav Ievlev <inger@altlinux.ru> 5.2-ipl4mdk
- removed buggy xterm-pcolor entry from terminfo

* Fri May 18 2001 Dmitry V. Levin <ldv@altlinux.ru> 5.2-ipl3mdk
- Libification.

* Fri Nov 24 2000 Dmitry V. Levin <ldv@fandra.org> 5.2-ipl2mdk
- Merged RH patches

* Mon Oct 30 2000 Dmitry V. Levin <ldv@fandra.org> 5.2-ipl1mdk
- 5.2
- Split out definitions for rare terminals to extraterms package.
- Use xterm definitions from RH.

* Wed Jul 12 2000 Dmitry V. Levin <ldv@fandra.org> 5.1-ipl1mdk
- 5.1
- FHSification.

* Mon Jun 12 2000 Dmitry V. Levin <ldv@fandra.org> 5.0-ipl13mdk
* RE and Fandra adaptions.

* Wed May 03 2000 Warly <warly@mandrakesoft.com> 5.0-13mdk
- correct links in /lib

* Mon Apr 10 2000 Geoffrey Lee <snailtalk@linux-mandrake.com> 5.0-12mdk
- fix license (again) :-/

* Fri Mar 31 2000 Warly <warly@mandrakesoft.com> 5.0-11mdk
- devel group: Development/C

* Fri Mar 31 2000 Geoffrey Lee <snailtalk@linux-mandrake.com> 5.0-10mdk
- changed group
- fixed license

* Sun Mar 19 2000 John Buswell <johnb@mandrakesoft.com> 5.0-9mdk
- PPC fixes

* Wed Jan 12 2000 Pixel <pixel@mandrakesoft.com> 5.0-8mdk
- fix for alpha (use egcs instead of gcc-2.95.2)

* Tue Jan 11 2000 Frederic Lepied <flepied@mandrakesoft.com> 5.0-7mdk
- fix xterm entry for 3.3.6

* Sun Dec 25 1999 - David BAUDENS <baudens@mandrakesoft.com>
- Fix build for K6 (another, AMD K6 is not an i686)

* Fri Nov 19 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add debian term.

* Fri Nov 12 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add resetall script(r).

* Sun Nov  7 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- 5.0 anounced final.

* Mon Oct 25 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Build release.

* Wed Sep 29 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- update to 990925

* Mon Sep  6 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- update to 990904

* Fri Jul 16 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- Rebuild for new environement (4mdk).

* Mon Jul  5 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- update to 990703

* Wed May 19 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- update to 990516
- Fix the -fomit-frame-pointer problem (using -fno-omit-frame-pointer
  with -pg where needed)

* Mon Apr 12 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- update to 990410.
- some spec tweaks (yes again ;-))
- removing the patch and build a global ncurses-990410.tar.bz2
- Remove the -fomit-frame-pointer (incompatible with -pg ?)
- Add patch for a bug (?) with two entry in linux-lat.

* Sat Apr 10 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- add de locale
- update to 990403
- some spec tweaks
- take description + some patches from RH 6.0

* Sun Mar 28 1999 Bernhard Rosenkraenzer <bero@microsoft.sucks.eu.org>
- update to 990327

* Wed Mar 10 1999 Bernhard Rosenkraenzer <bero@microsoft.sucks.eu.org>
- update to 990307
- link /lib/libncurses.so* to /usr/lib

* Sun Feb  7 1999 Bernhard Rosenkraenzer <bero@microsoft.sucks.eu.org>
- update to 990206

* Fri Jan 15 1999 Bernhard Rosenkraenzer <bero@microsoft.sucks.eu.org>
- update to 990110
- move libncurses.so.* to /lib, where it belongs (needed by sh)

* Thu Dec 24 1998 Bernhard Rosenkraenzer <bero@microsoft.sucks.eu.org>
- update to 981220

* Tue Dec 15 1998 Bernhard Rosenkraenzer <bero@microsoft.sucks.eu.org>
- start with RH release 10
- update to 981212; merge patches in tar file
- bzip2 man pages
- use -fno-omit-frame-pointer -pg rather than just -pg for profiled
  version - that way, we can handle RPM_OPT_FLAGS with -fomit-frame-pointer
- Make compatibility links to libncurses.so.3 (they ARE binary compatible)
- update terminfo file to 10.2.5

* Wed Oct 14 1998 Cristian Gafton <gafton@redhat.com>
- make sure to strip the binaries

* Wed Sep 23 1998 Cristian Gafton <gafton@redhat.com>
- added another zillion of patches. The spec file *is* ugly
- defattr

* Mon Jul 20 1998 Cristian Gafton <gafton@redhat.com>
- added lots of patches. This spec file is starting to look ugly

* Wed Jul 01 1998 Alan Cox <alan@redhat.com>
- Fix setuid trusting. Open termcap/info files as the real user.

* Wed May 06 1998 Cristian Gafton <gafton@redhat.com>
- added terminfo entry for the poor guys using lat1 and/or lat-2 on their
  consoles... Enjoy linux-lat ! Thanks, Erik !

* Tue Apr 21 1998 Cristian Gafton <gafton@redhat.com>
- new patch to get xterm-color and nxterm terminfo entries
- aliased them to rxvt, as that seems to satisfy everybody

* Sun Apr 12 1998 Cristian Gafton <gafton@redhat.com>
- added %clean section

* Tue Apr 07 1998 Cristian Gafton <gafton@redhat.com>
- removed /usr/lib/terminfo symlink - we shouldn't need that

* Mon Apr 06 1998 Cristian Gafton <gafton@redhat.com>
- updated to 4.2 + patches
- added BuildRoot

* Sat Apr 04 1998 Cristian Gafton <gafton@redhat.com>
- rebuilt with egcs on alpha

* Wed Dec 31 1997 Erik Troan <ewt@redhat.com>
- version 7 didn't rebuild properly on the Alpha somehow -- no real changes
  are in this version

* Tue Dec 09 1997 Erik Troan <ewt@redhat.com>
- TIOCGWINSZ wasn't used properly

* Tue Jul 08 1997 Erik Troan <ewt@redhat.com>
- built against glibc, linked shared libs against -lc