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.
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
66 %{l_shtool} subst \
67 -e 's/if test.*prefer_curses[^;][^;]*/if false/' \
68 gdb/configure
70 %build
71 %{l_shtool} subst \
72 -e 's;-Werror;;' \
73 `find . -type f -name configure -print`
74 CC="%{l_cc} %{l_ldflags}" \
75 CFLAGS="%{l_cflags -O} %{l_cppflags ncurses .}" \
76 CPPFLAGS="%{l_cppflags ncurses .}" \
77 LDFLAGS="%{l_ldflags}" \
78 LIBS="%{l_ldflags} -liconv" \
79 ./configure \
80 --prefix=%{l_prefix} \
81 --libdir=%{l_prefix}/lib \
82 --mandir=%{l_prefix}/man \
83 --infodir=%{l_prefix}/info \
84 --without-expat \
85 --with-libiconv-prefix=%{l_prefix} \
86 --disable-werror \
87 --disable-nls
88 %{l_make} %{l_mflags -O}
90 %install
91 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib*
93 rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
94 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
95 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/configure.info*
96 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/standards.info*
97 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/bfd.info*
98 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
99 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
101 %files -f files
103 %clean