gdb/gdb.spec

Fri, 03 Aug 2012 16:08:09 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 16:08:09 +0200
changeset 460
a0aab3b7ac97
parent 421
3285b64e3857
child 463
4006c74cc96c
permissions
-rw-r--r--

Revert to shell logic until openpkg(1) is ready for prime time on SVR5.

     1 ##
     2 ##  gdb.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 version
    25 %define       V_tarball 7.4.1
    26 %define       V_subdir  7.4.1
    28 #   package information
    29 Name:         gdb
    30 Summary:      GNU Debugger
    31 URL:          http://www.gnu.org/software/gdb/
    32 Vendor:       Free Software Foundation
    33 Packager:     OpenPKG Foundation e.V.
    34 Distribution: OpenPKG Community
    35 Class:        BASE
    36 Group:        Debugging
    37 License:      GPL
    38 Version:      %{V_tarball}
    39 Release:      20120800
    41 #   list of sources
    42 Source0:      ftp://ftp.gnu.org/gnu/gdb/gdb-%{V_tarball}.tar.gz
    43 Patch0:       gdb.patch
    45 #   build information
    46 BuildPreReq:  OpenPKG, openpkg >= 20100101, make, flex, m4
    47 PreReq:       OpenPKG, openpkg >= 20100101
    48 BuildPreReq:  ncurses, libiconv
    49 PreReq:       ncurses, libiconv
    51 %description
    52     The purpose of a debugger such as GDB is to allow you to see what
    53     is going on `inside' another program while it executes -- or what
    54     another program was doing at the moment it crashed.
    56 %track
    57     prog gdb = {
    58         version   = %{V_tarball}
    59         url       = ftp://ftp.gnu.org/gnu/gdb/
    60         regex     = gdb-(__VER__)\.tar\.gz
    61     }
    63 %prep
    64     %setup -q -n gdb-%{V_subdir}
    65     %patch -p0
    67 %build
    68     %{l_shtool} subst \
    69         -e 's;-Werror;;' \
    70         `find . -type f -name configure -print`
    71     CC="%{l_cc} %{l_ldflags}" \
    72     CFLAGS="%{l_cflags -O} %{l_cppflags ncurses .}" \
    73     CPPFLAGS="%{l_cppflags ncurses .}" \
    74     LDFLAGS="%{l_ldflags}" \
    75     LIBS="%{l_ldflags} -liconv" \
    76     ./configure \
    77         --prefix=%{l_prefix} \
    78         --libdir=%{l_prefix}/lib \
    79         --mandir=%{l_prefix}/man \
    80         --infodir=%{l_prefix}/info \
    81         --without-expat \
    82         --with-libiconv-prefix=%{l_prefix} \
    83         --disable-werror \
    84         --disable-nls
    85     %{l_make} %{l_mflags -O}
    87 %install
    88     %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    89     rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib*
    90     rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
    91     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
    92     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/configure.info*
    93     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/standards.info*
    94     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/bfd.info*
    95     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    96     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
    98 %files -f files
   100 %clean

mercurial