|
|
|
##
|
|
|
|
## ncurses.spec -- OpenPKG RPM Specification
|
|
|
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
|
|
|
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
##
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
## copies.
|
|
|
|
##
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
##
|
|
|
|
|
|
|
|
%define V_base 5.2
|
|
|
|
%define V_patch0 20010908
|
|
|
|
%define V_patch1 20010915
|
|
|
|
|
|
|
|
# package information
|
|
|
|
Name: ncurses
|
|
|
|
Summary: Terminal Capability and Display Library
|
|
|
|
URL: http://www.gnu.org/software/ncurses/
|
|
|
|
Vendor: Free Software Foundation
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
Distribution: OpenPKG [EXP]
|
|
|
|
Group: Terminal
|
|
|
|
License: GPL
|
|
|
|
Version: %{V_base}
|
|
|
|
Release: 5
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
Source0: ftp://dickey.his.com/ncurses/ncurses-%{V_base}.tar.gz
|
|
|
|
Patch0: ftp://dickey.his.com/ncurses/%{V_base}/patch-%{V_base}-%{V_patch0}.sh
|
|
|
|
Patch1: ftp://dickey.his.com/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz
|
|
|
|
|
|
|
|
# build information
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 0.9-33, patch
|
|
|
|
PreReq: OpenPKG, openpkg >= 0.9-33
|
|
|
|
AutoReq: no
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
%description
|
|
|
|
NCurses is the GNU re-implementation of the popular Curses
|
|
|
|
terminal screen handling library.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
( PATH="%{l_prefix}/bin:$PATH"; export PATH; sh %{PATCH0} )
|
|
|
|
for patch in %{PATCH1}; do
|
|
|
|
%{l_gzip} -d -c $patch | %{l_patch} -p1
|
|
|
|
done
|
|
|
|
|
|
|
|
%build
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
./configure \
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
--includedir=%{l_prefix}/include/ncurses \
|
|
|
|
--datadir=%{l_prefix}/share/ncurses \
|
|
|
|
--enable-hashmap \
|
|
|
|
--enable-safe-sprintf \
|
|
|
|
--without-debug \
|
|
|
|
--with-manpage-format=normal \
|
|
|
|
--disable-getcap-cache \
|
|
|
|
--without-cxx-binding \
|
|
|
|
--without-cxx \
|
|
|
|
--enable-termcap \
|
|
|
|
--disable-overwrite
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%{l_rpmtool} subst "s;ln -s;ln;g" -- man/edit_man.sh
|
|
|
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
(
|
|
|
|
cd $RPM_BUILD_ROOT%{l_prefix}/man
|
|
|
|
for dir in man1 man3; do
|
|
|
|
cd $dir
|
|
|
|
for file in *.[13][a-z]*; do
|
|
|
|
if [ ".$file" = ".*.[13][a-z]*" ]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
|
|
|
|
mv $file ncurses_$base
|
|
|
|
done
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
)
|
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2> /dev/null || true
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|