Name:          nepomuk-core
Summary:       Nepomuk core utilities and libraries 
Summary(ja):   Nepomuk core ユーティリティーとライブラリ
Version:       4.14.3
Release:       1%{?_dist_release}

License:       GPLv2,GPLv3,LGPLv2,LGPLv3
Group:         User Interface/Desktops
URL:           http://nepomuk.kde.org/

Source0:       ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.xz

BuildRoot:     %{_tmppath}/%{name}-%{version}-root

BuildRequires:	kdelibs-devel >= %{version}
BuildRequires:	soprano-devel >= 2.7.56
BuildRequires:	strigi-devel >= 0.7.3
BuildRequires:	exiv2-devel >= 0.20
BuildRequires:	poppler-qt4-devel
BuildRequires:	taglib-devel

Requires: %{name}-libs = %{version}-%{release}

Vendor: Project Vine
Distribution: Vine Linux

%description
The core Nepomuk system contains of the central services like file indexing,
file system monitoring, query, and of course storage, as well as the corresponding
client libraries.


%package devel
Summary:  Developer files for %{name}
Summary(ja): %{name} の開発用ファイル
Group:    Development/Libraries
Requires: %{name}-libs = %{version}-%{release}

%description devel
%{summary}.

%description -l ja devel
%{name} の開発用ファイルです．

%package libs
Summary: Runtime libraries for %{name}
Summary(ja): %{name} のランタイムライブラリ
Group:   System Environment/Libraries
Requires: kdelibs4 >= %{version}

%description libs
%{summary}.

%description -l ja libs
%{name} のランタイムライブラリです．

%prep
%setup -q

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIB_INSTALL_DIR:PATH=%{_libdir} \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
    ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
rm -rf $RPM_BUILD_ROOT

make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}


%clean
rm -rf $RPM_BUILD_ROOT

%posttrans
update-desktop-database -q &> /dev/null ||:

%postun
if [ $1 -eq 0 ] ; then
    update-desktop-database -q &> /dev/null ||:
fi

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%{_sysconfdir}/dbus-1/system.d/org.kde.nepomuk.filewatch.conf
%{_bindir}/nepomuk-simpleresource-rcgen
%{_bindir}/nepomuk2-rcgen
%{_bindir}/nepomukbackup
%{_bindir}/nepomukcleaner
%{_bindir}/nepomukcmd
%{_bindir}/nepomukctl
%{_bindir}/nepomukfileindexer
%{_bindir}/nepomukfilewatch
%{_bindir}/nepomukindexer
%{_bindir}/nepomukmigrator
%{_bindir}/nepomuksearch
%{_bindir}/nepomukserver
%{_bindir}/nepomukservicestub
%{_bindir}/nepomukshow
%{_bindir}/nepomukstorage
%{_libdir}/kde4/*.so
%{_libdir}/libkdeinit4_nepomukserver.so
%{_libexecdir}/kde4/kde_nepomuk_filewatch_raiselimit
%{_datadir}/applications/kde4/nepomukbackup.desktop
%{_datadir}/applications/kde4/nepomukcleaner.desktop
%{_datadir}/autostart/nepomukserver.desktop
%{_datadir}/dbus-1/interfaces/*
%{_datadir}/dbus-1/system-services/org.kde.nepomuk.filewatch.service
%{_datadir}/kde4/apps/*
%{_datadir}/kde4/services/*
%{_datadir}/kde4/servicetypes/*
%{_datadir}/ontology/kde/
%{_datadir}/polkit-1/actions/org.kde.nepomuk.filewatch.policy

%files devel
%defattr(-,root,root,-)
%{_includedir}/kde4/Nepomuk2
%{_includedir}/kde4/nepomuk2
%{_libdir}/libnepomukcleaner.so
%{_libdir}/libnepomukcore.so
%{_libdir}/cmake/NepomukCore

%files libs
%defattr(-,root,root,-)
%{_libdir}/libnepomukcleaner.so.*
%{_libdir}/libnepomukcore.so.*
%{_libdir}/libnepomukcommon.so
%{_libdir}/libnepomukextractor.so


%changelog
* Wed Dec 31 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.14.3-1
- new upstream release

* Mon May 05 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.12.5-1
- new upstream release

* Sat Feb 08 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.12.2-1
- new upstream release

* Wed Dec 11 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.11.4-1
- new upstream release

* Sun Sep 08 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.11.1-1
- new upstream release

* Sat Jul 06 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.10.5-1
- new upstream release
- remove BuildRequires: kdebase-workspace-devel
- add BuildRequires: exiv2-devel, poppler-qt4-devel, taglib-devel

* Fri Jan 04 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.5-1
- new upstream release

* Sat Nov 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.3-1
- new upstream release

* Sun Oct 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.2-1
- new upstream release

* Thu Sep 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.1-1
- new upstream release

* Sun Aug 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.0-1
- initial build
