Accepting request 70035 from home:rmax:branches:devel:languages:python

Fix a version dependency problem with Tcl (bnc#693085) and put the Tcl bindings into a separate subpackage

OBS-URL: https://build.opensuse.org/request/show/70035
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/rrdtool?expand=0&rev=18
This commit is contained in:
Sascha Peilicke 2011-05-11 18:38:53 +00:00 committed by Git OBS Bridge
parent 0d675ce3ac
commit 455d84a2f6
3 changed files with 48 additions and 12 deletions

15
rrdtool-tclversion.patch Normal file
View File

@ -0,0 +1,15 @@
Index: bindings/tcl/tclrrd.c
===================================================================
--- bindings/tcl/tclrrd.c.orig
+++ bindings/tcl/tclrrd.c
@@ -678,10 +678,6 @@ static int init(
if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
return TCL_ERROR;
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
- return TCL_ERROR;
- }
-
/*
* Why a global array? In keeping with the Rrd:: namespace, why
* not simply create a normal variable Rrd::version and set it?

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 11 11:48:32 UTC 2011 - max@novell.com
- Move the Tcl bindings into a separate subpackage.
- Remove the superfluous call to (bnc#693085).
- Adopt the current practice of packaging Tcl extensions.
-------------------------------------------------------------------
Tue Dec 28 02:05:03 UTC 2010 - pascal.bleser@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package rrdtool (Version 1.4.5)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -35,11 +35,12 @@ License: GPLv2+
Group: Productivity/Scientific/Math
Requires: perl = %{perl_version}
Version: 1.4.5
%define cgilib_version 0.7
Release: 1
%define cgilib_version 0.7
# http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{version}.tar.gz
Source: %{name}-%{version}.tar.bz2
Patch1: rrdtool-lua_lib64.patch
Patch2: rrdtool-tclversion.patch
# http://www.infodrom.org/projects/cgilib/download/cgilib-%{cgilib_version}.tar.gz
Source1: cgilib-%{cgilib_version}.tar.bz2
Patch11: cgilib-fix_automake.patch
@ -59,6 +60,7 @@ definable time period.
%if %{_lib}==lib64
%patch1
%endif
%patch2
pushd "cgilib-%{cgilib_version}"
%patch11
popd #cgilib
@ -108,9 +110,7 @@ make \
ihtmldir=%{_docdir}/%{name}/html/ \
examplesdir=%{_docdir}/%{name}/examples/ \
libdir=%{_libdir} \
pkglibdir=%_datadir/tcl/tclrrd%version \
TCL_PACKAGE_DIR=%_datadir/tcl/tclrrd%version \
TCL_PACKAGE_PATH=%_datadir/tcl \
pkglibdir=%tcl_archdir/tclrrd%version \
install
# we install this later again
rm -r $RPM_BUILD_ROOT%{_prefix}/lib/perl
@ -134,11 +134,6 @@ popd
find "%{buildroot}" -type f -name '*.la' -exec %__rm {} \;
# documentation
install -m 644 CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO $RPM_BUILD_ROOT/%{_docdir}/%{name}
# Script libraries for Tcl extensions should be in a package-specific
# subdir of /usr/share/tcl
mkdir -p $RPM_BUILD_ROOT/usr/share/tcl/tclrrd%{version}
#mv $RPM_BUILD_ROOT/usr/lib/tclrrd%{version}/pkgIndex.tcl \
# $RPM_BUILD_ROOT/usr/share/tcl/tclrrd%{version}
%clean
rm -rf $RPM_BUILD_ROOT
@ -152,10 +147,8 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_docdir}/rrdtool
%doc %{_mandir}/*/*
/usr/bin/*
%{_datadir}/tcl
%{_libdir}/librrd.so.*
%{_libdir}/librrd_th.so.*
%{_libdir}/tclrrd*.so
%{perl_vendorlib}/RRDp.pm
%{perl_vendorarch}/RRDs.pm
#%{perl_vendorarch}/ntmake.pl
@ -205,6 +198,7 @@ This package contains the Python bindings
%{py_sitedir}/*
%if 0%{?has_lua}
%package -n lua-rrdtool
License: GPLv2+
Summary: Lua bindings for rrdtool
@ -227,4 +221,24 @@ This package contains the Lua bindings
%{_libdir}/lua/*/rrd.so.*
%endif
%package -n tcl-rrdtool
License: GPLv2+
Summary: Tcl bindings for rrdtool
Group: Productivity/Scientific/Math
Requires: tcl
%description -n tcl-rrdtool
A tool to log and analyze data gathered from all kinds of data sources.
The data analysis part of RRDtool is based on the ability to quickly
generate graphical representations of the data values collected over a
definable time period.
This package contains the Tcl bindings
%files -n tcl-rrdtool
%defattr(-, root, root)
%{tcl_archdir}/*
%{_libdir}/tclrrd*.so
%changelog