1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ncurses/ncurses.spec Mon Sep 17 18:58:20 2012 +0200 1.3 @@ -0,0 +1,197 @@ 1.4 +## 1.5 +## ncurses.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package versions 1.28 +%define V_base 5.9 1.29 +%define V_patch0 20111224 1.30 +%define V_patch1 20111231 1.31 +%define V_patch2 20120107 1.32 +%define V_patch3 20120114 1.33 +%define V_patch4 20120121 1.34 +%define V_patch5 20120128 1.35 +%define V_patch6 20120204 1.36 +%define V_patch7 20120211 1.37 +%define V_patch8 20120218 1.38 +%define V_patch9 20120225 1.39 +%define V_patch10 20120228 1.40 +%define V_patch11 20120303 1.41 +%define V_patch12 20120310 1.42 +%define V_patch13 20120317 1.43 +%define V_patch14 20120324 1.44 +%define V_patch15 20120331 1.45 +%define V_patch16 20120407 1.46 +%define V_patch17 20120414 1.47 +%define V_patch18 20120421 1.48 +%define V_patch19 20120428 1.49 +%define V_patch20 20120505 1.50 +%define V_patch21 20120512 1.51 +%define V_patch22 20120526 1.52 +%define V_patchB %{V_patch0} 1.53 +%define V_patchL %{V_patch22} 1.54 +%define V_patches 22 1.55 + 1.56 +# package information 1.57 +Name: ncurses 1.58 +Summary: Terminal Capability and Display Library 1.59 +URL: http://www.gnu.org/software/ncurses/ 1.60 +Vendor: Free Software Foundation 1.61 +Packager: OpenPKG Foundation e.V. 1.62 +Distribution: OpenPKG Community 1.63 +Class: CORE 1.64 +Group: Terminal 1.65 +License: MIT-style 1.66 +Version: %{V_base}.%{V_patchL} 1.67 +Release: 20120529 1.68 + 1.69 +# list of sources 1.70 +Source0: ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz 1.71 +Patch0: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch0}-patch.sh.bz2 1.72 +Patch1: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch1}.patch.gz 1.73 +Patch2: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch2}.patch.gz 1.74 +Patch3: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch3}.patch.gz 1.75 +Patch4: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch4}.patch.gz 1.76 +Patch5: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch5}.patch.gz 1.77 +Patch6: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch6}.patch.gz 1.78 +Patch7: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch7}.patch.gz 1.79 +Patch8: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch8}.patch.gz 1.80 +Patch9: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch9}.patch.gz 1.81 +Patch10: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch10}.patch.gz 1.82 +Patch11: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch11}.patch.gz 1.83 +Patch12: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch12}.patch.gz 1.84 +Patch13: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch13}.patch.gz 1.85 +Patch14: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch14}.patch.gz 1.86 +Patch15: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch15}.patch.gz 1.87 +Patch16: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch16}.patch.gz 1.88 +Patch17: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch17}.patch.gz 1.89 +Patch18: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch18}.patch.gz 1.90 +Patch19: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch19}.patch.gz 1.91 +Patch20: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch20}.patch.gz 1.92 +Patch21: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch21}.patch.gz 1.93 +Patch22: ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch22}.patch.gz 1.94 +Patch100: ncurses.patch 1.95 + 1.96 +# build information 1.97 +BuildPreReq: OpenPKG, openpkg >= 20100101 1.98 +PreReq: OpenPKG, openpkg >= 20100101 1.99 + 1.100 +%description 1.101 + NCurses is the GNU re-implementation of the popular SVR4 Curses 1.102 + terminal screen handling library. Its API is base-level conformant 1.103 + with the X/OPEN curses specification XSI Curses. It uses the 1.104 + Terminfo database format, supports pads and color and multiple 1.105 + highlights and forms characters and function-key mapping, and has 1.106 + all the other SVR4-Curses enhancements over original BSD Curses. 1.107 + Additionally, it provides full emulations of the SVR4 panels 1.108 + (supporting a stack of windows), forms (supporting data collection 1.109 + through on-screen forms) and menu (supporting a uniform interface 1.110 + for menu programming) companion libraries. 1.111 + 1.112 +%track 1.113 + prog ncurses = { 1.114 + version = %{V_base} 1.115 + url = ftp://invisible-island.net/ncurses/ 1.116 + regex = ncurses-(__VER__)\.tar\.gz 1.117 + } 1.118 + prog ncurses:patchbase = { 1.119 + disabled 1.120 + version = %{V_patchB} 1.121 + url = ftp://invisible-island.net/ncurses/ 1.122 + regex = (\d+\.\d+) 1.123 + url = ftp://invisible-island.net/ncurses/__NEWVER__/ 1.124 + regex = ncurses-__NEWVER__-(\d+)-patch\.sh\.bz2 1.125 + } 1.126 + prog ncurses:patchset = { 1.127 + version = %{V_patchL} 1.128 + url = ftp://invisible-island.net/ncurses/ 1.129 + regex = (\d+\.\d+) 1.130 + url = ftp://invisible-island.net/ncurses/__NEWVER__/ 1.131 + regex = ncurses-__NEWVER__-(\d+)\.patch\.gz 1.132 + } 1.133 + 1.134 +%prep 1.135 + %setup -q -n ncurses-%{V_base} 1.136 + for patchfile in \ 1.137 + %{expand:%(i=0; while [ $i -le %{V_patches} ]; do %{l_shtool} echo -n " %%{PATCH$i}"; i=`expr $i + 1`; done)} 1.138 + do 1.139 + case "$patchfile" in 1.140 + *-patch.sh.bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;; 1.141 + *-patch.sh.gz ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;; 1.142 + *.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 ;; 1.143 + *.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 ;; 1.144 + *.patch.bz2 ) %{l_bzip2} -d -c $patchfile | %{l_patch} -p1 -f || true ;; 1.145 + *.patch.gz ) %{l_gzip} -d -c $patchfile | %{l_patch} -p1 -f || true ;; 1.146 + * ) 1.147 + echo "Unknown patch format" | %{l_rpmtool} msg -b -t error 1>&2 1.148 + exit 1 1.149 + ;; 1.150 + esac 1.151 + done 1.152 + find . -name "*.orig" -print | xargs rm -f 1.153 + %patch -p0 -P 100 1.154 + 1.155 +%build 1.156 + %{l_shtool} subst \ 1.157 + -e 's;SRC_SUBDIRS test;SRC_SUBDIRS;' \ 1.158 + configure 1.159 + CC="%{l_cc}" \ 1.160 + CPPFLAGS="%{l_cppflags}" \ 1.161 + CFLAGS="%{l_cflags}" \ 1.162 + ./configure \ 1.163 + --prefix=%{l_prefix} \ 1.164 + --includedir=%{l_prefix}/include/ncurses \ 1.165 + --datadir=%{l_prefix}/share/ncurses \ 1.166 + --enable-hashmap \ 1.167 + --enable-safe-sprintf \ 1.168 + --without-debug \ 1.169 + --with-manpage-format=normal \ 1.170 + --disable-getcap-cache \ 1.171 + --without-cxx-binding \ 1.172 + --without-cxx \ 1.173 + --without-gpm \ 1.174 + --enable-termcap \ 1.175 + --disable-overwrite 1.176 + %{l_make} %{l_mflags} 1.177 + 1.178 +%install 1.179 + %{l_shtool} subst -e "s;ln -s;ln;g" edit_man.sh 1.180 + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.181 + ( cd $RPM_BUILD_ROOT%{l_prefix}/man 1.182 + for dir in man1 man3; do 1.183 + cd $dir 1.184 + for file in *.[13][a-z]*; do 1.185 + if [ ".$file" = ".*.[13][a-z]*" ]; then 1.186 + break 1.187 + fi 1.188 + eval `echo "$file" | sed -e 's;^\(.*\.[13]\)[a-z]*$;base=\1;'` 1.189 + mv $file ncurses_$base 1.190 + done 1.191 + cd .. 1.192 + done 1.193 + ) || exit $? 1.194 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true 1.195 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} 1.196 + 1.197 +%files -f files 1.198 + 1.199 +%clean 1.200 +