# kdelibs3 review: http://bugzilla.redhat.com/248899 %define _default_patch_fuzz 2 %define distname "Fedora" %if 0%{?rhel} %define distname "EL" %endif %define kde_settings 1 %define arts_ev 8:1.5.10 %define qt3 qt3 %define qt3_version 3.3.8b %define qt3_ev %{?qt3_epoch}%{qt3_version} %define qt3_docdir %{_docdir}/qt-devel-%{qt3_version} %define kde_major_version 3 %define apidocs 1 # We always include this here now because kdeartwork 4 has moved on to # icon-naming-spec names (partially, so the icon theme isn't usable with KDE 4 # yet either). Maybe the conditional should be dropped entirely? -- Kevin %define include_crystalsvg 1 Summary: K Desktop Environment 3 - Libraries Version: 3.5.10 Release: 21%{?dist} Name: kdelibs3 Obsoletes: kdelibs < 6:%{version}-%{release} Provides: kdelibs = 6:%{version}-%{release} License: LGPLv2 Url: http://www.kde.org/ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdelibs-%{version}.tar.bz2 Source1: kde.sh Source2: kde.csh Source3: devices.protocol Patch1: kdelibs-3.5.1-xdg-menu.patch Patch2: kdelibs-3.0.0-ndebug.patch Patch4: kdelibs-3.0.4-ksyscoca.patch Patch5: kdelibs-3.5.10-openssl.patch Patch15: kdelibs-3.4.91-buildroot.patch Patch32: kdelibs-3.2.3-cups.patch Patch33: kdelibs-3.3.2-ppc.patch Patch34: kdelibs-3.4.0-qtdoc.patch Patch35: kdelibs-3.4.92-inttype.patch Patch37: kdelibs-3.5.2-kdebug-kmail-quiet.patch Patch38: kdelibs-3.5.2-cupsdconf2-group.patch Patch39: kdelibs-3.5.4-kabc-make.patch Patch40: kdelibs-3.5.4-kdeprint-utf8.patch Patch41: kdelibs-3.5.6-utempter.patch Patch43: kdelibs-3.5.6-lang.patch Patch45: kdelibs-3.5.7-autostart.patch Patch46: kdelibs-3.5.8-kate-vhdl.patch Patch48: kdelibs-3.5.8-kspell-hunspell.patch Patch49: kdelibs-3.5.8-kspell2-enchant.patch Patch50: kdelibs-3.5.8-kspell2-no-ispell.patch Patch51: kdelibs-3.5.9-cupsserverbin.patch # initial support for (Only|Not)ShowIn=KDE3 Patch52: kdelibs-3.5.9-KDE3.patch # use /usr/libexec/kde4/drkonqi in KCrash (#453243) Patch53: kdelibs-3.5.9-drkonqi-kde4.patch # fix build against Rawhide kernel headers (fix flock and flock64 redefinition) Patch54: kdelibs-3.5.9-fix-flock-redefinition.patch # update the KatePart latex.xml syntax definition to the version from Kile 2.0.3 Patch55: kdelibs-3.5.10-latex-syntax-kile-2.0.3.patch # use /etc/kde in addition to /usr/share/config, borrowed from debian Patch100: kdelibs-3.5.5-kstandarddirs.patch # http://bugs.kde.org/93359, alternative to export libltdl_cv_shlibext=".so" hack. Patch101: kde-3.5-libtool-shlibext.patch # kget ignores simultaneous download limit (kde #101956) Patch103: kdelibs-3.5.0-101956.patch Patch104: kdelibs-3.5.10-gcc44.patch Patch105: kdelibs-3.5.10-ossl-1.x.patch ## security fixes # fix CVE-2009-2537 - select length DoS Patch200: kdelibs-3.5.10-cve-2009-2537-select-length.patch # fix CVE-2009-1725 - crash, possible ACE in numeric character references Patch201: kdelibs-3.5.10-cve-2009-1725.patch # fix CVE-2009-1690 - crash, possible ACE in KHTML (
use-after-free) Patch202: kdelibs-3.5.4-CVE-2009-1687.patch # fix CVE-2009-1687 - possible ACE in KJS (FIXME: still crashes?) Patch203: kdelibs-3.5.4-CVE-2009-1690.patch # fix CVE-2009-1698 - crash, possible ACE in CSS style attribute handling Patch204: kdelibs-3.5.10-cve-2009-1698.patch # fix CVE-2009-2702 - ssl incorrect verification of SSL certificate with NUL in subjectAltName Patch205: kdelibs-3.5.10-CVE-2009-2702.patch # fix oCERT-2009-015 - unrestricted XMLHttpRequest access to local URLs Patch206: kdelibs-3.5.10-oCERT-2009-015-xmlhttprequest.patch # CVE-2009-3736, libltdl may load and execute code from a library in the current directory Patch207: libltdl-CVE-2009-3736.patch Requires: hicolor-icon-theme %if %{kde_settings} Requires: kde-settings >= 3.5 %endif Requires: kde-filesystem Requires: kdelibs-common Requires: redhat-menus Requires: shadow-utils BuildRequires: sudo Requires(hint): sudo %if 0%{?fedora} %define libkdnssd libkdnssd %endif %define BuildRequires: xorg-x11-proto-devel libX11-devel %define _with_rgbfile --with-rgbfile=%{_datadir}/X11/rgb.txt Requires: iceauth Requires(pre): coreutils Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: hunspell BuildRequires: gettext BuildRequires: pcre-devel BuildRequires: cups-devel cups BuildRequires: %{qt3}-devel %{qt3}-devel-docs BuildRequires: arts-devel >= %{arts_ev} BuildRequires: flex >= 2.5.4a-13 BuildRequires: doxygen BuildRequires: libxslt-devel BuildRequires: sgml-common BuildRequires: openjade BuildRequires: jadetex BuildRequires: docbook-dtd31-sgml BuildRequires: docbook-style-dsssl BuildRequires: perl-SGMLSpm BuildRequires: docbook-utils BuildRequires: zlib-devel BuildRequires: libidn-devel BuildRequires: audiofile-devel BuildRequires: openssl-devel BuildRequires: perl BuildRequires: gawk BuildRequires: byacc BuildRequires: libart_lgpl-devel BuildRequires: bzip2-devel BuildRequires: libtiff-devel BuildRequires: libacl-devel libattr-devel BuildRequires: enchant-devel BuildRequires: krb5-devel BuildRequires: openldap-devel BuildRequires: db4-devel BuildRequires: alsa-lib-devel BuildRequires: pkgconfig BuildRequires: glibc-kernheaders BuildRequires: libutempter-devel BuildRequires: findutils BuildRequires: jasper-devel BuildRequires: OpenEXR-devel BuildRequires: automake libtool %if "%{name}" != "kdelibs" && "%{?apidocs}" != "1" Obsoletes: kdelibs-apidocs < 6:%{version}-%{release} %endif %if 0%{?include_crystalsvg} Provides: crystalsvg-icon-theme = 1:%{version}-%{release} Obsoletes: crystalsvg-icon-theme < 1:%{version}-%{release} %else # for bootstrapping kde3, omit Requires: crystalsvg... -- Rex Requires: crystalsvg-icon-theme %endif %description Libraries for the K Desktop Environment 3: KDE Libraries included: kdecore (KDE core library), kdeui (user interface), kfm (file manager), khtmlw (HTML widget), kio (Input/Output, networking), kspell (spelling checker), jscript (javascript), kab (addressbook), kimgio (image manipulation). %package devel Group: Development/Libraries Summary: Header files and documentation for compiling KDE 3 applications. Obsoletes: kdelibs-devel < 6:%{version}-%{release} Provides: kdelibs-devel = 6:%{version}-%{release} Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{qt3}-devel Requires: openssl-devel Requires: arts-devel %{?libkdnssd:Requires: libkdnssd-devel} %description devel This package includes the header files you will need to compile applications for KDE 3. %package apidocs Group: Development/Documentation Summary: KDE 3 API documentation. Requires: %{name} = %{?epoch:%{epoch}:}%{version} Obsoletes: kdelibs-apidocs < 6:%{version}-%{release} Provides: kdelibs-apidocs = 6:%{version}-%{release} BuildArch: noarch %description apidocs This package includes the KDE 3 API documentation in HTML format for easy browsing %prep %setup -q -n kdelibs-%{version} %patch1 -p1 -b .xdg-menu %patch2 -p1 -b .debug %patch4 -p1 -b .ksyscoca %patch5 -p1 -b .openssl %patch15 -p1 -b .buildroot %patch32 -p1 -b .cups %patch33 -p1 -b .ppc %patch34 -p1 -b .qtdoc %patch35 -p1 -b .inttype %patch37 -p1 -b .kdebug-kmail-quiet %patch38 -p1 -b .cupsdconf2-group %patch39 -p1 -b .kabc-make %patch40 -p1 -b .kdeprint-utf8 %patch41 -p1 -b .utempter %patch43 -p1 -b .lang %patch45 -p1 -b .xdg-autostart %patch46 -p1 -b .kate-vhdl %patch48 -p1 -b .kspell %patch49 -p1 -b .kspell2 %patch50 -p1 -b .no-ispell %patch51 -p1 -b .cupsserverbin %patch52 -p1 -b .KDE3 %patch53 -p1 -b .drkonqi-kde4 %patch54 -p1 -b .flock-redefinition %patch55 -p1 -b .latex-syntax %patch100 -p1 -b .kstandarddirs %patch101 -p1 -b .libtool-shlibext %patch104 -p1 -b .gcc44 %patch105 -p1 -b .ossl-1.x # security fixes %patch200 -p1 -b .cve-2009-2537 %patch201 -p0 -b .cve-2009-1725 %patch202 -p1 -b .cve-2009-1687 %patch203 -p1 -b .cve-2009-1690 %patch204 -p1 -b .cve-2009-1698 %patch205 -p1 -b .cve-2009-2702 %patch206 -p0 -b .oCERT-2009-015-xmlhttprequest %patch207 -p1 -b .CVE-2009-3736 sed -i -e "s,^#define KDE_VERSION_STRING .*,#define KDE_VERSION_STRING \"%{version}-%{release} %{distname}\"," kdecore/kdeversion.h # hack/fix for newer automake sed -iautomake -e 's|automake\*1.10\*|automake\*1.1[0-5]\*|' admin/cvs.sh make -f admin/Makefile.common cvs %build unset QTDIR && . /etc/profile.d/qt.sh export QTDOC=%{qt3_docdir} if [ -x /etc/profile.d/krb5.sh ]; then . /etc/profile.d/krb5.sh elif ! echo ${PATH} | grep -q /usr/kerberos/bin ; then export PATH=/usr/kerberos/bin:${PATH} fi %if "%{name}" != "kdelibs" export DO_NOT_COMPILE="libkscreensaver" %endif %configure \ --includedir=%{_includedir}/kde \ --disable-rpath \ --enable-new-ldflags \ --disable-dependency-tracking \ %{!?debug: --disable-debug --disable-warnings --enable-final} \ %{?debug:--enable-debug --enable-warnings --disable-final} \ --disable-fast-malloc \ %if "%{_lib}" == "lib64" --enable-libsuffix="64" \ %endif --enable-cups \ --enable-mitshm \ --enable-pie \ --enable-sendfile \ --with-distribution="$(cat /etc/redhat-release 2>/dev/null)" \ --with-alsa \ --without-aspell \ --without-hspell \ --disable-libfam \ --enable-dnotify \ --enable-inotify \ --with-utempter \ %{?_with_rgbfile} \ --with-jasper \ --with-openexr \ --with-xinerama %if 0%{?apidocs} doxygen -s -u admin/Doxyfile.global make %{?_smp_mflags} apidox %endif make %{?_smp_mflags} %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install # create/own, see http://bugzilla.redhat.com/483318 mkdir -p %{buildroot}%{_libdir}/kconf_update_bin chmod a+x %{buildroot}%{_libdir}/* install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/services/devices.protocol %if 0%{?apidocs} pushd %{buildroot}%{_docdir} ln -sf HTML/en/kdelibs-apidocs %{name}-devel-%{kde_major_version} popd %endif # Make symlinks relative pushd %{buildroot}%{_docdir}/HTML/en for i in *; do if [ -d $i -a -L $i/common ]; then rm -f $i/common ln -sf ../common $i fi done popd %if 0%{?fedora} < 12 && 0%{?rhel} < 6 install -p -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/kde.sh install -p -m 644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/kde.csh %endif # Use hicolor-icon-theme rpm/pkg instead (#178319) rm -rf $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/ # ghost'd files touch $RPM_BUILD_ROOT%{_datadir}/services/ksycoca # remove references to extraneous/optional libraries in .la files (#170602) # fam, libart_lgpl, pcre, libidn, libpng, libjpeg, libdns_sd, libacl/libattr, alsa-lib/asound find $RPM_BUILD_ROOT%{_libdir} -name "*.la" | xargs \ sed -i \ -e "s@-lfam@@g" \ -e "s@%{_libdir}/libfam.la@@g" \ -e "s@-lart_lgpl_2@@g" \ -e "s@%{_libdir}/libpcreposix.la@@g" \ -e "s@-lpcreposix@@g" \ -e "s@-lpcre@@g" \ -e "s@-lidn@@g" \ -e "s@%{_libdir}/libidn.la@@g" \ -e "s@-lpng@@g" \ -e "s@-ljpeg@@g" \ -e "s@%{_libdir}/libjpeg.la@@g" \ -e "s@-ldns_sd@@g" \ -e "s@-lacl@@g" \ -e "s@%{_libdir}/libacl.la@@g" \ -e "s@/%{_lib}/libacl.la@@g" \ -e "s@-lattr@@g" \ -e "s@%{_libdir}/libattr.la@@g" \ -e "s@/%{_lib}/libattr.la@@g" \ -e "s@-lasound@@g" \ -e "s@-lutempter@@g" # libkdnssd bits rm -f %{buildroot}%{_libdir}/libkdnssd.la %{?libkdnssd:rm -rf %{buildroot}{%{_libdir}/libkdnssd.*,%{_includedir}/kde/dnssd}} # remove conflicts with kdelibs-4 rm -f %{buildroot}%{_bindir}/checkXML rm -f %{buildroot}%{_bindir}/ksvgtopng rm -f %{buildroot}%{_bindir}/kunittestmodrunner rm -f %{buildroot}%{_datadir}/config/kdebug.areas rm -f %{buildroot}%{_datadir}/config/kdebugrc rm -f %{buildroot}%{_datadir}/config/ui/ui_standards.rc rm -f %{buildroot}%{_docdir}/HTML/en/common/1.png rm -f %{buildroot}%{_docdir}/HTML/en/common/10.png rm -f %{buildroot}%{_docdir}/HTML/en/common/2.png rm -f %{buildroot}%{_docdir}/HTML/en/common/3.png rm -f %{buildroot}%{_docdir}/HTML/en/common/4.png rm -f %{buildroot}%{_docdir}/HTML/en/common/5.png rm -f %{buildroot}%{_docdir}/HTML/en/common/6.png rm -f %{buildroot}%{_docdir}/HTML/en/common/7.png rm -f %{buildroot}%{_docdir}/HTML/en/common/8.png rm -f %{buildroot}%{_docdir}/HTML/en/common/9.png rm -f %{buildroot}%{_docdir}/HTML/en/common/artistic-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/bottom-left.png rm -f %{buildroot}%{_docdir}/HTML/en/common/bottom-middle.png rm -f %{buildroot}%{_docdir}/HTML/en/common/bottom-right.png rm -f %{buildroot}%{_docdir}/HTML/en/common/bsd-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/doxygen.css rm -f %{buildroot}%{_docdir}/HTML/en/common/favicon.ico rm -f %{buildroot}%{_docdir}/HTML/en/common/fdl-license rm -f %{buildroot}%{_docdir}/HTML/en/common/fdl-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/fdl-notice.html rm -f %{buildroot}%{_docdir}/HTML/en/common/footer.html rm -f %{buildroot}%{_docdir}/HTML/en/common/gpl-license rm -f %{buildroot}%{_docdir}/HTML/en/common/gpl-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/header.html rm -f %{buildroot}%{_docdir}/HTML/en/common/kde-default.css rm -f %{buildroot}%{_docdir}/HTML/en/common/kde_logo_bg.png rm -f %{buildroot}%{_docdir}/HTML/en/common/lgpl-license rm -f %{buildroot}%{_docdir}/HTML/en/common/lgpl-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/mainfooter.html rm -f %{buildroot}%{_docdir}/HTML/en/common/mainheader.html rm -f %{buildroot}%{_docdir}/HTML/en/common/qpl-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/top-left.png rm -f %{buildroot}%{_docdir}/HTML/en/common/top-middle.png rm -f %{buildroot}%{_docdir}/HTML/en/common/top-right-konqueror.png rm -f %{buildroot}%{_docdir}/HTML/en/common/top-right.jpg rm -f %{buildroot}%{_docdir}/HTML/en/common/x11-license.html rm -f %{buildroot}%{_docdir}/HTML/en/common/xml.dcl rm -rf %{buildroot}%{_datadir}/locale/all_languages rm -rf %{buildroot}%{_sysconfdir}/xdg/menus/ rm -rf %{buildroot}%{_datadir}/autostart/ rm -f %{buildroot}%{_datadir}/config/colors/40.colors rm -f %{buildroot}%{_datadir}/config/colors/Rainbow.colors rm -f %{buildroot}%{_datadir}/config/colors/Royal.colors rm -f %{buildroot}%{_datadir}/config/colors/Web.colors rm -f %{buildroot}%{_datadir}/config/ksslcalist rm -f %{buildroot}%{_bindir}/preparetips # don't show kresources sed -i -e "s,^OnlyShowIn=KDE;,OnlyShowIn=KDE3;," %{buildroot}%{_datadir}/applications/kde/kresources.desktop %if 0%{?include_crystalsvg} == 0 # remove all crystalsvg icons for now rm -rf %{buildroot}%{_datadir}/icons/crystalsvg/ %endif %check ERROR=0 %if 0%{?apidocs} if [ ! -f %{buildroot}%{_docdir}/HTML/en/kdelibs-apidocs/index.html ]; then echo "ERROR: %{_docdir}/HTML/en/kdelibs-apidocs/index.html not generated" ERROR=1 fi %endif exit $ERROR %clean rm -rf %{buildroot} %post /sbin/ldconfig %if 0%{?include_crystalsvg} touch --no-create %{_datadir}/icons/crystalsvg 2> /dev/null || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg 2> /dev/null || : %endif %{_bindir}/update-desktop-database > /dev/null 2>&1 || : %postun /sbin/ldconfig %if 0%{?include_crystalsvg} touch --no-create %{_datadir}/icons/crystalsvg 2> /dev/null || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg 2> /dev/null || : %endif %{_bindir}/update-desktop-database > /dev/null 2>&1 || : %files %defattr(-,root,root,-) %doc README %doc COPYING.LIB %if 0%{?fedora} < 12 && 0%{?rhel} < 6 %config(noreplace) %{_sysconfdir}/profile.d/* %endif %{_bindir}/artsmessage %{_bindir}/cupsdconf %{_bindir}/cupsdoprint %{_bindir}/dcop %{_bindir}/dcopclient %{_bindir}/dcopfind %{_bindir}/dcopobject %{_bindir}/dcopquit %{_bindir}/dcopref %{_bindir}/dcopserver %{_bindir}/dcopserver_shutdown %{_bindir}/dcopstart %{_bindir}/filesharelist %{_bindir}/fileshareset %{_bindir}/imagetops %{_bindir}/kab2kabc %{_bindir}/kaddprinterwizard %{_bindir}/kbuildsycoca %{_bindir}/kcmshell %{_bindir}/kconf_update %{_bindir}/kcookiejar %{_bindir}/kde-config %{_bindir}/kde-menu %{_bindir}/kded %{_bindir}/kdeinit %{_bindir}/kdeinit_shutdown %{_bindir}/kdeinit_wrapper %{_bindir}/kdesu_stub %{_bindir}/kdontchangethehostname %{_bindir}/kdostartupconfig %{_bindir}/kfile %{_bindir}/kfmexec %{_bindir}/khotnewstuff %{_bindir}/kinstalltheme %{_bindir}/kio_http_cache_cleaner %{_bindir}/kio_uiserver %{_bindir}/kioexec %{_bindir}/kioslave %{_bindir}/klauncher %{_bindir}/kmailservice %attr(4755,root,root) %{_bindir}/kpac_dhcp_helper %{_bindir}/ksendbugmail %{_bindir}/kshell %{_bindir}/kstartupconfig %{_bindir}/ktelnetservice %{_bindir}/ktradertest %{_bindir}/kwrapper %{_bindir}/lnusertemp %{_bindir}/make_driver_db_cups %{_bindir}/make_driver_db_lpr %{_bindir}/meinproc %{_bindir}/start_kdeinit %{_bindir}/start_kdeinit_wrapper %attr(4755,root,root) %{_bindir}/kgrantpty %{_libdir}/lib*.so.* %{_libdir}/libkdeinit_*.so %{_libdir}/lib*.la %{_libdir}/kconf_update_bin/ %{_libdir}/kde3/ %{_datadir}/applications/kde/*.desktop %{_datadir}/apps/* %exclude %{_datadir}/apps/ksgmltools2/ %config(noreplace) %{_datadir}/config/* %{_datadir}/emoticons/* %{_datadir}/icons/default.kde %{_datadir}/mimelnk/magic %{_datadir}/mimelnk/*/*.desktop %{_datadir}/services/* %{_datadir}/servicetypes/* %ghost %{_datadir}/services/ksycoca %{_docdir}/HTML/en/kspell %{_docdir}/HTML/en/common/* %if 0%{?include_crystalsvg} %{_datadir}/icons/crystalsvg/ %endif %files devel %defattr(-,root,root,-) %{_bindir}/dcopidl* %{_bindir}/kconfig_compiler %{_bindir}/makekdewidgets %{_datadir}/apps/ksgmltools2/ %{_includedir}/kde/ %{_libdir}/lib*.so %{_libdir}/lib*.a %exclude %{_libdir}/libkdeinit_*.so %if 0%{?apidocs} %files apidocs %defattr(-,root,root,-) %{_docdir}/%{name}-devel-%{kde_major_version} %{_docdir}/HTML/en/kdelibs* %endif %changelog * Mon Dec 07 2009 Than Ngo