Summary: An object oriented Perl modules for handling tasks related to RDF
Name: perl-RDF-Core
Version: 0.51
Release: 1%{?_dist_release}
License: MPL or GPL
Group: Development/Libraries
Source0: RDF-Core-%{version}.tar.gz
URL: http://www.cpan.org/dist/RDF-Core/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
BuildRequires: perl >= 5.004, perl-URI >= 1.03, perl-XML-Parser >= 2.30
BuildRequires: perl-DBI >= 1.14
Requires: perl >= 5.004
Requires: perl-URI >= 1.03
Requires: perl-XML-Parser >= 2.30
Requires: perl-DBI >= 1.14

Vendor: Project Vine
Distribution: Vine Linux

%description
RDF::Core is a pure perl implementation of RDF storage, parser, serializer 
and query. 

The storage functionality is basic - store, delete, query statements, where 
query means ask about existence or count or retrieve statements conforming 
given mask of (subject, predicate, object). Three storages are available - 
in memory, file (DB_File) and DBMS (PostgreSQL). 

The parser supports full RDF/XML syntax including aboutEach attribute (though 
it became obsolete). The serializer attempts to preserve anonymous nodes and 
to compact xml a bit grouping statements with common subject.

The query language is rather focused on resources than on statements. The 
typical pattern is me->neighbor->child->age to express neighbour's children's 
age, not (me,neighbour, him) && (him, child, it) && (it, age, value). 
It contains some shortcuts to express things, that are (possibly) expressed 
often, like object->rdf:type = someClass. Functions are another enhancement
of the language. They can be used instead of resource or property. Functions 
are implemented in a separated library, so that it's easy to create new or 
modify existing ones.

Original creator of RDF::Core is Ginger Alliance (www.gingerall.com).

%prep
%setup -q -n RDF-Core-%{version} 

%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS=vendor
make

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_prefix}
make DESTDIR=%{buildroot} install

rm -f %{buildroot}%{perl_vendorlib}/perllocal.pod
rm -f %{buildroot}%{perl_vendorarch}/auto/RDF/Core/.packlist

find %{buildroot}%{_prefix} -type f -print | 
	sed "s@^%{buildroot}@@g" | 
	grep -v ^%{_mandir} > %{name}.files
if [ "$(cat %{name}.files)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit -1
fi

%check
make test

%clean 
rm -rf %{buildroot}


%files -f %{name}.files
%defattr(-,root,root)
%doc Changes README dbmodel doc
%{_mandir}/*/*
%dir %{perl_vendorlib}/RDF
%dir %{perl_vendorlib}/RDF/Core
%dir %{perl_vendorlib}/RDF/Core/Enumerator
%dir %{perl_vendorlib}/RDF/Core/Model
%dir %{perl_vendorlib}/RDF/Core/Storage

%changelog
* Sun Oct 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.51-1
- applied new versioning policy

* Sun Sep 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.51-0vl1
- new upstream release
- changed Group to Development/Libraries

* Sat Dec  4 2004 IWAI, Masaharu <iwai@alib.jp> 0.31-0vl1
- new upstream release
- build on perl-5.8.6-0vl1

* Sun Jul  6 2003 IWAI Masaharu <iwai@alib.jp> 0.30-0vl1
- first build for Vine Linux
