Name: redland-bindings Version: 1.0.7.1 Release: 1%{?dist} Summary: Redland RDF Application Framework API Bindings Group: System Environment/Libraries License: LGPL or Apache 2.0 URL: http://librdf.org/ Source: http://download.librdf.org/source/%{name}-%{version}.tar.gz Patch0: autoreconf.patch Patch1: python.sitearch.patch Patch2: ruby.sitearch.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define redland_version 1.0.7 %{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)} %if 0%{?rhelrel:1} %else BuildRequires: perl-ExtUtils-MakeMaker %endif BuildRequires: redland-devel >= %{redland_version} BuildRequires: perl BuildRequires: php BuildRequires: php-devel BuildRequires: python-devel BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: openssl-devel BuildRequires: mysql-devel BuildRequires: postgresql-devel BuildRequires: sqlite-devel BuildRequires: db4-devel BuildRequires: swig %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. %{!?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: perl(:MODULE_COMPAT_%{perlver}) %description -n perl-redland The perl-redland package contains the parts of Redland that provide an interface to Perl. %{!?php_extdir: %define php_extdir %(php-config --extension-dir)} %{!?php_apiver:%{expand:%%define php_apiver %(php -i | sed -n 's/^PHP API => //p' | tail -1)}} %package -n php-redland Summary: PHP modules for the Redland RDF library Group: Development/Languages Requires: redland = %{redland_version} Requires: php-api = %{php_apiver} %description -n php-redland The php-redland package contains the parts of Redland that provide an interface to PHP. %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{?!pybasever:%{expand:%%define pybasever %(%{__python} -c "import sys ; print sys.version[:3]")}} %package -n python-redland Summary: Python modules for the Redland RDF library Group: Development/Languages Requires: redland = %{redland_version} %if "%{pybasever}" == "2.3" Requires: python-abi = 2.3 %endif %description -n python-redland The python-redland package contains the parts of Redland that provide an interface to Python. %{!?ruby_sitearchdir: %define ruby_sitearchdir %(/usr/bin/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} %description -n ruby-redland The ruby-redland package contains the parts of Redland that provide an interface to Ruby. %prep %setup -q %patch0 -p2 %patch1 -p1 %patch2 -p1 %build %configure --with-python --with-perl --with-ruby cd perl perl Makefile.PL INSTALLDIRS=vendor cd .. make %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 {} \; cd .. cd php # the php bindings need DESTDIR make DESTDIR=$RPM_BUILD_ROOT install cd .. cd python # the python bindings need DESTDIR make DESTDIR=$RPM_BUILD_ROOT install cd .. # redhat-rpm-config 8.0.35 and higher, shipped since FC5, does this on its own /usr/lib/rpm/brp-python-bytecompile cd ruby # the ruby bindings need DESTDIR make DESTDIR=$RPM_BUILD_ROOT install cd .. %clean rm -rf $RPM_BUILD_ROOT %files -n perl-redland %defattr(-,root,root,-) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc docs/perl.html %doc perl/example.pl %{perl_vendorarch}/auto/ %{perl_vendorarch}/RDF/ %{_mandir}/man3/RDF::Redland*.3pm* %files -n php-redland %defattr(-,root,root,-) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc docs/php.html %doc perl/example.pl %{php_extdir}/redland.so %files -n python-redland %defattr(-,root,root,-) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc docs/python.html %doc docs/pydoc/RDF.html python/example.py %{python_sitearch}/RDF.py %{python_sitearch}/RDF.pyc %ghost %{python_sitearch}/RDF.pyo %{python_sitearch}/Redland.so* %files -n ruby-redland %defattr(-,root,root,-) %doc AUTHORS COPYING COPYING.LIB ChangeLog LICENSE.txt NEWS README %doc LICENSE-2.0.txt NOTICE %doc docs/ruby.html %doc ruby/example.rb %{ruby_sitearchdir}/redland.so %{ruby_sitearchdir}/rdf %changelog * 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