ncurses/ncurses.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 682
3799cd65a8f9
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  ncurses.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package versions
    25 %define       V_base    5.9
    26 %define       V_patch0  20111224
    27 %define       V_patch1  20111231
    28 %define       V_patch2  20120107
    29 %define       V_patch3  20120114
    30 %define       V_patch4  20120121
    31 %define       V_patch5  20120128
    32 %define       V_patch6  20120204
    33 %define       V_patch7  20120211
    34 %define       V_patch8  20120218
    35 %define       V_patch9  20120225
    36 %define       V_patch10 20120228
    37 %define       V_patch11 20120303
    38 %define       V_patch12 20120310
    39 %define       V_patch13 20120317
    40 %define       V_patch14 20120324
    41 %define       V_patch15 20120331
    42 %define       V_patch16 20120407
    43 %define       V_patch17 20120414
    44 %define       V_patch18 20120421
    45 %define       V_patch19 20120428
    46 %define       V_patch20 20120505
    47 %define       V_patch21 20120512
    48 %define       V_patch22 20120526
    49 %define       V_patchB  %{V_patch0}
    50 %define       V_patchL  %{V_patch22}
    51 %define       V_patches 22
    53 #   package information
    54 Name:         ncurses
    55 Summary:      Terminal Capability and Display Library
    56 URL:          http://www.gnu.org/software/ncurses/
    57 Vendor:       Free Software Foundation
    58 Packager:     OpenPKG Foundation e.V.
    59 Distribution: OpenPKG Community
    60 Class:        CORE
    61 Group:        Terminal
    62 License:      MIT-style
    63 Version:      %{V_base}.%{V_patchL}
    64 Release:      20120800
    66 #   list of sources
    67 Source0:      ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz
    68 Patch0:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch0}-patch.sh.bz2
    69 Patch1:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz
    70 Patch2:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz
    71 Patch3:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch3}.patch.gz
    72 Patch4:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch4}.patch.gz
    73 Patch5:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch5}.patch.gz
    74 Patch6:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch6}.patch.gz
    75 Patch7:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch7}.patch.gz
    76 Patch8:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch8}.patch.gz
    77 Patch9:       ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch9}.patch.gz
    78 Patch10:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch10}.patch.gz
    79 Patch11:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch11}.patch.gz
    80 Patch12:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch12}.patch.gz
    81 Patch13:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch13}.patch.gz
    82 Patch14:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch14}.patch.gz
    83 Patch15:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch15}.patch.gz
    84 Patch16:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch16}.patch.gz
    85 Patch17:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch17}.patch.gz
    86 Patch18:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch18}.patch.gz
    87 Patch19:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch19}.patch.gz
    88 Patch20:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch20}.patch.gz
    89 Patch21:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch21}.patch.gz
    90 Patch22:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch22}.patch.gz
    91 Patch100:     ncurses.patch
    93 #   build information
    94 BuildPreReq:  OpenPKG, openpkg >= 20100101
    95 PreReq:       OpenPKG, openpkg >= 20100101
    97 %description
    98     NCurses is the GNU re-implementation of the popular SVR4 Curses
    99     terminal screen handling library. Its API is base-level conformant
   100     with the X/OPEN curses specification XSI Curses. It uses the
   101     Terminfo database format, supports pads and color and multiple
   102     highlights and forms characters and function-key mapping, and has
   103     all the other SVR4-Curses enhancements over original BSD Curses.
   104     Additionally, it provides full emulations of the SVR4 panels
   105     (supporting a stack of windows), forms (supporting data collection
   106     through on-screen forms) and menu (supporting a uniform interface
   107     for menu programming) companion libraries.
   109 %track
   110     prog ncurses = {
   111         version   = %{V_base}
   112         url       = ftp://invisible-island.net/ncurses/
   113         regex     = ncurses-(__VER__)\.tar\.gz
   114     }
   115     prog ncurses:patchbase = {
   116         disabled
   117         version   = %{V_patchB}
   118         url       = ftp://invisible-island.net/ncurses/
   119         regex     = (\d+\.\d+)
   120         url       = ftp://invisible-island.net/ncurses/__NEWVER__/
   121         regex     = ncurses-__NEWVER__-(\d+)-patch\.sh\.bz2
   122     }
   123     prog ncurses:patchset = {
   124         version   = %{V_patchL}
   125         url       = ftp://invisible-island.net/ncurses/
   126         regex     = (\d+\.\d+)
   127         url       = ftp://invisible-island.net/ncurses/__NEWVER__/
   128         regex     = ncurses-__NEWVER__-(\d+)\.patch\.gz
   129     }
   131 %prep
   132     %setup -q -n ncurses-%{V_base}
   133     for patchfile in \
   134         %{expand:%(i=0; while [ $i -le %{V_patches} ]; do %{l_shtool} echo -n " %%{PATCH$i}"; i=`expr $i + 1`; done)}
   135     do
   136         case "$patchfile" in
   137             *-patch.sh.bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;;
   138             *-patch.sh.gz  ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;;
   139             *.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 ;;
   140             *.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 ;;
   141             *.patch.bz2    ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;;
   142             *.patch.gz     ) %{l_gzip}  -d -c $patchfile | %{l_patch} -p1 -f || true ;;
   143             * )
   144                 echo "Unknown patch format" | %{l_rpmtool} msg -b -t error 1>&2
   145                 exit 1
   146                 ;;
   147         esac
   148     done
   149     find . -name "*.orig" -print | xargs rm -f
   150     %patch -p0 -P 100
   152 %build
   153     %{l_shtool} subst \
   154         -e 's;SRC_SUBDIRS test;SRC_SUBDIRS;' \
   155         configure
   156     CC="%{l_cc}" \
   157     CPPFLAGS="%{l_cppflags}" \
   158     CFLAGS="%{l_cflags}" \
   159     ./configure \
   160         --prefix=%{l_prefix} \
   161         --includedir=%{l_prefix}/include/ncurses \
   162         --datadir=%{l_prefix}/share/ncurses \
   163         --enable-hashmap \
   164         --without-debug \
   165         --with-manpage-format=normal \
   166         --disable-getcap-cache \
   167         --without-cxx-binding \
   168         --without-cxx \
   169         --without-gpm \
   170         --enable-termcap \
   171         --disable-overwrite
   172     %{l_make} %{l_mflags}
   174 %install
   175     %{l_shtool} subst -e "s;ln -s;ln;g" edit_man.sh
   176     %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   177     ( cd $RPM_BUILD_ROOT%{l_prefix}/man
   178       for dir in man1 man3; do
   179           cd $dir
   180           for file in *.[13][a-z]*; do
   181               if [ ".$file" = ".*.[13][a-z]*" ]; then
   182                   break
   183               fi
   184               eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'`
   185               mv $file ncurses_$base
   186           done
   187           cd ..
   188       done
   189     ) || exit $?
   190     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   191     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   193 %files -f files
   195 %clean

mercurial