Name:           kdeplasma-addons
Summary:        Additional plasmoids for KDE
Version:        4.5.1
Release:        1%{?_dist_release}

Group:          User Interface/Desktops
License:        GPLv2
URL:            http://www.kde.org/

Source0:        ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdeplasma-addons-%{version}.tar.bz2

## upstreamable patches

## upstream patches

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  attica-devel
BuildRequires:  libboost-devel
BuildRequires:  eigen2-devel
BuildRequires:  gettext
BuildRequires:  kdepimlibs-devel >= %{version}
BuildRequires:  libXtst-devel
BuildRequires:  libqalculate-devel
# for libplasmaclock, nepomuk
BuildRequires:  kdebase-workspace-devel >= %{version}
# Lancelot build-deps kdebase-workspace, which contains
# /usr/share/dbus-1/interfaces/org.freedesktop.ScreenSaver.xml
BuildRequires:  kdebase-workspace >= %{version}
# RECOMMENDED: Marble is used to provide a desktop globe wallpaper for Plasma.
BuildRequires:  kdeedu4-devel >= %{version}
# Optional (but recommended), enables automatic rotation for frame applet
#BuildRequires:  libkexiv2-devel >= 0.4.0
BuildRequires:  kdegraphics4-devel >= %{version}
# lancelot eye-candy
BuildRequires:  libXcomposite-devel libXrender-devel libXdamage-devel
BuildRequires:  qimageblitz-devel
BuildRequires:  soprano-devel
# kimpanel
BuildRequires:  scim-devel
BuildRequires:  qca2-devel

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

# when -libs was introduced
Obsoletes: kdeplasma-addons < 4.3.0-3

# most of former kdeaddons for KDE3 is now here
Obsoletes: kdeaddons < 4

%description
Additional plasmoids for KDE.

%package libs
Summary: Runtime libraries for %{name}
Group:   System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: kdelibs4 >= %{version}

%description libs
%{summary}.


%prep
%setup -q -n kdeplasma-addons-%{version}


%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}

# unpackaged files
# omit shlib symlinks 
rm -f %{buildroot}%{_libdir}/libplasma*.so
rm -f %{buildroot}%{_libdir}/lib{kimpanelruntime,ocsclient,rtm}.so
# lancelot-devel
rm -f %{buildroot}%{_libdir}/liblancelot*.so
rm -rf %{buildroot}%{_includedir}/kde4/KDE
rm -rf %{buildroot}%{_includedir}/kde4/lancelot
rm -rf %{buildroot}%{_includedir}/kde4/lancelot-datamodels
rm -rf %{buildroot}%{_datadir}/kde4/apps/cmake/modules/*.cmake
# conversion-devel 
rm -rf %{buildroot}%{_includedir}/kde4/conversion
rm -f  %{buildroot}%{_libdir}/libconversion.so
rm -f  %{buildroot}%{_datadir}/kde4/apps/cmake/modules/FindConversion.cmake


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

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

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

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LIB
%{_bindir}/lancelot
%{_bindir}/kimpanel
%{_libdir}/kde4/*.so
%{_libdir}/scim-1.0/scim-panel-dbus
%{_datadir}/kde4/apps/bball/
%{_datadir}/kde4/apps/desktoptheme/*
%{_datadir}/kde4/apps/lancelot/
%{_datadir}/kde4/apps/plasma/services/*
%{_datadir}/kde4/apps/plasma-applet-frame/
%{_datadir}/kde4/apps/plasma-applet-opendesktop/
%{_datadir}/kde4/apps/plasma-applet-opendesktop-activities/
%{_datadir}/kde4/apps/plasma_pastebin/
%{_datadir}/kde4/apps/plasma_wallpaper_pattern/
%{_datadir}/kde4/apps/plasmaboard/
%{_datadir}/kde4/apps/rssnow/
%{_datadir}/config/*.knsrc
%{_datadir}/config.kcfg/kimpanelconfig.kcfg
%{_datadir}/kde4/services/*.desktop
%{_datadir}/kde4/services/ServiceMenus/*.desktop
%{_datadir}/kde4/servicetypes/*.desktop
%{_datadir}/mime/packages/lancelotpart-mime.xml
%{_datadir}/dbus-1/services/org.kde.lancelot.service
%{_datadir}/dbus-1/interfaces/org.kde.impanel.xml
%{_datadir}/icons/hicolor/*/*/*

%files libs
%defattr(-,root,root,-)
%{_libdir}/libkimpanelruntime.so.*
%{_libdir}/liblancelot.so.*
%{_libdir}/liblancelot-datamodels.so.*
%{_libdir}/libplasmapotdprovidercore.so.*
%{_libdir}/libplasmacomicprovidercore.so.*
%{_libdir}/libplasmaweather.so.*
%{_libdir}/librtm.so.*


%changelog
* Sat Sep 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.5.1-1
- new upstream release
- built with libqalculate-0.9.7

* Sat Aug 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.5.0-1
- new upstream release

* Wed Jul  7 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.4.5-1
- new upstream release

* Sat May  8 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.4.3-1
- new upstream release

* Sun Mar 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.4.1-1
- new upstream release
- built with new toolchain

* Mon Dec 14 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.3.3-2
- Lancelot build-deps kdebase-workspace, which contains
  /usr/share/dbus-1/interfaces/org.freedesktop.ScreenSaver.xml

* Wed Nov 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.3.3-1
- new upstream release

* Tue Oct 27 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.3.2-2
- just +1 release number (4.3.2-1vl5 was broken in putting)

* Mon Oct 26 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.3.2-1
- new upstream release

* Sun Sep  6 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.3.1-1
- new upstream release
- added BR: eigen2-devel

* Sun Aug 23 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 4.3.0-6
- Initial build for Vine Linux

* Tue Aug 04 2009 Than Ngo <than@redhat.com> - 4.3.0-5
- respin

* Mon Aug 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.0-4
- fix microblog post crasher (kdebug#202364)

* Mon Aug 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.0-3
- -libs subpkg to sanitize multilib

* Sun Aug 02 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.0-2
- fix to allow updating of status via microblog plasmoid 

* Thu Jul 30 2009 Than Ngo <than@redhat.com> - 4.3.0-1
- 4.3.0

* Wed Jul 22 2009 Than Ngo <than@redhat.com> - 4.2.98-1
- 4.3rc3

* Thu Jul 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.96-2
- BR: libXcomposite-devel (lancelot eye-candy)

* Sun Jul 12 2009 Than Ngo <than@redhat.com> - 4.2.96-1
- 4.3rc2

* Fri Jun 26 2009 Than Ngo <than@redhat.com> - 4.2.95-1
- 4.3rc1

* Thu Jun 04 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.90-1
- KDE-4.3 beta2 (4.2.90)

* Mon May 25 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.85-4
- BR: eigen2-devel soprano-devel

* Tue May 19 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.2.85-3
- BR kdeedu-devel (for Marble)

* Sun May 17 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.2.85-2
- Obsoletes/Provides: kde-plasma-weather

* Wed May 13 2009 Lukáš Tinkl <ltinkl@redhat.com> - 4.2.85-1
- KDE 4.3 beta 1

* Thu Apr 30 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.2-3
- disable contacts krunner by default

* Wed Apr 01 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.2-2
- optimize scriptlets

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

* Mon Mar 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.2.1-3
- make bball applet work, ship .svg instead of .svgz (kdebug#185568)
- use new %%_qt45 macro
- spec housecleaning

* Fri Mar 13 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.2.1-2
- fix Lancelot rendering issues with Qt 4.5 (F11+ only, as the effect of that
  patch with 4.4.3 is unknown)

* Fri Feb 27 2009 Than Ngo <than@redhat.com> - 4.2.1-1
- 4.2.1

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

* Thu Jan 22 2009 Than Ngo <than@redhat.com> - 4.2.0-1
- 4.2.0

* Wed Jan 07 2009 Than Ngo <than@redhat.com> - 4.1.96-1
- 4.2rc1

* Tue Dec 16 2008 Rex Dieter <rdieter@fedoraproject.org> 4.1.85-2
- saner versioned Obsoletes

* Fri Dec 12 2008 Than Ngo <than@redhat.com> 4.1.85-1
- 4.2beta2

* Tue Dec 02 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.80-3
- BR plasma-devel
- add Provides: kde-plasma-lancelot
- fix file list
- BR libkexiv2-devel >= 0.4.0 on F10+

* Thu Nov 20 2008 Than Ngo <than@redhat.com> 4.1.80-2
- merged
- add Obsoletes: kde-plasma-lancelot

* Thu Nov 20 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 4.1.80-1
- 4.1.80
- BR cmake >= 2.6.2
- make install/fast

* Wed Nov 12 2008 Than Ngo <than@redhat.com> 4.1.3-1
- 4.1.3

* Mon Sep 29 2008 Rex Dieter <rdieter@fedoraproject.org> 4.1.2-2
- make VERBOSE=1
- respin against new(er) kde-filesystem

* Fri Sep 26 2008 Rex Dieter <rdieter@fedoraproject.org> 4.1.2-1
- 4.1.2

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

* Wed Jul 23 2008 Than Ngo <than@redhat.com> 4.1.0-1
- 4.1.0

* Fri Jul 18 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.99-1
- 4.0.99

* Thu Jul 17 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.98-2
- kdeplasma-addons rename

* Fri Jul 11 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.98-1
- 4.0.98

* Thu Jul 10 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.85-2
- Provides: kdeplasma-addons

* Sun Jul 06 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.85-1
- 4.0.85

* Fri Jun 27 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.84-1
- 4.0.84

* Fri Jun 20 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.83-2
- add ldconfig to scriptlets

* Thu Jun 19 2008 Than Ngo <than@redhat.com> 4.0.83-1
- 4.0.83 (beta2)

* Sun Jun 15 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.82-1
- kdeplasmoids-4.0.82

* Tue May 27 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.80-2
- add missing BR openldap-devel
- update file list, add icon scriptlets

* Mon May 26 2008 Than Ngo <than@redhat.com> 4.0.80-1
- 4.1 beta 1

* Wed May 07 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.72-0.1.20080506svn804581
- update to revision 804581 from KDE SVN (to match KDE 4.0.72)
- add COPYING and COPYING.LIB as %%doc
- update file list

* Thu Apr 03 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.1-5
- rebuild (again) for the fixed %%{_kde4_buildtype}

* Mon Mar 31 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.1-4
- rebuild for NDEBUG and _kde4_libexecdir

* Tue Mar 04 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.1-3
- disable broken bluemarble applet (crashes Plasma when no OpenGL, #435656)

* Tue Mar 04 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.0.1-2
- rebuild against KDE 4.0.2 (mainly to make sure it still builds)

* Thu Jan 31 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.1-1
- kde-4.0.1

* Tue Jan 08 2008 Sebastian Vahl <fedora@deadbabylon.de> 4.0.0-1
- kde-4.0.0

* Tue Dec 11 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.97.0-3
- add versioned obsolete kdeaddons

* Tue Dec 11 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.97.0-2
- package language files properly (by RexDieter)
- Obsolete: kdeaddons

* Tue Dec 11 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.97.0-1
- kde 3.97.0
- removed some BRs which are in kdelibs4-devel now
- BR: gettext

* Sun Dec 02 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.2-2
- update %%summary and %%description
- cleanup spec
- removed unneeded Requires

* Sun Dec 02 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.2-1
- kde-3.96.2

* Tue Nov 27 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.1-1
- kde-3.96.1

* Mon Nov 19 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.0-3
- BR: kde-filesystem >= 4

* Mon Nov 19 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.0-2
- BR: libxkbfile-devel
- BR: libXpm-devel
- BR: libXv-devel
- BR: libXxf86misc-devel
- BR: libXScrnSaver-devel
- BR: libXtst-devel
- BR: kdepimlibs-devel
- BR: qimageblitz-devel
- explicit require kdelibs, kdepimlibs and kdeworkspace >= version
- add require kde4-macro scriplet

* Thu Nov 15 2007 Sebastian Vahl <fedora@deadbabylon.de> 3.96.0-1
- Initial version for Fedora
