%endif
%define pdir RRDp
-%include /usr/lib/rpm/macros.perl
Summary: RRDtool - round robin database
Summary(pl.UTF-8): RRDtool - baza danych typu round-robin
Summary(pt_BR.UTF-8): Round Robin Database, uma ferramenta para construção de gráficos
Summary(uk.UTF-8): RRDtool - це система зберігання та показу серійних даних
Name: rrdtool
Version: 1.7.2
-Release: 1
+Release: 2
License: GPL v2+ + FLOSS exception
Group: Applications/Databases
Source0: https://oss.oetiker.ch/rrdtool/pub/%{name}-%{version}.tar.gz
BuildRequires: python-devel >= 1:2.3
%endif
%if %{with ruby}
+BuildRequires: rpm-rubyprov
BuildRequires: ruby-devel
%endif
%if %{with tcl}
%patch1 -p1
%patch2 -p1
-sed -i -e 's#\$TCL_PACKAGE_PATH#%{_prefix}/lib#g' configure.ac
-sed -i -e 's#/lib/lua/#/%{_lib}/lua/#g' configure.ac
+%{__sed} -i -e 's#\$TCL_PACKAGE_PATH#%{_prefix}/lib#g' configure.ac
+%{__sed} -i -e 's#/lib/lua/#/%{_lib}/lua/#g' configure.ac
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
+ examples/stripes.py
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+tclsh@TCL_VERSION@(\s|$),#!%{__tclsh}\1,' \
+ bindings/tcl/ifOctets.tcl.in
# We only want .txt and .html files for the main documentation
install -d docs/{html,/txt}