]> git.pld-linux.org Git - packages/gdb.git/blobdiff - gdb.spec
- release 5
[packages/gdb.git] / gdb.spec
index be63a317a411d2eb340d57caf4516874ca8acf77..3d22c3314df4d748c97f669742b11864832d7225 100644 (file)
--- a/gdb.spec
+++ b/gdb.spec
@@ -2,15 +2,11 @@
 # - Do not remove -lib package, it is required by FPC
 
 # TODO
-# - python subpkg
-# - gdbtui is as big as gdb, but different md5, some kind of duplicate?
-# - change yum install msg to poldek one in buildid-locate-rpm.patch
+# - change install msg to poldek in buildid-locate-rpm-pld.patch when poldek allows it. LP#493922
 #
 # Conditional build:
 %bcond_without python          # build without python support
 
-%define                snap    20090930
-%define                rel             0.1
 Summary:       A GNU source-level debugger for C, C++ and Fortran
 Summary(de.UTF-8):     Symbolischer Debugger für C und andere Sprachen
 Summary(es.UTF-8):     Depurador de programas C y otras lenguajes
@@ -24,33 +20,24 @@ Summary(zh_CN.UTF-8):       [开发]C和其他语言的调试器
 Summary(zh_TW.UTF-8):  [.-A開發]C和.$)B其.-A他語.$)B言的調試器
 Name:          gdb
 Version:       7.0
-Release:       0.5
+Release:       5
 License:       GPL v3+
 Group:         Development/Debuggers
-# Source0:     ftp://sourceware.org/pub/gdb/snapshots/current/gdb-%{version}.%{snap}.tar.bz2
-# Source0:     gdb-%{version}.%{snap}.tar.bz2
 Source0:       http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.bz2
 # Source0-md5: 3386a7b69c010785c920ffc1e9cb890a
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 2e8a48939ae282c12bbacdd54e398247
-# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
+Source3:       %{name}-gstack.man
 Source4:       libstdc++-v3-python-r151798.tar.bz2
 # Source4-md5: 7507540c50a1edeb2fc22a37bc4a08b8
 
-# PLD
-Patch1000:     %{name}-readline.patch
-Patch1001:     %{name}-info.patch
-Patch1002:     %{name}-passflags.patch
-Patch1005:     %{name}-pretty-print-by-default.patch
+# FEDORA -- use the same numbering that they do
+# don't ever modify these patches, apply secondary patch to alter it pld way
+# use:'<,'>!grep -vE '^(\#|$)' in vim to filterout comments, spaces
 
-# FEDORA
 Patch1:                %{name}-6.3-rh-dummykfail-20041202.patch
 Patch2:                %{name}-6.3-rh-testversion-20041202.patch
 Patch3:                %{name}-6.3-rh-testlibunwind-20041202.patch
-
-# Backported post gdb-7.0 fixups.
-Patch232:      %{name}-7.0-upstream.patch
-
 Patch104:      %{name}-6.3-ppcdotsolib-20041022.patch
 Patch105:      %{name}-6.3-ppc64syscall-20040622.patch
 Patch106:      %{name}-6.3-framepczero-20040927.patch
@@ -100,6 +87,7 @@ Patch217:    %{name}-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
 Patch225:      %{name}-6.5-bz109921-DW_AT_decl_file-test.patch
 Patch229:      %{name}-6.3-bz140532-ppc-unwinding-test.patch
 Patch231:      %{name}-6.3-bz202689-exec-from-pthread-test.patch
+Patch232:      %{name}-7.0-upstream.patch
 Patch234:      %{name}-6.6-bz230000-power6-disassembly-test.patch
 Patch235:      %{name}-6.3-bz231832-obstack-2gb.patch
 Patch240:      %{name}-6.6-bz225783-prelink-path.patch
@@ -160,19 +148,29 @@ Patch388: %{name}-bz538626-bp_location-accel-bp-cond.patch
 Patch390:      %{name}-readline-6.0-signal.patch
 Patch391:      %{name}-x86_64-i386-syscall-restart.patch
 
+# PLD patches
+Patch1000:     %{name}-readline.patch
+Patch1001:     %{name}-info.patch
+Patch1002:     %{name}-passflags.patch
+Patch1005:     %{name}-pretty-print-by-default.patch
+Patch1006:     buildid-locate-rpm-pld.patch
 URL:           http://www.gnu.org/software/gdb/
 BuildRequires: autoconf >= 2.53
 BuildRequires: automake
 BuildRequires: bison
+BuildRequires: expat-devel
 BuildRequires: flex
 BuildRequires: libtool
 BuildRequires: ncurses-devel >= 5.2
-BuildRequires: python-devel
-BuildRequires: readline-devel >= 6.0
-BuildRequires: rpm-pythonprov
+BuildRequires: pkgconfig
+BuildRequires: readline-devel
+BuildRequires: rpmbuild(macros) >= 1.219
 BuildRequires: texinfo >= 4.4
 BuildRequires: zlib-devel
-%{?with_python:Requires: python-libs}
+%if %{with python}
+BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -240,6 +238,15 @@ This package provides a program that allows you to run GDB on a
 different machine than the one which is running the program being
 debugged.
 
+%package -n python-%{name}
+Summary:       GDB Python bindings
+Summary(pl.UTF-8):     Wiązania PackageKit dla Pythona
+Group:         Development/Languages/Python
+Requires:      python-libs
+
+%description -n python-%{name}
+GDB Python bindings.
+
 %package lib
 Summary:       GDB in the form of a static library
 Summary(pl.UTF-8):     GDB w postaci biblioteki statycznej
@@ -253,28 +260,18 @@ GDB in the form of a static library.
 GDB w postaci biblioteki statycznej.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
 
 # libstdc++ pretty printers.
 bzip2 -dc %{SOURCE4} | tar xf -
 
-%patch1000 -p1
-%patch1001 -p1
-%patch1002 -p1
-%patch1005 -p1
-
 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
 rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
 rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 
-# Apply patches defined above.
-
-# Match the Fedora's version info.
+# FEDORA PATCHES -- keep them in same order they do
 %patch2 -p1
-
-# backported fixes
 %patch232 -p1
-
 %patch349 -p1
 %patch383 -p1
 %patch384 -p1
@@ -282,7 +279,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch124 -p1
 %patch1 -p1
 %patch3 -p1
-
 %patch104 -p1
 %patch105 -p1
 %patch106 -p1
@@ -387,8 +383,20 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch390 -p1
 %patch391 -p1
 
+# PLD patches
+%patch1000 -p1
+%patch1001 -p1
+%patch1002 -p1
+%patch1005 -p1
+%patch1006 -p1
+
 mv $(basename %{SOURCE4} .tar.bz2) libstdcxxpython
 
+# Change the version that gets printed at GDB startup, so it is PLD Linux specific.
+cat > gdb/version.in << EOF
+PLD Linux (%{version}-%{release})
+EOF
+
 %build
 for dir in $(find gdb -name 'configure.in'); do
        dir=$(dirname "$dir")
@@ -427,16 +435,21 @@ cp -f /usr/share/automake/config.* .
        --without-included-regex \
        --without-x
 
-%{__make}
-%{__make} info
+%{__make} -j1
+%{__make} -j1 info
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_infodir}
 
-%{__make} install install-info \
+%{__make} -j1 install install-info \
        DESTDIR=$RPM_BUILD_ROOT
 
+# gdbtui seems all identical to gdb except when invoked as gdbtio, ncurses
+# window is created too.
+echo ".so gdb.1" > $RPM_BUILD_ROOT%{_mandir}/man1/gdbtui.1
+ln -f $RPM_BUILD_ROOT%{_bindir}/{gdb,gdbtui}
+
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 cp -a gdb/libgdb.a $RPM_BUILD_ROOT%{_libdir}
 
@@ -449,16 +462,20 @@ for LIB in lib lib64; do
        LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
        install -d $LIBPATH
        # basename is being run only for the native (non-biarch) file.
-       sed -e 's,@pythondir@,%{_datadir}/gdb/python,'          \
-         -e 's,@toolexeclibdir@,%{_prefix}/'"$LIB,"            \
+       sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \
+         -e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
          < libstdcxxpython/hook.in     \
          > $LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
 done
-test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
-install -d $RPM_BUILD_ROOT%{_datadir}/gdb/python
-cp -a libstdcxxpython/libstdcxx        $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
+cp -a libstdcxxpython/libstdcxx        $RPM_BUILD_ROOT%{py_sitescriptdir}
+
+%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_postclean
 %endif
 
+cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/gstack.1
+
 # Remove the files that are part of a gdb build but that are owned and provided by other packages.
 # These are part of binutils
 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
@@ -488,6 +505,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/gdb/syscalls
 %{_mandir}/man1/gdb.1*
 %{_mandir}/man1/gdbtui.1*
+%{_mandir}/man1/gstack.1*
 %lang(es) %{_mandir}/es/man1/*
 %lang(fr) %{_mandir}/fr/man1/*
 %lang(hu) %{_mandir}/hu/man1/*
@@ -499,9 +517,23 @@ rm -rf $RPM_BUILD_ROOT
 %{_infodir}/stabs.info*
 
 %if %{with python}
-%{py_sitescriptdir}/gdb
+%files -n python-%{name}
+%defattr(644,root,root,755)
+%dir %{py_sitescriptdir}/gdb
+%{py_sitescriptdir}/gdb/*.py[co]
+%dir %{py_sitescriptdir}/gdb/command
+%{py_sitescriptdir}/gdb/command/*.py[co]
+%dir %{py_sitescriptdir}/gdb/function
+%{py_sitescriptdir}/gdb/function/*.py[co]
+
+# likely oneday gcc.spec will provide this
+%dir %{py_sitescriptdir}/libstdcxx
+%{py_sitescriptdir}/libstdcxx/*.py[co]
+%dir %{py_sitescriptdir}/libstdcxx/v6
+%{py_sitescriptdir}/libstdcxx/v6/*.py[co]
+
+# or should we include it in base package?
 %{_datadir}/gdb/auto-load
-%{_datadir}/gdb/python
 %endif
 
 %files gdbserver
This page took 0.048297 seconds and 4 git commands to generate.