Name: redland-bindings Version: 1.0.11.1 Release: 6%{?dist} Summary: Redland RDF Application Framework API Bindings Group: System Environment/Libraries License: LGPLv2+ or GPLv2+ or ASL 2.0 URL: http://librdf.org/ Source: http://download.librdf.org/source/%{name}-%{version}.tar.gz # http://bugs.librdf.org/mantis/view.php?id=412 Patch1: ba9f04f703fc62e4b8a67b79c37824e1b9b256ba.patch # http://bugs.librdf.org/mantis/view.php?id=398 Patch2: 0a36f02c4b354ebd7fc1906c45e3463e328f613d.patch Patch3: 113a26b0fb22519ae7610e78570ab8b17b483139.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define redland_version 1.0.11 %{expand:%%define rhelrel %(test -e /etc/redhat-release -a ! -e /etc/fedora-release && perl -p -e 's@\D+([0-9\.]+)\D+@$1@' /etc/redhat-release || echo 0)} %{expand:%%define rhel %(expr %{rhelrel} \> 0)} # CentOS has MakeMaker in base perl package %if %{rhel} %else BuildRequires: perl-ExtUtils-MakeMaker %endif BuildRequires: redland-devel >= %{redland_version} BuildRequires: php-devel BuildRequires: python2-devel BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: swig # remove these when the build patches can be removed BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool # we don't want to provide private python extension libs %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } %description Redland is a library that provides a high-level interface for RDF (Resource Description Framework) implemented in an object-based API. It is modular and supports different RDF/XML parsers, storage mechanisms and other elements. Redland is designed for applications developers to provide RDF support in their applications as well as for RDF developers to experiment with the technology. %package common Summary: Redland RDF Application Framework API Bindings Group: System Environment/Libraries %description common Redland is a library that provides a high-level interface for RDF (Resource Description Framework) implemented in an object-based API. It is modular and supports different RDF/XML parsers, storage mechanisms and other elements. Redland is designed for applications developers to provide RDF support in their applications as well as for RDF developers to experiment with the technology. %{!?perl_vendorarch: %define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)} %define perlver %(eval "`%{__perl} -V:version`"; echo $version) %package -n perl-redland Summary: Perl modules for the Redland RDF library Group: Development/Languages Requires: redland >= %{redland_version} Requires: redland-bindings-common Requires: perl(:MODULE_COMPAT_%{perlver}) %description -n perl-redland The perl-redland package contains the parts of Redland that provide an interface to Perl. %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) %{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} %package -n php-redland Summary: PHP modules for the Redland RDF library Group: Development/Languages Requires: redland >= %{redland_version} Requires: redland-bindings-common Requires: php-api = %{php_apiver} %description -n php-redland The php-redland package contains the parts of Redland that provide an interface to PHP. %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %package -n python-redland Summary: Python modules for the Redland RDF library Group: Development/Languages Requires: redland >= %{redland_version} Requires: redland-bindings-common %description -n python-redland The python-redland package contains the parts of Redland that provide an interface to Python. %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')} %package -n ruby-redland Summary: Ruby modules for the Redland RDF library Group: Development/Languages Requires: redland >= %{redland_version} Requires: redland-bindings-common Requires: ruby(abi) = 1.8 %description -n ruby-redland The ruby-redland package contains the parts of Redland that provide an interface to Ruby. %prep %setup -q %patch1 -p1 %patch2 -p1 %patch3 -p1 %build # our patches are from upstream, touching configure.ac and Makefile.am, so # regenerate rm configure aclocal autoconf automake # when specifying system redland, the configure check for the version # allows newer redland libraries; without it it doesn't. # authors says that older bindings work with newer redlands. %configure --with-redland=system \ --with-python --with-python-get-python-lib-args=1 \ --with-perl \ --with-ruby --with-ruby-install-dir=%{ruby_sitearch} # hint on PREFIX taken from 1.0.10.1 ubuntu package cd perl make MAKE_PL_OPTS="INSTALLDIRS=vendor" %{?_smp_mflags} cd .. make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT cd perl make install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' # by default CORE.so gets 0555, fix it find $RPM_BUILD_ROOT -type f -name '*.so' -exec chmod 755 {} \; # if we want this as documentation, it cannot be executable chmod -x example.pl cd .. cd php # the php bindings need DESTDIR make DESTDIR=$RPM_BUILD_ROOT install # .so's need to be executable for rpm to strip them chmod +x $RPM_BUILD_ROOT%{php_extdir}/redland.so cd .. cd python # the python bindings need DESTDIR make DESTDIR=$RPM_BUILD_ROOT install cd .. cd ruby # the ruby bindings need DESTDIR make DESTDIR=$RPM_BUILD_ROOT install # .so's need to be executable for rpm to strip them chmod +x $RPM_BUILD_ROOT%{ruby_sitearch}/redland.so cd .. %clean rm -rf $RPM_BUILD_ROOT %files common %defattr(-,root,root,-) %doc AUTHORS COPYING COPYING.LIB ChangeLog %doc LICENSE.txt NEWS README TODO %doc LICENSE.html NEWS.html README.html TODO.html %doc LICENSE-2.0.txt NOTICE %doc RELEASE.html %files -n perl-redland %defattr(-,root,root,-) %doc docs/perl.html %attr(664,root,root) %doc perl/example.pl %{perl_vendorarch}/auto/ %{perl_vendorarch}/RDF/ %{_mandir}/man3/RDF::Redland*.3pm* %files -n php-redland %defattr(-,root,root,-) %doc docs/php.html %{php_extdir}/redland.so %files -n python-redland %defattr(-,root,root,-) %doc docs/python.html %doc docs/pydoc/RDF.html python/example.py %{python_sitearch}/RDF.py* %{python_sitearch}/Redland.so* %files -n ruby-redland %defattr(-,root,root,-) %doc docs/ruby.html %doc ruby/example.rb %{ruby_sitearch}/redland.so %{ruby_sitearch}/rdf %changelog * Thu Mar 03 2011 Thomas Vander Stichele - 1.0.11.1-6 - Renamed base package to common, as suggested by Orcan. * Mon Feb 07 2011 Thomas Vander Stichele - 1.0.11.1-5 - Clarify license based on https://github.com/dajobe/redland-bindings/commit/e5cf494c69f541ad3d357b69c821a85865dbdbc4 - More changes from package review - Incorporate upstream ruby patch - Incorporate upstream python patch * Sat Jan 22 2011 Thomas Vander Stichele - 1.0.11.1-4 - Updates after package review - Adhere to ruby/python/php macros and guidelines - Add comments linking to upstream patches - Support parallel make - Remove brp-python-bytecompile - Remove unneeded BuildRequires - Change php module to executable so it gets stripped - Change permissions on example for documentation * Mon Dec 20 2010 Thomas Vander Stichele - 1.0.11.1-3 - make sure the requires require our redland version or later. * Wed Dec 01 2010 Thomas Vander Stichele - 1.0.11.1-2 - build --with-redland=system so we don't need to patch configure * Sat Nov 27 2010 Thomas Vander Stichele - 1.0.11.1-1 - update to newest version for F-14, building against redland 1.0.12 * Tue Apr 06 2010 Thomas Vander Stichele - 1.0.7.1-2 - fix centos detection * Thu May 22 2008 Thomas Vander Stichele - 1.0.7.1-1 - update to newest version * Sat Jun 17 2006 Thomas Vander Stichele - 1.0.4.1-2 - added db4-devel - added patches for python and ruby sitearch, so 64-bit build works - use brb-python-bytecompile so we have .pyc and .pyo on < FC5 - fix up perl installed files - added php bindings * Sun May 14 2006 Thomas Vander Stichele - 1.0.4.1-1 - new release - added openssl-devel, postgresql-devel,sqlite-devel and mysql-devel buildrequires * Sat Apr 08 2006 Thomas Vander Stichele - 1.0.3.1-1 - update to latest release * Sat Apr 08 2006 Thomas Vander Stichele - 1.0.2.1-1 - packaged for Fedora Extras * Wed Nov 3 2004 Dave Beckett - Added redland-ruby include wrapper classes - BuildRequires: perl, python-devel, ruby-devel * Mon Nov 2 2004 Dave Beckett - License now LGPL/Apache 2 - Added LICENSE-2.0.txt and NOTICE * Mon Jul 19 2004 Dave Beckett - split redland to give redland-bindings - requires redland 0.9.17 * Mon Jul 12 2004 Dave Beckett - put /usr/share/redland/Redland.i in redland-devel * Wed May 5 2004 Dave Beckett - require raptor 1.3.0 - require rasqal 0.2.0 * Fri Jan 30 2004 Dave Beckett - require raptor 1.2.0 - update for removal of python distutils - require python 2.2.0+ - require perl 5.8.0+ - build and require mysql - do not build and require threestore * Sun Jan 4 2004 Dave Beckett - added redland-python package - export some more docs * Mon Dec 15 2003 Dave Beckett - require raptor 1.1.0 - require libxml 2.4.0 or newer - added pkgconfig redland.pc - split redland/devel package shared libs correctly * Mon Sep 8 2003 Dave Beckett - require raptor 1.0.0 * Thu Sep 4 2003 Dave Beckett - added rdfproc * Thu Aug 28 2003 Dave Beckett - patches added post 0.9.13 to fix broken perl UNIVERSAL::isa * Thu Aug 21 2003 Dave Beckett - Add redland-db-upgrade.1 - Removed duplicate perl CORE shared objects * Sun Aug 17 2003 Dave Beckett - Updates for new perl module names. * Tue Apr 22 2003 Dave Beckett - Updated for Redhat 9, RPM 4 * Fri Feb 12 2003 Dave Beckett - Updated for redland 0.9.12 * Fri Jan 4 2002 Dave Beckett - Updated for new Perl module names * Fri Sep 14 2001 Dave Beckett - Added shared libraries