File redland-bindings.spec of Package redland-bindings

# vim: set sw=4 ts=4 et nu:

%{!?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))")}

%define php_extension_dir %(php-config --extension-dir 2>/dev/null || echo "PHP-CONFIG-NOT-FOUND")

Name:               redland-bindings
Version:            1.0.14.1
Release:            0
Summary:            Bindings for the Redland RDF Library
# http://download.librdf.org/source/redland-bindings-%{version}.tar.gz
Source:             redland-bindings-%{version}.tar.bz2
URL:                http://librdf.org/
Group:              System/Libraries
License:            GNU Lesser General Public License version 2.1 or later (LGPL v2.1 or later)
BuildRoot:          %{_tmppath}/build-%{name}-%{version}
BuildRequires:      libredland-devel >= 1.0.14
BuildRequires:      python-devel
BuildRequires:      ruby-devel
BuildRequires:      perl
BuildRequires:      php5-devel
BuildRequires:      lua-devel
BuildRequires:      swig
BuildRequires:      gcc make glibc-devel pkgconfig
BuildRequires:      autoconf automake libtool

%description
Redland is a set of free software C libraries that provide support for the
Resource Description Framework (RDF).

This package provides bindings to the Redland library for the Python
programming language.

%package -n python-redland
Summary:            Python Bindings for the Redland RDF Library
Group:              Development/Libraries/Python
%py_requires

%description -n python-redland
Redland is a set of free software C libraries that provide support for the
Resource Description Framework (RDF).

This package provides bindings to the Redland library for the Python
programming language.

%package -n ruby-redland
Summary:            Ruby Bindings for the Redland RDF Library
Group:              Development/Languages/Ruby

%description -n ruby-redland
Redland is a set of free software C libraries that provide support for the
Resource Description Framework (RDF).

This package provides bindings to the Redland library for the Ruby
programming language.

%package -n perl-RDF-Redland
Summary:            Perl Bindings for the Redland RDF Library
Group:              Development/Libraries/Perl

%description -n perl-RDF-Redland
Redland is a set of free software C libraries that provide support for the
Resource Description Framework (RDF).

This package provides bindings to the Redland library for the Perl
programming language.

%package -n php5-redland
Summary:            PHP5 Bindings for the Redland RDF Library
Group:              Development/Libraries/PHP

%description -n php5-redland
Redland is a set of free software C libraries that provide support for the
Resource Description Framework (RDF).

This package provides bindings to the Redland library for the PHP5
programming language.

%prep
%setup -q

%build
%configure \
    --enable-release \
    --with-python \
    --with-ruby \
    --with-perl \
    --with-perl-makemaker-options="INSTALLDIRS=vendor" \
    --with-php \
    --with-lua

make %{?_smp_mflags} PERL_MAKEMAKER_ARGS="INSTALLDIRS=vendor"

%install
%makeinstall

%perl_process_packlist
find "%{buildroot}/" -name perllocal.pod -exec %__rm {} \;
%__rm -f "%{buildroot}/var/adm/perl-modules"/*

%__install -d "%{buildroot}%{_sysconfdir}/php5/conf.d"
echo "extension=redland.so" > "%{buildroot}%{_sysconfdir}/php5/conf.d/redland.ini"

%files -n python-redland
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* LICENSE* NEWS* NOTICE README* TODO*
%{python_sitelib}/RDF.py
%{python_sitelib}/Redland.so

%files -n ruby-redland
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* LICENSE* NEWS* NOTICE README* TODO*
%dir %{rb_libdir}/rdf
%{rb_libdir}/rdf/redland.rb
%{rb_libdir}/rdf/redland
%{rb_archdir}/redland.so

%files -n perl-RDF-Redland
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* LICENSE* NEWS* NOTICE README* TODO*
%dir %{perl_vendorarch}/RDF
%{perl_vendorarch}/RDF/Redland
%{perl_vendorarch}/RDF/Redland.pm
%dir %{perl_vendorarch}/auto/RDF
%{perl_vendorarch}/auto/RDF/Redland
%doc %{perl_man3dir}/RDF::Redland.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/RDF::Redland::*.%{perl_man3ext}%{ext_man}

%files -n php5-redland
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* LICENSE* NEWS* NOTICE README* TODO*
%config(noreplace) /etc/php5/conf.d/redland.ini
%{php_extension_dir}/redland.so

openSUSE Build Service is sponsored by