New version
Resolves: rhbz#1251737 - Defuzzified ruby-2-fix and lua-5.2 patches - Used global instead of define - Dropped macros for commands (e.g. rm)
This commit is contained in:
parent
d5e7d7f41b
commit
af8cc1b0f6
80
rrdtool.spec
80
rrdtool.spec
@ -1,11 +1,11 @@
|
|||||||
%define with_python %{?_without_python: 0} %{?!_without_python: 1}
|
%global with_python %{?_without_python: 0} %{?!_without_python: 1}
|
||||||
%define with_php %{?_without_php: 0} %{?!_without_php: 1}
|
%global with_php %{?_without_php: 0} %{?!_without_php: 1}
|
||||||
%define with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
|
%global with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
|
||||||
%define with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1}
|
%global with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1}
|
||||||
%define with_lua %{?_without_lua: 0} %{?!_without_lua: 1}
|
%global with_lua %{?_without_lua: 0} %{?!_without_lua: 1}
|
||||||
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
|
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
|
||||||
%define svnrev r1190
|
%global svnrev r1190
|
||||||
#define pretag 1.2.99908020600
|
#global pretag 1.2.99908020600
|
||||||
|
|
||||||
%if "%{php_version}" < "5.6"
|
%if "%{php_version}" < "5.6"
|
||||||
%global ini_name %{name}.ini
|
%global ini_name %{name}.ini
|
||||||
@ -42,7 +42,8 @@ BuildRequires: libpng-devel, zlib-devel, intltool >= 0.35.0
|
|||||||
BuildRequires: cairo-devel >= 1.4.6, pango-devel >= 1.17
|
BuildRequires: cairo-devel >= 1.4.6, pango-devel >= 1.17
|
||||||
BuildRequires: libtool, groff, python-setuptools
|
BuildRequires: libtool, groff, python-setuptools
|
||||||
BuildRequires: gettext, libxml2-devel, libdbi-devel, systemd
|
BuildRequires: gettext, libxml2-devel, libdbi-devel, systemd
|
||||||
BuildRequires: perl-ExtUtils-MakeMaker, perl-devel, automake, autoconf
|
BuildRequires: perl-ExtUtils-MakeMaker, perl-Pod-Html, perl-devel
|
||||||
|
BuildRequires: automake, autoconf
|
||||||
|
|
||||||
%description
|
%description
|
||||||
RRD is the Acronym for Round Robin Database. RRD is a system to store and
|
RRD is the Acronym for Round Robin Database. RRD is a system to store and
|
||||||
@ -87,7 +88,7 @@ The Perl RRDtool bindings
|
|||||||
%if %{with_python}
|
%if %{with_python}
|
||||||
# Make sure the runtime python is newer than the build one;
|
# Make sure the runtime python is newer than the build one;
|
||||||
# give a default value to handle parsing in cases when python is not present:
|
# give a default value to handle parsing in cases when python is not present:
|
||||||
%{!?rrd_python_version: %define rrd_python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "3.14")}
|
%{!?rrd_python_version: %global rrd_python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "3.14")}
|
||||||
|
|
||||||
%package python
|
%package python
|
||||||
Summary: Python RRDtool bindings
|
Summary: Python RRDtool bindings
|
||||||
@ -135,7 +136,7 @@ The %{name}-tcl package includes RRDtool bindings for Tcl.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_ruby}
|
%if %{with_ruby}
|
||||||
%{!?ruby_vendorarchdir: %define ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]')}
|
%{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"]')}
|
||||||
|
|
||||||
%package ruby
|
%package ruby
|
||||||
Summary: Ruby RRDtool bindings
|
Summary: Ruby RRDtool bindings
|
||||||
@ -179,16 +180,16 @@ The %{name}-lua package includes RRDtool bindings for Lua.
|
|||||||
%patch6 -p1 -b .arm-crash-fix
|
%patch6 -p1 -b .arm-crash-fix
|
||||||
|
|
||||||
# Fix to find correct python dir on lib64
|
# Fix to find correct python dir on lib64
|
||||||
%{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \
|
perl -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \
|
||||||
configure
|
configure
|
||||||
|
|
||||||
# Most edits shouldn't be necessary when using --libdir, but
|
# Most edits shouldn't be necessary when using --libdir, but
|
||||||
# w/o, some introduce hardcoded rpaths where they shouldn't
|
# w/o, some introduce hardcoded rpaths where they shouldn't
|
||||||
%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' \
|
perl -pi.orig -e 's|/lib\b|/%{_lib}|g' \
|
||||||
configure Makefile.in php4/configure php4/ltconfig*
|
configure Makefile.in php4/configure php4/ltconfig*
|
||||||
|
|
||||||
# Perl 5.10 seems to not like long version strings, hack around it
|
# Perl 5.10 seems to not like long version strings, hack around it
|
||||||
%{__perl} -pi.orig -e 's|1.299907080300|1.29990708|' \
|
perl -pi.orig -e 's|1.299907080300|1.29990708|' \
|
||||||
bindings/perl-shared/RRDs.pm bindings/perl-piped/RRDp.pm
|
bindings/perl-shared/RRDs.pm bindings/perl-piped/RRDp.pm
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -221,12 +222,12 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/
|
|||||||
--with-pic
|
--with-pic
|
||||||
|
|
||||||
# Fix another rpath issue
|
# Fix another rpath issue
|
||||||
%{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \
|
perl -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \
|
||||||
bindings/perl-shared/Makefile.PL
|
bindings/perl-shared/Makefile.PL
|
||||||
|
|
||||||
%if %{with_ruby}
|
%if %{with_ruby}
|
||||||
# Remove Rpath from Ruby
|
# Remove Rpath from Ruby
|
||||||
%{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$\(EPREFIX\)/lib||g' \
|
perl -pi.orig -e 's|-Wl,--rpath -Wl,\$\(EPREFIX\)/lib||g' \
|
||||||
bindings/ruby/extconf.rb
|
bindings/ruby/extconf.rb
|
||||||
sed -i 's|extconf.rb \\|extconf.rb --vendor \\|' bindings/Makefile
|
sed -i 's|extconf.rb \\|extconf.rb --vendor \\|' bindings/Makefile
|
||||||
%endif
|
%endif
|
||||||
@ -234,8 +235,8 @@ sed -i 's|extconf.rb \\|extconf.rb --vendor \\|' bindings/Makefile
|
|||||||
# Force RRDp bits where we want 'em, not sure yet why the
|
# Force RRDp bits where we want 'em, not sure yet why the
|
||||||
# --with-perl-options and --libdir don't take
|
# --with-perl-options and --libdir don't take
|
||||||
pushd bindings/perl-piped/
|
pushd bindings/perl-piped/
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
perl Makefile.PL INSTALLDIRS=vendor
|
||||||
%{__perl} -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile
|
perl -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#{__make} %{?_smp_mflags}
|
#{__make} %{?_smp_mflags}
|
||||||
@ -243,8 +244,8 @@ make
|
|||||||
|
|
||||||
# Build the php module, the tmp install is required
|
# Build the php module, the tmp install is required
|
||||||
%if %{with_php}
|
%if %{with_php}
|
||||||
%define rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
|
%global rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
|
||||||
%{__make} install DESTDIR="%{rrdtmp}"
|
make install DESTDIR="%{rrdtmp}"
|
||||||
pushd php4/
|
pushd php4/
|
||||||
%configure \
|
%configure \
|
||||||
--with-rrdtool="%{rrdtmp}%{_prefix}" \
|
--with-rrdtool="%{rrdtmp}%{_prefix}" \
|
||||||
@ -252,55 +253,55 @@ pushd php4/
|
|||||||
#{__make} %{?_smp_mflags}
|
#{__make} %{?_smp_mflags}
|
||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
%{__rm} -rf %{rrdtmp}
|
rm -rf %{rrdtmp}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fix @perl@ and @PERL@
|
# Fix @perl@ and @PERL@
|
||||||
find examples/ -type f \
|
find examples/ -type f \
|
||||||
-exec %{__perl} -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
|
-exec perl -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
|
||||||
find examples/ -name "*.pl" \
|
find examples/ -name "*.pl" \
|
||||||
-exec %{__perl} -pi -e 's|\015||gi' {} \;
|
-exec perl -pi -e 's|\015||gi' {} \;
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR="$RPM_BUILD_ROOT" install
|
make DESTDIR="$RPM_BUILD_ROOT" install
|
||||||
|
|
||||||
# Install the php module
|
# Install the php module
|
||||||
%if %{with_php}
|
%if %{with_php}
|
||||||
%{__install} -D -m0755 php4/modules/rrdtool.so \
|
install -D -m0755 php4/modules/rrdtool.so \
|
||||||
%{buildroot}%{php_extdir}/rrdtool.so
|
%{buildroot}%{php_extdir}/rrdtool.so
|
||||||
# Clean up the examples for inclusion as docs
|
# Clean up the examples for inclusion as docs
|
||||||
%{__rm} -rf php4/examples/.svn
|
rm -rf php4/examples/.svn
|
||||||
# Put the php config bit into place
|
# Put the php config bit into place
|
||||||
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
|
mkdir -p %{buildroot}%{_sysconfdir}/php.d
|
||||||
%{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{ini_name}
|
cat << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{ini_name}
|
||||||
; Enable rrdtool extension module
|
; Enable rrdtool extension module
|
||||||
extension=rrdtool.so
|
extension=rrdtool.so
|
||||||
__EOF__
|
__EOF__
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Pesky RRDp.pm...
|
# Pesky RRDp.pm...
|
||||||
%{__mv} $RPM_BUILD_ROOT%{perl_vendorlib}/RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
|
mv $RPM_BUILD_ROOT%{perl_vendorlib}/RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
|
||||||
|
|
||||||
# Dunno why this is getting installed here...
|
# Dunno why this is getting installed here...
|
||||||
%{__rm} -f $RPM_BUILD_ROOT%{perl_vendorlib}/leaktest.pl
|
rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/leaktest.pl
|
||||||
|
|
||||||
# We only want .txt and .html files for the main documentation
|
# We only want .txt and .html files for the main documentation
|
||||||
%{__mkdir_p} doc2/html doc2/txt
|
mkdir -p doc2/html doc2/txt
|
||||||
%{__cp} -a doc/*.txt doc2/txt/
|
cp -a doc/*.txt doc2/txt/
|
||||||
%{__cp} -a doc/*.html doc2/html/
|
cp -a doc/*.html doc2/html/
|
||||||
|
|
||||||
# Put perl docs in perl package
|
# Put perl docs in perl package
|
||||||
%{__mkdir_p} doc3/html
|
mkdir -p doc3/html
|
||||||
%{__mv} doc2/html/RRD*.html doc3/html/
|
mv doc2/html/RRD*.html doc3/html/
|
||||||
|
|
||||||
# Clean up the examples
|
# Clean up the examples
|
||||||
%{__rm} -f examples/Makefile* examples/*.in
|
rm -f examples/Makefile* examples/*.in
|
||||||
|
|
||||||
# This is so rpm doesn't pick up perl module dependencies automatically
|
# This is so rpm doesn't pick up perl module dependencies automatically
|
||||||
find examples/ -type f -exec chmod 0644 {} \;
|
find examples/ -type f -exec chmod 0644 {} \;
|
||||||
|
|
||||||
# Clean up the buildroot
|
# Clean up the buildroot
|
||||||
%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-* \
|
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-* \
|
||||||
$RPM_BUILD_ROOT%{perl_vendorarch}/ntmake.pl \
|
$RPM_BUILD_ROOT%{perl_vendorarch}/ntmake.pl \
|
||||||
$RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
|
$RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
|
||||||
$RPM_BUILD_ROOT%{_datadir}/%{name}/examples \
|
$RPM_BUILD_ROOT%{_datadir}/%{name}/examples \
|
||||||
@ -330,9 +331,6 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE CONTRIBUTORS COPYRIGHT TODO NEWS CHANGES THREADS
|
%doc LICENSE CONTRIBUTORS COPYRIGHT TODO NEWS CHANGES THREADS
|
||||||
%exclude %{_docdir}/examples
|
|
||||||
%exclude %{_docdir}/doc2/html
|
|
||||||
%exclude %{_docdir}/doc2/txt
|
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
%{_unitdir}/rrdcached.service
|
%{_unitdir}/rrdcached.service
|
||||||
@ -363,7 +361,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
|
|||||||
%files python
|
%files python
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
|
%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
|
||||||
%{python_sitearch}/rrdtoolmodule.so
|
%{python_sitearch}/rrdtool.so
|
||||||
%{python_sitearch}/py_rrdtool-*.egg-info
|
%{python_sitearch}/py_rrdtool-*.egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -403,6 +401,8 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
|
|||||||
- New version
|
- New version
|
||||||
Resolves: rhbz#1251737
|
Resolves: rhbz#1251737
|
||||||
- Defuzzified ruby-2-fix and lua-5.2 patches
|
- Defuzzified ruby-2-fix and lua-5.2 patches
|
||||||
|
- Used global instead of define
|
||||||
|
- Dropped macros for commands (e.g. rm)
|
||||||
|
|
||||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-4
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user