You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
180 lines
7.3 KiB
180 lines
7.3 KiB
## |
|
## ncurses.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2018 OpenPKG Project <http://openpkg.org/> |
|
## |
|
## 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. |
|
## |
|
|
|
# package versions |
|
%define V_base 6.1 |
|
%define V_patch0 20180203 |
|
%define V_patch1 20180210 |
|
%define V_patch2 20180217 |
|
%define V_patch3 20180224 |
|
%define V_patch4 20180303 |
|
%define V_patch5 20180317 |
|
%define V_patch6 20180324 |
|
%define V_patch7 20180331 |
|
%define V_patch8 20180407 |
|
%define V_patch9 20180414 |
|
%define V_patch10 20180428 |
|
%define V_patch11 20180505 |
|
%define V_patch12 20180512 |
|
%define V_patchB %{V_patch1} |
|
%define V_patchL %{V_patch12} |
|
%define V_patches 12 |
|
|
|
# package information |
|
Name: ncurses |
|
Summary: Terminal Capability and Display Library |
|
URL: http://www.gnu.org/software/ncurses/ |
|
Vendor: Free Software Foundation |
|
Packager: OpenPKG Project |
|
Distribution: OpenPKG Community |
|
Class: CORE |
|
Group: Terminal |
|
License: MIT-style |
|
Version: %{V_base}.%{V_patchL} |
|
Release: 20180513 |
|
|
|
# package options |
|
%option with_widechar no |
|
|
|
# list of sources |
|
Source0: ftp://ftp.invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz |
|
Patch0: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch0}.patch.gz |
|
Patch1: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz |
|
Patch2: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz |
|
Patch3: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch3}.patch.gz |
|
Patch4: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch4}.patch.gz |
|
Patch5: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch5}.patch.gz |
|
Patch6: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch6}.patch.gz |
|
Patch7: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch7}.patch.gz |
|
Patch8: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch8}.patch.gz |
|
Patch9: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch9}.patch.gz |
|
Patch10: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch10}.patch.gz |
|
Patch11: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch11}.patch.gz |
|
Patch12: ftp://ftp.invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch12}.patch.gz |
|
Patch100: ncurses.patch |
|
|
|
# build information |
|
BuildPreReq: OpenPKG, openpkg >= 20160101 |
|
PreReq: OpenPKG, openpkg >= 20160101 |
|
|
|
%description |
|
NCurses is the GNU re-implementation of the popular SVR4 Curses |
|
terminal screen handling library. Its API is base-level conformant |
|
with the X/OPEN curses specification XSI Curses. It uses the |
|
Terminfo database format, supports pads and color and multiple |
|
highlights and forms characters and function-key mapping, and has |
|
all the other SVR4-Curses enhancements over original BSD Curses. |
|
Additionally, it provides full emulations of the SVR4 panels |
|
(supporting a stack of windows), forms (supporting data collection |
|
through on-screen forms) and menu (supporting a uniform interface |
|
for menu programming) companion libraries. |
|
|
|
%track |
|
prog ncurses = { |
|
version = %{V_base} |
|
url = ftp://ftp.invisible-island.net/ncurses/ |
|
regex = ncurses-(__VER__)\.tar\.gz |
|
} |
|
prog ncurses:patchset = { |
|
version = %{V_patchL} |
|
url = ftp://ftp.invisible-island.net/ncurses/%{V_base}/ |
|
regex = ncurses-%{V_base}-(\d+)\.patch\.gz |
|
} |
|
|
|
%prep |
|
%setup -q -n ncurses-%{V_base} |
|
if [ ".`which uudecode 2>/dev/null`" = . ]; then |
|
echo "prerequisite system command uudecode(1) missing" | %{l_rpmtool} msg -b -t error 1>&2 |
|
exit 1 |
|
fi |
|
for patchfile in \ |
|
%{expand:%(i=0; while [ $i -le %{V_patches} ]; do %{l_shtool} echo -n " %%{PATCH$i}"; i=`expr $i + 1`; done)} |
|
do |
|
case "$patchfile" in |
|
*-patch.sh.bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;; |
|
*-patch.sh.gz ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;; |
|
*.sh.bz2 ) %{l_bzip2} -d -c $patchfile | sed -e 's;gzip -dc;%{l_gzip} -dc;' -e 's;patch -p1;%{l_patch} -p1 -f;' | sh - || true ;; |
|
*.sh.gz ) %{l_gzip} -d -c $patchfile | sed -e 's;gzip -dc;%{l_gzip} -dc;' -e 's;patch -p1;%{l_patch} -p1 -f;' | sh - || true ;; |
|
*.patch.bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;; |
|
*.patch.gz ) %{l_gzip} -d -c $patchfile | %{l_patch} -p1 -f || true ;; |
|
* ) |
|
echo "Unknown patch format" | %{l_rpmtool} msg -b -t error 1>&2 |
|
exit 1 |
|
;; |
|
esac |
|
done |
|
find . -name "*.orig" -print | xargs rm -f |
|
%patch -p0 -P 100 |
|
|
|
%build |
|
%{l_shtool} subst \ |
|
-e 's;SRC_SUBDIRS test;SRC_SUBDIRS;' \ |
|
configure |
|
CC="%{l_cc}" \ |
|
CPPFLAGS="%{l_cppflags}" \ |
|
CFLAGS="%{l_cflags}" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--includedir=%{l_prefix}/include/ncurses \ |
|
--datadir=%{l_prefix}/share/ncurses \ |
|
--mandir=%{l_prefix}/man \ |
|
%if "%{with_widechar}" == "yes" |
|
--enable-widec \ |
|
%else |
|
--disable-widec \ |
|
%endif |
|
--enable-hashmap \ |
|
--enable-safe-sprintf \ |
|
--without-debug \ |
|
--with-manpage-format=normal \ |
|
--disable-getcap-cache \ |
|
--without-cxx-binding \ |
|
--without-cxx \ |
|
--without-gpm \ |
|
--enable-termcap \ |
|
--disable-overwrite |
|
%{l_make} %{l_mflags} |
|
|
|
%install |
|
%{l_shtool} subst -e "s;ln -s;ln;g" 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 |
|
) || exit $? |
|
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 |
|
|
|
|