Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@421 | 1 | ## |
michael@421 | 2 | ## gdb.spec -- OpenPKG RPM Package Specification |
michael@421 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@421 | 4 | ## |
michael@421 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@421 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@421 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@421 | 8 | ## copies. |
michael@421 | 9 | ## |
michael@421 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@421 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@421 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@421 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@421 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@421 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@421 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@421 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@421 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@421 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@421 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@421 | 21 | ## SUCH DAMAGE. |
michael@421 | 22 | ## |
michael@421 | 23 | |
michael@421 | 24 | # package version |
michael@421 | 25 | %define V_tarball 7.4.1 |
michael@421 | 26 | %define V_subdir 7.4.1 |
michael@421 | 27 | |
michael@421 | 28 | # package information |
michael@421 | 29 | Name: gdb |
michael@421 | 30 | Summary: GNU Debugger |
michael@421 | 31 | URL: http://www.gnu.org/software/gdb/ |
michael@421 | 32 | Vendor: Free Software Foundation |
michael@421 | 33 | Packager: OpenPKG Foundation e.V. |
michael@421 | 34 | Distribution: OpenPKG Community |
michael@421 | 35 | Class: BASE |
michael@421 | 36 | Group: Debugging |
michael@421 | 37 | License: GPL |
michael@421 | 38 | Version: %{V_tarball} |
michael@422 | 39 | Release: 20120800 |
michael@421 | 40 | |
michael@421 | 41 | # list of sources |
michael@421 | 42 | Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-%{V_tarball}.tar.gz |
michael@421 | 43 | Patch0: gdb.patch |
michael@421 | 44 | |
michael@421 | 45 | # build information |
michael@421 | 46 | BuildPreReq: OpenPKG, openpkg >= 20100101, make, flex, m4 |
michael@421 | 47 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@421 | 48 | BuildPreReq: ncurses, libiconv |
michael@421 | 49 | PreReq: ncurses, libiconv |
michael@421 | 50 | |
michael@421 | 51 | %description |
michael@421 | 52 | The purpose of a debugger such as GDB is to allow you to see what |
michael@421 | 53 | is going on `inside' another program while it executes -- or what |
michael@421 | 54 | another program was doing at the moment it crashed. |
michael@421 | 55 | |
michael@421 | 56 | %track |
michael@421 | 57 | prog gdb = { |
michael@421 | 58 | version = %{V_tarball} |
michael@421 | 59 | url = ftp://ftp.gnu.org/gnu/gdb/ |
michael@421 | 60 | regex = gdb-(__VER__)\.tar\.gz |
michael@421 | 61 | } |
michael@421 | 62 | |
michael@421 | 63 | %prep |
michael@421 | 64 | %setup -q -n gdb-%{V_subdir} |
michael@421 | 65 | %patch -p0 |
michael@463 | 66 | %{l_shtool} subst \ |
michael@463 | 67 | -e 's/if test.*prefer_curses[^;][^;]*/if false/' \ |
michael@463 | 68 | gdb/configure |
michael@421 | 69 | |
michael@421 | 70 | %build |
michael@421 | 71 | %{l_shtool} subst \ |
michael@421 | 72 | -e 's;-Werror;;' \ |
michael@421 | 73 | `find . -type f -name configure -print` |
michael@421 | 74 | CC="%{l_cc} %{l_ldflags}" \ |
michael@421 | 75 | CFLAGS="%{l_cflags -O} %{l_cppflags ncurses .}" \ |
michael@421 | 76 | CPPFLAGS="%{l_cppflags ncurses .}" \ |
michael@421 | 77 | LDFLAGS="%{l_ldflags}" \ |
michael@421 | 78 | LIBS="%{l_ldflags} -liconv" \ |
michael@421 | 79 | ./configure \ |
michael@421 | 80 | --prefix=%{l_prefix} \ |
michael@421 | 81 | --libdir=%{l_prefix}/lib \ |
michael@421 | 82 | --mandir=%{l_prefix}/man \ |
michael@421 | 83 | --infodir=%{l_prefix}/info \ |
michael@421 | 84 | --without-expat \ |
michael@421 | 85 | --with-libiconv-prefix=%{l_prefix} \ |
michael@421 | 86 | --disable-werror \ |
michael@421 | 87 | --disable-nls |
michael@421 | 88 | %{l_make} %{l_mflags -O} |
michael@421 | 89 | |
michael@421 | 90 | %install |
michael@421 | 91 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@422 | 92 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib* |
michael@421 | 93 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/include |
michael@421 | 94 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
michael@421 | 95 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/configure.info* |
michael@421 | 96 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/standards.info* |
michael@421 | 97 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/bfd.info* |
michael@421 | 98 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@421 | 99 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@421 | 100 | |
michael@421 | 101 | %files -f files |
michael@421 | 102 | |
michael@421 | 103 | %clean |
michael@421 | 104 |