]> git.pld-linux.org Git - packages/gdb.git/commitdiff
- python subpackage
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 8 Dec 2009 07:16:07 +0000 (07:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gdb.spec -> 1.120

gdb.spec

index 5f948422bb0730400965d36002bbc89cf90058b7..2c19ae5af63d8db99d52c59d8f8a4a58dfb320a1 100644 (file)
--- 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
This page took 0.044051 seconds and 4 git commands to generate.