%define _default_patch_fuzz 2
Summary: K Desktop Environment 4 - Libraries
Version: 4.1.1
Release: 4%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
Epoch: 6
Obsoletes: kdelibs4 < %{version}-%{release}
Provides: kdelibs4 = %{version}-%{release}
%else
Name: kdelibs4
%endif
# LGPLv2: everything, except (see below)
# BSD: kdoctools/
# GFDL: kdoctools/customization ?
License: LGPLv2
URL: http://www.kde.org/
Group: System Environment/Libraries
Source0: ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/kdelibs-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%ifarch noarch
%define apidocs 1
%else
%define rest 1
%endif
BuildRequires: kde4-macros(api) >= 2
BuildRequires: kde-filesystem >= 4
Requires: dbus-x11
Requires: hicolor-icon-theme
# kdebase-runtime not *strictly* required here, but how better to pull
# it in? comps only?
#Requires: kdebase-runtime
Requires: kde-filesystem >= 4
Requires: kde-settings
%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }
Requires: shared-mime-info
%if "%{name}" == "kdelibs"
Requires: kdelibs-common
%endif
%if 0%{?fedora} >= 9
Requires: hunspell
%endif
Requires: soprano >= 2.1
Source1: kde4.sh
Source2: kde4.csh
# make -devel packages parallel-installable
Patch0: kdelibs-4.1.0-parallel_devel.patch
# fix kde#149705
Patch2: kdelibs-3.95.0-kde149705.patch
# Hunspell support for K3Spell
# http://fedoraproject.org/wiki/Releases/FeatureDictionary
# http://bugs.kde.org/show_bug.cgi?id=154561
Patch5: kdelibs-4.0.0-k3spell-hunspell.patch
# openssl's SHLIB_VERSION_NUMBER macro can't be used/trusted
Patch6: kdelibs-4.0.0-openssl.patch
# install all .css files and Doxyfile.global in kdelibs-common to build
# kdepimlibs-apidocs against
Patch8: kdelibs-4.0.2-install-all-css.patch
# add Fedora/V-R to KHTML UA string
Patch9: kdelibs-4.0.2-branding.patch
# don't cache kdeglobals paths because they change after profile directories
# are loaded from kde4rc
Patch10: kdelibs-4.0.2-no-cache-kdeglobals-paths.patch
# workaround for policykit
Patch11: kdelibs-4.0.2-policykit-workaround.patch
Patch12: kdelibs-4.1.0-xdg-menu.patch
# Fedora build type - adds -DNDEBUG -DQT_NO_DEBUG, removes -O2 -g (already in RPM_OPT_FLAGS)
Patch13: kdelibs-4.0.5-fedora-buildtype.patch
# patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
Patch14: kdelibs-4.0.85-libexecdir.patch
# kstandarddirs changes: search /etc/kde, find /usr/libexec/kde4
Patch18: kdelibs-4.1.0-kstandarddirs.patch
# fix running commands in kglobalconfig before KComponentData init (#455130)
Patch19: kdelibs-4.1.0-#455130.patch
## upstream patches
Patch100: kdelibs-4.1.1-kde#169447-khtml-regression.patch
BuildRequires: qt4-devel >= 4.4.0
Requires: qt4 >= %{_qt4_version}
Requires: xdg-utils
Requires(post): /sbin/ldconfig xdg-utils
Requires(postun): /sbin/ldconfig xdg-utils
BuildRequires: alsa-lib-devel
%if 0%{?fedora} < 9
# we don't want a hard dependency on aspell on F9+, use enchant only
BuildRequires: aspell-devel
%endif
BuildRequires: automoc
BuildRequires: avahi-devel
BuildRequires: bzip2-devel
BuildRequires: cmake
BuildRequires: cups-devel cups
BuildRequires: enchant-devel
BuildRequires: gamin-devel
BuildRequires: gettext-devel
BuildRequires: giflib-devel
# busted at least on x86_64
#BuildRequires: hspell-devel
BuildRequires: jasper-devel
BuildRequires: krb5-devel
BuildRequires: libacl-devel libattr-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxslt-devel libxml2-devel
BuildRequires: OpenEXR-devel
BuildRequires: openssl-devel
BuildRequires: pcre-devel
# work around circular dependency from phonon-devel pulling in phonon-backend-xine
BuildRequires: phonon-backend-gstreamer
BuildRequires: phonon-devel >= 4.2
BuildRequires: shared-mime-info
BuildRequires: soprano-devel >= 2.1
BuildRequires: strigi-devel >= 0.5.7
BuildRequires: zlib-devel
BuildRequires: libutempter-devel
# extra X deps (seemingly needed and/or checked-for by most kde4 buildscripts)
%define x_deps libXcomposite-devel libXdamage-devel libxkbfile-devel libXpm-devel libXScrnSaver-devel libXtst-devel libXv-devel libXxf86misc-devel
%{?x_deps:BuildRequires: %{x_deps}}
BuildRequires: openssh-clients
BuildRequires: subversion
%if 0%{?apidocs}
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: qt4-doc
%endif
%description
Libraries for the K Desktop Environment 4.
%if "%{name}" == "kdelibs"
%package common
Group: System Environment/Libraries
Summary: Common files for KDE 3 and KDE 4 libraries
%description common
This package includes the common files for the KDE 3 and KDE 4 libraries.
%endif
%package devel
Group: Development/Libraries
Summary: Header files for compiling KDE 4 applications
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
%if "%{name}" != "kdelibs4"
Obsoletes: kdelibs4-devel < %{version}-%{release}
Provides: kdelibs4-devel = %{version}-%{release}
%endif
Requires: automoc
Requires: qt4-devel
Requires: openssl-devel
Requires: phonon-devel >= 4.2
Requires: strigi-devel
Requires: bzip2-devel gamin-devel libacl-devel zlib-devel libutempter-devel
%{?x_deps:Requires: %{x_deps}}
%description devel
This package includes the header files you will need to compile
applications for KDE 4.
%package apidocs
Group: Development/Documentation
Summary: KDE 4 API documentation
# Not strictly required -- Rex
# Requires: %{name} = %{?epoch:%{epoch}:}%{version}
Requires: kde-filesystem
%if "%{name}" != "kdelibs4"
Provides: kdelibs4-apidocs = %{version}-%{release}
#else
# Don't do that for now, we'd need to make sure all Requires: kdelibs-apidocs
# (in kdevelop etc.) are fixed to kdelibs3-apidocs first and it may not be
# worth it anyway.
#Provides: kdelibs-apidocs = 6:%{version}-%{release}
%endif
%description apidocs
This package includes the KDE 4 API documentation in HTML
format for easy browsing.
%prep
%setup -q -n kdelibs-%{version}
%patch0 -p1 -b .parallel_devel
%patch2 -p1 -b .kde149705
%if 0%{?fedora} >= 9
%patch5 -p1 -b .k3spell-hunspell
%else
# shouldn't be needed f9+, we'll see -- Rex
%patch6 -p1 -b .openssl
%endif
%patch8 -p1 -b .all-css
%patch9 -p1 -b .branding
sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanager.cpp
%patch10 -p1 -b .no-cache-kdeglobals-paths
%patch11 -p1 -b .policykit
%patch12 -p1 -b .Administration-menu
%patch13 -p1 -b .fedora-buildtype
%patch14 -p1 -b .libexecdir
%patch18 -p1 -b .kstandarddirs
%patch19 -p1 -b .#455130
## upstream patches
%patch100 -p0 -b .kde#169447-khtml-regression
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} -DKDE_DISTRIBUTION_TEXT="%{version}-%{release} Fedora" ..
popd
%if 0%{?rest}
make %{?_smp_mflags} -C %{_target_platform}
%endif
# build apidocs
%if 0%{?apidocs}
export QTDOCDIR=`pkg-config --variable=docdir Qt`
doc/api/doxygen.sh .
%endif
%install
rm -rf %{buildroot}
%if 0%{?rest}
make install DESTDIR=%{buildroot} -C %{_target_platform}
# see also use-of/patching of XDG_MENU_PREFIX in kdebase/kde-settings
mv %{buildroot}%{_kde4_sysconfdir}/xdg/menus/applications.menu \
%{buildroot}%{_kde4_sysconfdir}/xdg/menus/kde4-applications.menu
%if "%{name}" != "kdelibs"
# remove files which conflict with KDE 3
rm -f %{buildroot}%{_kde4_bindir}/checkXML %{buildroot}%{_kde4_bindir}/kjscmd \
%{buildroot}%{_kde4_bindir}/kunittestmodrunner
rm -f %{buildroot}%{_kde4_configdir}/kdebug.areas %{buildroot}%{_kde4_configdir}/kdebugrc \
%{buildroot}%{_kde4_configdir}/kdeprintrc %{buildroot}%{_kde4_configdir}/ui/ui_standards.rc
rm -f %{buildroot}%{_kde4_docdir}/HTML/en/common/*
rm -f %{buildroot}%{_kde4_sharedir}/locale/all_languages
%endif
# move devel symlinks
mkdir -p %{buildroot}%{_kde4_libdir}/kde4/devel
pushd %{buildroot}%{_kde4_libdir}
for i in lib*.so
do
case "$i" in
libkdeinit4_*.so)
;;
## FIXME/TODO: imo, should leave everything except for known-conflicts -- Rex
*)
linktarget=`readlink "$i"`
rm -f "$i"
ln -sf "../../$linktarget" "kde4/devel/$i"
;;
esac
done
popd
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/kde4.sh
install -p -m 644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/kde4.csh
# fix Sonnet documentation multilib conflict
bunzip2 %{buildroot}%{_kde4_docdir}/HTML/en/sonnet/index.cache.bz2
sed -i -e 's!!!g' %{buildroot}%{_kde4_docdir}/HTML/en/sonnet/index.cache
bzip2 -9 %{buildroot}%{_kde4_docdir}/HTML/en/sonnet/index.cache
# install apidocs and generator script
install -p -D doc/api/doxygen.sh %{buildroot}%{_kde4_bindir}/kde4-doxygen.sh
%endif
%if 0%{?apidocs}
mkdir -p %{buildroot}%{_kde4_docdir}/HTML/en
cp -prf kdelibs-%{version}-apidocs %{buildroot}%{_kde4_docdir}/HTML/en/kdelibs4-apidocs
%endif
%post
/sbin/ldconfig ||:
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
xdg-desktop-menu forceupdate 2> /dev/null || :
%postun
/sbin/ldconfig ||:
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
xdg-desktop-menu forceupdate 2> /dev/null || :
%clean
rm -rf %{buildroot}
%if 0%{?rest}
%files
%defattr(-,root,root,-)
%doc AUTHORS README TODO
%doc COPYING.LIB
%config(noreplace) %{_sysconfdir}/profile.d/*
%{_kde4_bindir}/*
%exclude %{_kde4_bindir}/kconfig_compiler4
%{_kde4_appsdir}/*
# kdewidgets
%exclude %{_kde4_bindir}/makekdewidgets4
%exclude %{_kde4_appsdir}/kdewidgets/
%exclude %{_kde4_libdir}/kde4/plugins/designer/kdewidgets.*
%exclude %{_kde4_appsdir}/cmake/
%{_kde4_configdir}/*
%{_datadir}/dbus-1/interfaces/*
%{_libdir}/kde4/plugins/script/*
%{_kde4_datadir}/mime/packages/*
%{_kde4_sharedir}/kde4/services/*
%{_kde4_sharedir}/kde4/servicetypes/*
%{_kde4_sharedir}/icons/hicolor/*/actions/presence_*
%{_kde4_docdir}/HTML/en/sonnet/
%{_kde4_libdir}/lib*.so.*
%{_kde4_libdir}/libkdeinit4_*.so
%dir %{_kde4_libdir}/kde4/
%{_kde4_libdir}/kde4/*.so
%{_kde4_libexecdir}/*
%dir %{_kde4_libdir}/kde4/plugins/
%{_kde4_libdir}/kde4/plugins/imageformats/
%{_kde4_sysconfdir}/xdg/menus/*.menu
%doc %{_mandir}/man*/*
# kdelibs-common comes from here for fedora >= 9
%if "%{name}" == "kdelibs"
%exclude %{_kde4_configdir}/kdebug.areas
%exclude %{_kde4_configdir}/kdebugrc
%exclude %{_kde4_configdir}/ui/ui_standards.rc
%exclude %{_kde4_appsdir}/kdeui
%files common
%defattr(-,root,root,-)
%{_kde4_configdir}/kdebug.areas
%{_kde4_configdir}/kdebugrc
%dir %{_kde4_configdir}/ui
%{_kde4_configdir}/ui/ui_standards.rc
%{_kde4_appsdir}/kdeui
%{_kde4_docdir}/HTML/en/common/
%{_kde4_datadir}/locale/all_languages/
%endif
%files devel
%defattr(-,root,root,-)
%doc KDE4PORTING.html
%{_kde4_bindir}/kconfig_compiler4
%{_kde4_bindir}/makekdewidgets4
%{_kde4_bindir}/kde4-doxygen.sh
%{_kde4_appsdir}/cmake/
%{_kde4_appsdir}/kdewidgets/
%{_kde4_includedir}/*
%{_kde4_libdir}/kde4/devel/
%{_kde4_libdir}/kde4/plugins/designer/
%endif
%if 0%{?apidocs}
%files apidocs
%defattr(-,root,root,-)
%{_kde4_docdir}/HTML/en/kdelibs4-apidocs/
%endif
%changelog
* Tue Sep 02 2008 Than Ngo 4.1.1-4
- apply patch to fix regression in khtml
* Mon Sep 01 2008 Than Ngo 4.1.1-3
- respun
* Fri Aug 29 2008 Kevin Kofler 4.1.1-2
- fix #455130 (kinit crashing in kglobalconfig with no KComponentData) properly
- drop revert-kinit-regression hack (fixes ioslave translations)
* Fri Aug 29 2008 Than Ngo 4.1.1-1
- 4.1.1
* Fri Aug 29 2008 Kevin Kofler 4.1.0-9
- -devel: +Requires: libutempter-devel (cmake wants to link it in)
* Thu Aug 28 2008 Kevin Kofler 4.1.0-8
- rewrite kstandarddirs patch to fix side effects (#459904 (KDEDIRS), #457633)
* Mon Aug 25 2008 Than Ngo 4.1.0-7
- konsole doesn't write to utmp
* Sat Aug 23 2008 Kevin Kofler 4.1.0-6
- don't hide KDE 3 KCMs in kde4-applications.menu, not needed with our
OnlyShowIn=KDE3 patch and breaks KDE 3 KCMs (kcmshell, apps) in KDE 4 sessions
* Sun Aug 10 2008 Kevin Kofler 4.1.0-5
- fix kcookiejar crash on invalid cookie file from KDE 3 (patch by David Faure)
* Fri Aug 01 2008 Rex Dieter 4.1.0-4
- -devel: Requires: phonon-devel >= 4.2 (helps multilib upgrades)
- konq processes never terminate (kde#167826, rh#457526)
* Wed Jul 30 2008 Rex Dieter 4.1.0-3
- (Build)Requires: soprano(-devel) >= 2.1 (#456827)
* Thu Jul 24 2008 Kevin Kofler 4.1.0-2
- move Sonnet documentation back to the main package
- fix #453063 (Sonnet documentation multilib conflict) properly
* Wed Jul 23 2008 Than Ngo 4.1.0-1
- 4.1.0
* Sun Jul 20 2008 Kevin Kofler 4.0.99-3
- fix kstandarddirs patch to always append the installed location last, even if
it is already present earlier in the search path (#456004)
* Sat Jul 19 2008 Rex Dieter 4.0.99-2
- use better fedora-buildtype patch from F-9 branch
* Fri Jul 18 2008 Rex Dieter 4.0.99-1
- 4.0.99
* Mon Jul 14 2008 Rex Dieter 4.0.98-4
- respun tarball
* Sat Jul 12 2008 Kevin Kofler - 4.0.98-2
- revert a kinit patch causing an assertion failure in KComponentData (#455130)
* Thu Jul 10 2008 Rex Dieter 4.0.98-1
- 4.0.98
- omit proxy patch (fixed upstream)
* Sun Jul 06 2008 Rex Dieter 4.0.85-1
- 4.0.85
* Fri Jun 27 2008 Rex Dieter 4.0.84-1
- 4.0.84
* Fri Jun 27 2008 Kevin Kofler - 4.0.83-3
- fix kstandarddirs patch so /usr/libexec/kde4 is found (#453063)
* Wed Jun 25 2008 Rex Dieter 4.0.83-2
- -common: move %{_kde4_docdir}/HTML/en/sonnet/ here (#341751)
* Thu Jun 19 2008 Than Ngo 4.0.83-1
- 4.0.83 (beta2)
* Fri Jun 13 2008 Than Ngo 4.0.82-1
- 4.0.82
* Fri May 30 2008 Than Ngo 4.0.80-2
- fix #447965, order issue in kde path, thanks to Kevin
- backport patch to check html style version
* Mon May 26 2008 Than Ngo 4.0.80-1
- 4.1 beta1
* Sat May 24 2008 Rex Dieter - 4.0.72-8
- revert previous, don't include kde3-compat symlink (here, anyway)
* Fri May 23 2008 Rex Dieter - 4.0.72-7
- -common: provide %%_datadir/apps/kdeui for kde3 apps (#447965)
* Thu May 22 2008 Rex Dieter - 4.0.72-6
- kstandarddirs hack to search /etc/kde
* Thu May 22 2008 Kevin Kofler - 4.0.72-5
- keep libphonon.so in %%{_libdir} for non-KDE apps (#447831)
* Thu May 15 2008 Kevin Kofler - 4.0.72-4
- fix proxy support (#443931, kde#155707)
- move %%{_kde4_appsdir}/ksgmltools2/ from -devel to the main package (#446435)
* Tue May 13 2008 Kevin Kofler - 4.0.72-3
- drop no longer needed ALSA default device Phonon hack
* Sun May 4 2008 Kevin Kofler - 4.0.72-2
- BR new minimum versions of qt4-devel and soprano-devel
* Fri May 2 2008 Kevin Kofler - 4.0.72-1
- update to 4.0.72 (4.1 alpha 1)
- parallel_devel patch ported by Lorenzo Villani
- update file list (Lorenzo Villani)
- drop upstreamed khtml-security, kconfig_sync_crash and klauncher-crash patches
- update xdg-menu (Administration menu) patch
* Tue Apr 22 2008 Lukáš Tinkl - 4.0.3-7
- fix buffer overflow in KHTML's image loader (KDE advisory 20080426-1,
#443766: CVE-2008-1670)
* Fri Apr 04 2008 Than Ngo - 4.0.3-6
- apply upstream patch to fix klauncher crash
- fix kconfig_sync_crash patch
* Fri Apr 4 2008 Rex Dieter 4.0.3-5
- kconfig_sync_crash patch
* Thu Apr 3 2008 Lukáš Tinkl 4.0.3-4
- rebuild for the new %%{_kde4_buildtype}
* Mon Mar 31 2008 Kevin Kofler 4.0.3-3
- patch and update file list for _kde4_libexecdir
* Mon Mar 31 2008 Kevin Kofler 4.0.3-2
- add Fedora build type (uses -DNDEBUG)
* Fri Mar 28 2008 Than Ngo 4.0.3-1
- 4.0.3
- -apidocs: drop Requires: %%name
* Fri Mar 28 2008 Than Ngo - 4.0.2-13
- add Administration menu, bz#439378
* Thu Mar 27 2008 Than Ngo 4.0.2-12
- bz#428212, adapted Kevin Kofler's workaround for Policykit
* Thu Mar 20 2008 Rex Dieter 4.0.2-11
- apidocs subpackage should be noarch (#436579)
* Mon Mar 10 2008 Kevin Kofler 4.0.2-10
- work around #436725: BR: libtool-ltdl so graphviz gets a valid libltdl
* Mon Mar 10 2008 Kevin Kofler 4.0.2-9
- fix kdeglobals not being found in profile (e.g. kde-settings) directory
* Fri Mar 07 2008 Rex Dieter 4.0.2-8
- touchup KDE_DISTRIBUTION_TEXT
- add Fedora/V-R to KHTML UA string (thanks caillon)
* Thu Mar 06 2008 Kevin Kofler 4.0.2-7
- exclude apidocs from the main package
* Thu Mar 06 2008 Than Ngo 4.0.2-6
- apply upstream patch to fix issue in KPropertiesDialog
* Thu Mar 06 2008 Kevin Kofler 4.0.2-5
- also install Doxyfile.global in -common to build kdepimlibs-apidocs against
* Wed Mar 05 2008 Kevin Kofler 4.0.2-4
- install all .css files in kdelibs-common to build kdepimlibs-apidocs against
- install doxygen.sh as kde4-doxygen.sh in -devel
- build apidocs and put them into an -apidocs subpackage (can be turned off)
- BR doxygen, graphviz and qt4-doc when building apidocs
* Fri Feb 29 2008 Than Ngo 4.0.2-3
- rebuilt
* Fri Feb 29 2008 Kevin Kofler 4.0.2-2
- drop obsolete kde#149703 patch (fixed upstream by code rewrite)
- drop backports from 4.0.2: objectembed-handling, autostart, kde#771201-khtml
* Thu Feb 28 2008 Than Ngo 4.0.2-1
- 4.0.2
* Wed Feb 27 2008 Lukáš Tinkl - 4.0.1-8
- add Fedora branding to the package (#434815)
* Mon Feb 25 2008 Rex Dieter 4.0.1-7
- -devel: own %%_kde4_libdir/kde4/plugins (thanks wolfy!)
* Tue Feb 19 2008 Kevin Kofler 4.0.1-6
- fix running KDE 3 apps as filetype viewers from KDE 4 Dolphin
* Mon Feb 18 2008 Rex Dieter 4.0.1-5
- -devel: include %%_kde4_appsdir/cmake here (#341751)
* Wed Feb 06 2008 Than Ngo 4.0.1-4
- upstream patch to make sure that static widget is always at position 0,0
* Fri Feb 01 2008 Than Ngo 4.0.1-3
- upstream patch to fix a regression in