# The 4.6.1 tarball is missing all documentation, keep the old one for now.
%global docversion 4.4.0

Name:           konq-plugins
Summary:        Additional plugins that interact with konqueror
Version:        4.6.1
Release:        2%{?_dist_release}

Group:          Applications/Internet
License:        GPLv2+ and LGPLv2+
URL:            http://extragear.kde.org

Source0:        ftp://ftp.kde.org/pub/kde/stable/%{version}/src/konq-plugins-%{version}.tar.bz2
Source1:        ftp://ftp.kde.org/pub/kde/stable/%{docversion}/src/extragear/konq-plugins-%{docversion}.tar.bz2

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

## upstream patches

BuildRequires: cmake
BuildRequires: gettext
BuildRequires: kdebase4-devel >= %{version}
BuildRequires: libtidy-devel

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

%description
Some additional plugins that interact with konqueror
* adblock: AdBlock plugin
* akregator: Add feeds directly to akregator (kdepim is needed)
* autorefresh: Refresh websites after a specifig period
* babelfish: Translate a website with babelfish
* crashes: Crash monitor
* dirfilter: Filter the current directory in many ways
* domtreeviewer: Displays the document object model in a box
* fsview: Graphical Disk Usage for inode/directory
* imagerotation: service menu to image operations
* khtmlsettingsplugin: Enable/disable some HTML settings
* kimggalleryplugin:  Creates an HTML page with thumbnails of
  all the images in the current directory.
* mediarealfolder:  service menu to open a medium mountpoints
* minitools: Implement bookmarklets into konqueror
* rellinks: Allows access to relations defined in the header of a document
* searchbar: Search Bar
* sidebar: a small embedded mediaplayer, for songs/video preview
* smbmounter: provides two menus items to smbmount/umount samba shares
* uachanger: Change the user agent for websites
* validators: Website validators
* webarchiver: Web Archiver


%prep
%setup -q -a 1
# use documentation from the old tarball
mv -f %{name}-%{docversion}/doc* .
tail -n 2 %{name}-%{docversion}/CMakeLists.txt >>CMakeLists.txt
rm -rf %{name}-%{docversion}


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
unset QTDIR || : ; . /etc/profile.d/qt4.sh
%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 %{buildroot}

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

# don't install kwebkitpart stuff on RHEL
#rm -rf %{buildroot}%{_kde4_appsdir}/kwebkitpart/

#find_lang %{name} 
#--with-kde


%clean
rm -rf %{buildroot}


%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
touch --no-create %{_datadir}/icons/oxygen &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
  touch --no-create %{_datadir}/icons/oxygen &> /dev/null
  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
  gtk-update-icon-cache %{_datadir}/icons/oxygen &> /dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
gtk-update-icon-cache %{_datadir}/icons/oxygen &> /dev/null || :


#-f %{name}.lang 
%files 
%defattr(-,root,root,-)
%doc COPYING COPYING.DOC COPYING.LIB README
%{_bindir}/fsview
%{_datadir}/config/translaterc
# co-owned with kdepim, since there's no shared dep
%{_datadir}/kde4/apps/akregator/
%{_datadir}/kde4/apps/dolphinpart/kpartplugins/*
%{_datadir}/kde4/apps/domtreeviewer/
%{_datadir}/kde4/apps/fsview/
%{_datadir}/kde4/apps/khtml/kpartplugins/*
%{_datadir}/kde4/apps/konqueror/icons/*
%{_datadir}/kde4/apps/konqueror/kpartplugins/*
%{_datadir}/kde4/apps/konqueror/opensearch/*
%{_datadir}/kde4/apps/kwebkitpart/kpartplugins/*
%{_datadir}/config.kcfg/validators.kcfg
%{_datadir}/kde4/services/*.desktop
%{_datadir}/kde4/services/ServiceMenus/*.desktop
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/icons/oxygen/*/*/*
%{_libdir}/kde4/*.so
%{_docdir}/HTML/*/konq-plugins


%changelog
* Mon Mar 13 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.6.1-2
- initial build for Vine Linux

* Sat Mar 05 2011 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.1-1
- update to 4.6.1, fixes file conflict with kde-l10n
- drop upstreamed patches
- use documentation from 4.4.0 because it's missing in 4.6.1
- drop old commented-out translation-finding code
- drop no longer needed BR webkitpart-devel, code uses abstract interfaces now

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Oct 26 2010 Alexey Kurov <nucleo@fedoraproject.org> - 4.4.0-6
- Fix the window.close regression in adblock (kde#253921)

* Tue Sep 07 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-5
- Embeddable Image Viewer permanently messes up status bar (kde#234624)

* Tue Sep 07 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-4
- ftbfs qt47 issues (#599830)

* Tue Feb 16 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-3
- Requires: kdebase4 (it's not multilib'd, no need for arch'd dep)

* Sat Feb 13 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.4.0-2
- backport upstream patch to fix BabelFish plugin WebKitPart support (#564552)

* Fri Feb 12 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-1
- konq-plugins-4.4.0 for real

* Thu Feb 11 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.4.0-0.1.20100211
- home-brew konq-plugins-4.4.0 (20100211 create_tarball.rb snapshot)

* Thu Dec 10 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.3-5
- BR libtidy-devel (Fedora only)

* Thu Dec 10 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.3-4
- fix build with KDE 4.3.80's version of webkitkde (upstream patch)

* Wed Nov 25 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.3-3
- rebuild for Qt 4.6.0 RC1 in F13 (was built against Beta 1 with unstable ABI)

* Mon Nov 09 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.3-2
- BR: webkitpart-devel >= 0.0.2

* Sat Nov 07 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.3-1
- 4.3.3

* Mon Oct 26 2009 Than Ngo <than@redhat.com> - 4.3.1-3
- rhel cleanup

* Sun Sep 27 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.1-2
- BR: webkitpart-devel
- use %%find_lang --all-names --with-kde
- Requires: kdebase4%%{_?isa} >= %%version

* Tue Sep 01 2009 Sebastian Vahl <svahl@fedoraproject.org> - 4.3.1-1
- 4.3.1
- use scriplet for HTML docdirs

* Tue Aug 11 2009 Sebastian Vahl <fedora@deadbabylon.de> 4.3.0-1
* KDE 4.3.0

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri May 08 2009 Rex Dieter <rdieter@fedoraproject.org> 4.2.3-1
- 4.2.3

* Tue Apr  7 2009 Lukáš Tinkl <ltinkl@redhat.com> - 4.2.2-1
- KDE 4.2.2

* Wed Mar 25 2009 Rex Dieter <rdieter@fedoraproject.org> 4.2.0-4
- fixup handbook install
- optimize scriptlets

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 18 2009 Rex Dieter <rdieter@fedoraproject.org> 4.2.0-2
- update %%description
- Requires: kdebase4 >= 4.2

* Fri Jan 23 2009 Than Ngo <than@redhat.com> - 4.2.0-1
- 4.2.0

* Mon Jan 05 2009 Rex Dieter <rdieter@fedoraproject.org> 4.1.3-4
- make install/fast
- jpegorient is not installed (#478736, kdebug#178612)

* Sun Dec 14 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.3-3
- rebuild for Python 2.6 (contains Python bytecode despite no dependencies)

* Tue Nov 11 2008 Sebastian Vahl <fedora@deadbabylon.de> 4.1.3-2
- include adblock language files

* Tue Nov 11 2008 Sebastian Vahl <fedora@deadbabylon.de> 4.1.3-1
- 4.1.3

* Sat Oct 04 2008 Than Ngo <than@redhat.com> 4.1.2-1
- 4.1.2

* Fri Aug 29 2008 Than Ngo <than@redhat.com> 4.1.1-1
- 4.1.1

* Thu Aug 07 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.1.0-2
- fix data files from akregator plugin not getting installed

* Wed Aug 06 2008 Rex Dieter <rdieter@fedoraproject.org> - 4.1.0-1
- 4.1.0
- drop searchbar-crash patch (no longer needed with Konqueror 4.1)

* Sun May 04 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.0.3-0.3.20080409svn
- fix searchbar plugin crash (#445144)

* Wed Apr 16 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.0.3-0.2.20080409svn
- rebuild because of corrupt PPC RPM causing signing failure (#442761)

* Wed Apr 09 2008 Sebastian Vahl <fedora@deadbabylon.de> - 4.0.3-0.1.20080409svn
- new svn checkout
- some minor spec cleanups
- License: GPLv2+ and LGPLv2+
- drop icons patch

* Tue Apr 01 2008 Sebastian Vahl <fedora@deadbabylon.de> - 4.0.2-0.2.20080303svn
- rebuild for NDEBUG and _kde4_libexecdir
- enhance %%description a bit

* Wed Feb 13 2008 Sebastian Vahl <fedora@deadbabylon.de> - 4.0.2-0.1.20080303svn
- new svn checkout (for KDE 4.0.2)
- update cmakelists patch
- remove icons patch (not needed anymore)
- add "svn" to release

* Wed Feb 13 2008 Sebastian Vahl <fedora@deadbabylon.de> - 4.0.1-0.2.20080214svn
- added konq-plugins-4.0.1-icons.patch
- add .po files to tarball

* Wed Feb 13 2008 Sebastian Vahl <fedora@deadbabylon.de> - 4.0.1-0.1.20080213svn
- initial version
