%define kdever 4.4.0

Name:           kio_gopher
Summary:        Gopher KIO slave for Konqueror
Version:        0.1.3
Release:        4%{?_dist_release}

Group:          System Environment/Libraries
License:        GPLv2+
URL:            http://kgopher.berlios.de/

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

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  kdelibs4-devel >= %{kdever}
BuildRequires:  cmake
BuildRequires:  gettext

#{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }

%description
This KIO slave adds support for the Gopher protocol to Konqueror.


%prep
%setup -q -n %{name}-%{version}-kde%{kdever}


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

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


%install
rm -rf %{buildroot}
mkdir %{buildroot}
make install DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang kio_gopher


%clean
rm -rf %{buildroot}


%files -f kio_gopher.lang
%defattr(-,root,root,-)
%doc README COPYING BUGS
# FAQ is only about installation problems which shouldn't affect the RPM.
%{_libdir}/kde4/kio_gopher.so
%{_datadir}/kde4/services/gopher.protocol


%changelog
* Sun Jan 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.1.3-4
- Initial build for Vine Linux

* Sat Feb 13 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.1.3-3
- new tarball from 4.4.0 extragear, contains updates translations

* Wed Sep 16 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.1.3-2
- drop postfix tag from Release

* Tue Sep 15 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.1.3-1.kde4.3.1
- Initial Fedora package
