From fc1b3e2b93cdf7c118a6d9eb9e5e2b228cf175e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 8 Dec 2009 07:16:07 +0000 Subject: [PATCH] - python subpackage Changed files: gdb.spec -> 1.120 --- gdb.spec | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/gdb.spec b/gdb.spec index 5f94842..2c19ae5 100644 --- a/gdb.spec +++ b/gdb.spec @@ -11,7 +11,7 @@ %bcond_without python # build without python support %define snap 20090930 -%define rel 0.3 +%define rel 0.4 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 @@ -163,12 +163,14 @@ BuildRequires: bison BuildRequires: flex BuildRequires: libtool BuildRequires: ncurses-devel >= 5.2 -BuildRequires: python-devel BuildRequires: readline-devel >= 6.0 -BuildRequires: rpm-pythonprov +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 @@ -236,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 @@ -448,9 +459,11 @@ for LIB in lib lib64; do < 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 # Remove the files that are part of a gdb build but that are owned and provided by other packages. @@ -493,9 +506,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 -- 2.44.0