diff -r 45a2e4f038b1 -r 3285b64e3857 gdb/gdb.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gdb/gdb.spec Tue Jul 31 09:20:53 2012 +0200 @@ -0,0 +1,101 @@ +## +## gdb.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_tarball 7.4.1 +%define V_subdir 7.4.1 + +# package information +Name: gdb +Summary: GNU Debugger +URL: http://www.gnu.org/software/gdb/ +Vendor: Free Software Foundation +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: Debugging +License: GPL +Version: %{V_tarball} +Release: 20120603 + +# list of sources +Source0: ftp://ftp.gnu.org/gnu/gdb/gdb-%{V_tarball}.tar.gz +Patch0: gdb.patch + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, make, flex, m4 +PreReq: OpenPKG, openpkg >= 20100101 +BuildPreReq: ncurses, libiconv +PreReq: ncurses, libiconv + +%description + The purpose of a debugger such as GDB is to allow you to see what + is going on `inside' another program while it executes -- or what + another program was doing at the moment it crashed. + +%track + prog gdb = { + version = %{V_tarball} + url = ftp://ftp.gnu.org/gnu/gdb/ + regex = gdb-(__VER__)\.tar\.gz + } + +%prep + %setup -q -n gdb-%{V_subdir} + %patch -p0 + +%build + %{l_shtool} subst \ + -e 's;-Werror;;' \ + `find . -type f -name configure -print` + CC="%{l_cc} %{l_ldflags}" \ + CFLAGS="%{l_cflags -O} %{l_cppflags ncurses .}" \ + CPPFLAGS="%{l_cppflags ncurses .}" \ + LDFLAGS="%{l_ldflags}" \ + LIBS="%{l_ldflags} -liconv" \ + ./configure \ + --prefix=%{l_prefix} \ + --libdir=%{l_prefix}/lib \ + --mandir=%{l_prefix}/man \ + --infodir=%{l_prefix}/info \ + --without-expat \ + --with-libiconv-prefix=%{l_prefix} \ + --disable-werror \ + --disable-nls + %{l_make} %{l_mflags -O} + +%install + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib + rm -rf $RPM_BUILD_ROOT%{l_prefix}/include + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/configure.info* + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/standards.info* + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/bfd.info* + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean +