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:
Jaroslav Škarvada 2015-08-12 11:18:44 +02:00
parent d5e7d7f41b
commit af8cc1b0f6
1 changed files with 40 additions and 40 deletions

View File

@ -1,11 +1,11 @@
%define with_python %{?_without_python: 0} %{?!_without_python: 1}
%define with_php %{?_without_php: 0} %{?!_without_php: 1}
%define with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
%define with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1}
%define with_lua %{?_without_lua: 0} %{?!_without_lua: 1}
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
%define svnrev r1190
#define pretag 1.2.99908020600
%global with_python %{?_without_python: 0} %{?!_without_python: 1}
%global with_php %{?_without_php: 0} %{?!_without_php: 1}
%global with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
%global with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1}
%global with_lua %{?_without_lua: 0} %{?!_without_lua: 1}
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
%global svnrev r1190
#global pretag 1.2.99908020600
%if "%{php_version}" < "5.6"
%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: libtool, groff, python-setuptools
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
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}
# 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:
%{!?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
Summary: Python RRDtool bindings
@ -135,7 +136,7 @@ The %{name}-tcl package includes RRDtool bindings for Tcl.
%endif
%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
Summary: Ruby RRDtool bindings
@ -179,16 +180,16 @@ The %{name}-lua package includes RRDtool bindings for Lua.
%patch6 -p1 -b .arm-crash-fix
# 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
# Most edits shouldn't be necessary when using --libdir, but
# 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*
# 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
#
@ -221,12 +222,12 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/
--with-pic
# 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
%if %{with_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
sed -i 's|extconf.rb \\|extconf.rb --vendor \\|' bindings/Makefile
%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
# --with-perl-options and --libdir don't take
pushd bindings/perl-piped/
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__perl} -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile
perl Makefile.PL INSTALLDIRS=vendor
perl -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile
popd
#{__make} %{?_smp_mflags}
@ -243,8 +244,8 @@ make
# Build the php module, the tmp install is required
%if %{with_php}
%define rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
%{__make} install DESTDIR="%{rrdtmp}"
%global rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
make install DESTDIR="%{rrdtmp}"
pushd php4/
%configure \
--with-rrdtool="%{rrdtmp}%{_prefix}" \
@ -252,55 +253,55 @@ pushd php4/
#{__make} %{?_smp_mflags}
make
popd
%{__rm} -rf %{rrdtmp}
rm -rf %{rrdtmp}
%endif
# Fix @perl@ and @PERL@
find examples/ -type f \
-exec %{__perl} -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
-exec perl -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
find examples/ -name "*.pl" \
-exec %{__perl} -pi -e 's|\015||gi' {} \;
-exec perl -pi -e 's|\015||gi' {} \;
%install
make DESTDIR="$RPM_BUILD_ROOT" install
# Install the php module
%if %{with_php}
%{__install} -D -m0755 php4/modules/rrdtool.so \
install -D -m0755 php4/modules/rrdtool.so \
%{buildroot}%{php_extdir}/rrdtool.so
# 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
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
%{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{ini_name}
mkdir -p %{buildroot}%{_sysconfdir}/php.d
cat << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{ini_name}
; Enable rrdtool extension module
extension=rrdtool.so
__EOF__
%endif
# 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...
%{__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
%{__mkdir_p} doc2/html doc2/txt
%{__cp} -a doc/*.txt doc2/txt/
%{__cp} -a doc/*.html doc2/html/
mkdir -p doc2/html doc2/txt
cp -a doc/*.txt doc2/txt/
cp -a doc/*.html doc2/html/
# Put perl docs in perl package
%{__mkdir_p} doc3/html
%{__mv} doc2/html/RRD*.html doc3/html/
mkdir -p doc3/html
mv doc2/html/RRD*.html doc3/html/
# 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
find examples/ -type f -exec chmod 0644 {} \;
# 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_archlib}/perllocal.pod \
$RPM_BUILD_ROOT%{_datadir}/%{name}/examples \
@ -330,9 +331,6 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
%files
%defattr(-,root,root,-)
%doc LICENSE CONTRIBUTORS COPYRIGHT TODO NEWS CHANGES THREADS
%exclude %{_docdir}/examples
%exclude %{_docdir}/doc2/html
%exclude %{_docdir}/doc2/txt
%{_bindir}/*
%{_libdir}/*.so.*
%{_unitdir}/rrdcached.service
@ -363,7 +361,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
%files python
%defattr(-,root,root,-)
%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
%{python_sitearch}/rrdtoolmodule.so
%{python_sitearch}/rrdtool.so
%{python_sitearch}/py_rrdtool-*.egg-info
%endif
@ -403,6 +401,8 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
- 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)
* 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