Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37509744
en ru br
Репозитории ALT
S:6.3.20220618-alt4
5.1: 5.7-alt1
4.1: 5.6-alt4
4.0: 5.6-alt3
3.0: 5.4.20050108-alt3
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: ncurses

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define ver 5.4
%define subver 20050108

Name: ncurses
Version: %ver.%subver
Release: alt3

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-5.4.tar.gz

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

# ftp://invisible-island.net/%name/%ver/

Source1: ncurses-5.4-20041211-patch.sh.bz2

Patch1: ncurses-5.4-20041218.patch.gz
Patch2: ncurses-5.4-20041225.patch.gz
Patch3: ncurses-5.4-20050101.patch.gz
Patch4: ncurses-5.4-20050108.patch.gz
Patch5: ncurses-5.4-20050115.patch.gz
Patch6: ncurses-5.4-20050122.patch.gz
Patch7: ncurses-5.4-20050129.patch.gz
Patch8: ncurses-5.4-20050205.patch.gz
Patch9: ncurses-5.4-20050212.patch.gz

Patch100: %name-5.2-alt-env-libc_enable_secure.patch
Patch101: %name-5.4-alt-nogpm-dlopen.patch
Patch102: %name-5.4-alt-build-tinfo.patch

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_without 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

%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

%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

%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.

%prep
%setup -q -a100 -n %name-%ver

# rollup patch here

bzcat %SOURCE1 >rollup.sh
sh rollup.sh

# weekly patches here

%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1

# alt patches here

%patch100 -p1

%patch101 -p1
%__subst 's,\*my_gpm_fd,my_gpm_fd,' ncurses/base/lib_mouse.c

%patch102 -p1

%__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
export ac_cv_prog_AWK=gawk
export ac_cv_prog_MAKE_LOWER_TAGS=yes
export ac_cv_prog_MAKE_UPPER_TAGS=yes
export 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} \
--with-termlib \
--with-ospeed="unsigned int" \
--with-terminfo-dirs="/%_lib/terminfo:/usr/share/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 \
#

# remove -ldl linking

find . -name 'Makefile'|xargs subst 's,-ldl,,'

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} \
--with-termlib=tinfo \
--with-ospeed="unsigned int" \
--with-terminfo-dirs="/%_lib/terminfo:/usr/share/terminfo" \
--disable-termcap \
--enable-const \
--enable-hard-tabs \
--enable-no-padding \
--enable-sigwinch \
--enable-echo \
--enable-warnings \
--disable-rpath \
--disable-root-environ \
--enable-widec \
--without-progs \
--disable-home-terminfo \
#
# 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

# remove -ldl linking

find . -name 'Makefile'|xargs subst 's,-ldl,,'

popd # build-utf8
%endif # with_utf8

# build classic version

pushd build-classic
%make_build

%if_with cxx
# Build c++ shared library.
pushd lib
g++ -shared -Wl,-soname,libncurses++.so.5 -o libncurses++.so.%ver \
-Wl,-whole-archive libncurses++.a -Wl,-no-whole-archive \
-L. -lform -lmenu -lpanel -lncurses -ltinfo
%__ln_s libncurses++.so.%ver 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
%make_build

%if_with cxx
# Build c++ shared library.
pushd lib
g++ -shared -Wl,-soname,libncursesw++.so.5 -o libncursesw++.so.%ver \
-Wl,-whole-archive libncursesw++.a -Wl,-no-whole-archive \
-L. -lform -lmenu -lpanel -lncurses -ltinfo
%__ln_s libncursesw++.so.%ver 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.%ver $RPM_BUILD_ROOT%_libdir/
%__ln_s libncurses++.so.%ver $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

%if_with cxx
# Install c++ shared library.
%__install -p -m644 lib/libncursesw++.so.%ver $RPM_BUILD_ROOT%_libdir/
%__ln_s libncursesw++.so.%ver $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 xterm rxvt 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 alt/$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/%_lib/terminfo/$f"
%__mv "$RPM_BUILD_ROOT%_datadir/terminfo/$f/$n" "$RPM_BUILD_ROOT/%_lib/terminfo/$f/" ||
{ touch relocation_error; exit 1; }
%__ln_s `relative "$RPM_BUILD_ROOT/%_lib/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-%ver
%__mkdir_p $RPM_BUILD_ROOT%_docdir/%name-%ver
%__install -p -m644 ANNOUNCE NEWS README TO-DO \
c++/demo.cc doc/*.doc doc/html/*.html \
$RPM_BUILD_ROOT%_docdir/%name-%ver/
%__install -p -m644 c++/README-first \
$RPM_BUILD_ROOT%_docdir/%name-%ver/README.c++
#make clean -C test

%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
/%_lib/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-%ver
%_docdir/%name-%ver/[A-Z]*

%files -n lib%name-devel
%_libdir/lib*.so
%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
%_man3dir/*
%dir %_docdir/%name-%ver
%_docdir/%name-%ver/[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.*
%endif # with_utf8

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin