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