File kdebase4-openSUSE.spec of Package kdebase4-openSUSE

#
# spec file for package kdebase4-openSUSE
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           kdebase4-openSUSE
BuildRequires:  hwinfo-devel libkde4-devel oxygen-icon-theme rpm-devel
License:        GPLv2+
Group:          System/GUI/KDE
Summary:        openSUSE KDE Extension
PreReq:         %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        11.4
Release:        33.<RELEASE3>
# git clone git://git.opensuse.org/projects/desktop/kdebase4-openSUSE.git
Source0:        kdebase4-openSUSE-%{version}.tar.bz2
Source2:        devel-splash.tar.bz2
Source4:        sysinfo_background.png
Requires:       kdebase4-workspace
Provides:       kdebase4-SuSE = 11.0
Obsoletes:      kdebase4-SuSE <= 11.0
Recommends:     kio_sysinfo = %version
Recommends:     %name-lang
%requires_ge    libqt4-x11

%description
This package contains the standard openSUSE desktop and extensions.

%package -n kio_sysinfo
License:        GPLv2+
Summary:        System Information KIO-Slave
Group:          System/GUI/KDE
Requires:       kio_sysinfo-branding = %{version}
Recommends:     %name-lang
%kde4_runtime_requires
Provides:       kdebase3-NLD:/opt/kde3/share/services/sysinfo.protocol
Provides:       kde4-kio_sysinfo = 11.3
Obsoletes:      kde4-kio_sysinfo <= 11.3

%description -n kio_sysinfo
This package contains a KDE KIO-Slave showing system information.

%package -n kdebase4-workspace-branding-openSUSE
License:        GPLv2+
Summary:        openSUSE KDE Extension
Group:          System/GUI/KDE
Requires:       kdebase4-workspace
Requires:       plasma-theme-aya
Supplements:    packageand(kdebase4-workspace:branding-openSUSE)
PreReq:         %fillup_prereq
Provides:       kdebase4-workspace-branding = %{version}
Conflicts:      otherproviders(kdebase4-workspace-branding)

%description -n kdebase4-workspace-branding-openSUSE
This package contains the standard openSUSE desktop and extensions.

%package -n kdebase4-runtime-branding-openSUSE
License:        GPLv2+
Summary:        The KDE Runtime Components
Group:          System/GUI/KDE
Requires:       kdebase4-runtime
Supplements:    packageand(kdebase4-runtime:branding-openSUSE)
PreReq:         %fillup_prereq
Provides:       kdebase4-runtime-branding = %{version}
Conflicts:      otherproviders(kdebase4-runtime-branding)

%description -n kdebase4-runtime-branding-openSUSE
This package contains all run-time dependencies of KDE applications.

%package -n kio_sysinfo-branding-openSUSE
License:        GPLv2+
Summary:        System Information KIO-Slave
Group:          System/GUI/KDE
Requires:       kio_sysinfo
Supplements:    packageand(kio_sysinfo:branding-openSUSE)
Provides:       kio_sysinfo-branding = %{version}
Conflicts:      otherproviders(kio_sysinfo-branding)
Provides:       kde4-kio_sysinfo-branding-openSUSE = 11.3
Obsoletes:      kde4-kio_sysinfo-branding-openSUSE <= 11.3

%description -n kio_sysinfo-branding-openSUSE
This package contains a KDE KIO-Slave showing system information.

%package -n kdm-branding-openSUSE
License:        GPLv2+
Summary:        KDE login and display manager
Group:          System/GUI/KDE
Supplements:    packageand(kdm:branding-openSUSE)
PreReq:         %fillup_prereq
Provides:       kdm-branding = %{version}
Conflicts:      otherproviders(kdm-branding)
Provides:       kde4-kdm-branding-openSUSE = 11.3
Obsoletes:      kde4-kdm-branding-openSUSE <= 11.3

%description -n kdm-branding-openSUSE
This package contains kdm, the login and session manager for KDE.

%package -n kdelibs4-branding-openSUSE
License:        LGPLv2.1+
Summary:        KDE Base Libraries: Build Environment
Group:          System/GUI/KDE
Requires:       kdelibs4
Supplements:    packageand(kdelibs4:branding-openSUSE)
Provides:       kdelibs4-branding = %{version}
Conflicts:      otherproviders(kdelibs4-branding)

%description -n kdelibs4-branding-openSUSE
This package contains all necessary include files and libraries needed
to develop KDE applications.

%lang_package
%prep
%setup -q -n %name

%build
  %cmake_kde4 -d build -- -DSYSINFO_DISTRO:STRING=SUSE
  %make_jobs

%install
  cd build
  %makeinstall
  cd ..
  install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/usr/share/kde4/apps/sysinfo/about/images/background.png
  for l in SUSEgreeter krpmview kde4-openSUSE kio_sysinfo; do
    %find_lang $l suse.lang
  done
  cp -a config-files/* $RPM_BUILD_ROOT
  cp -a branding/root/* $RPM_BUILD_ROOT
  gzip $RPM_BUILD_ROOT/usr/share/kde4/apps/desktoptheme/openSUSEdefault/widgets/branding.svg
  mv $RPM_BUILD_ROOT/usr/share/kde4/apps/desktoptheme/openSUSEdefault/widgets/branding.svg.gz $RPM_BUILD_ROOT/usr/share/kde4/apps/desktoptheme/openSUSEdefault/widgets/branding.svgz
  cp $RPM_BUILD_ROOT/usr/share/wallpapers/openSUSEdefault/contents/images/1920x1200.jpg $RPM_BUILD_ROOT/usr/share/kde4/apps/kdm/themes/SUSE/background-1920x1200.jpg
  cp $RPM_BUILD_ROOT/usr/share/wallpapers/openSUSEdefault/contents/images/1600x1200.jpg $RPM_BUILD_ROOT/usr/share/kde4/apps/kdm/themes/SUSE/background-1600x1200.jpg
  mkdir -p $RPM_BUILD_ROOT/usr/share/kde4/apps/ksplash/Themes/ksplashx-suse/1920x1200
  ln -s /usr/share/wallpapers/openSUSEdefault/contents/images/1920x1200.jpg $RPM_BUILD_ROOT/usr/share/kde4/apps/ksplash/Themes/ksplashx-suse/1920x1200/background.jpg
  ln -s /usr/share/wallpapers/openSUSEdefault/contents/images/1600x1200.jpg $RPM_BUILD_ROOT/usr/share/kde4/apps/ksplash/Themes/ksplashx-suse/1600x1200/background.jpg
  chmod og-w -R "${RPM_BUILD_ROOT}"
  %suse_update_desktop_file -u SUSEgreeter System Documentation
  %kde_post_install

%post -n kdebase4-workspace-branding-openSUSE
%{fillup_only -n windowmanager -s kde4}

%post -n kdm-branding-openSUSE
%{fillup_only -n displaymanager -s kdm}

%post -n kio_sysinfo
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%postun -n kio_sysinfo
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%files lang -f suse.lang
%defattr(-,root,root)

%files
%defattr(-,root,root)
%dir /usr/share/autostart
/usr/share/icons/hicolor/*/apps/Support.*
%dir /usr/share/kde4/env
/usr/bin/kde4-migrate
/usr/bin/kde_add_yast_source.sh
/usr/%_lib/kde4/libkrpmview.so
/usr/share/applications/kde4/konqfilemgr_rpm.desktop
/usr/share/kde4/apps/krpmview
/usr/share/kde4/services/krpmview.desktop
/usr/share/kde4/services/searchproviders
/usr/bin/preloadkde
/usr/share/kde4/config/SuSE/default/beagled-autostart.desktop.live
/usr/share/kde4/config/SuSE/default/lowspacesuse.live
/usr/share/kde4/config/SuSE/default/kupdateapplet-autostart.desktop.live

%files -n kdebase4-runtime-branding-openSUSE
%defattr(-,root,root)
%doc branding/COPYING
/usr/share/kde4/apps/desktoptheme/openSUSEdefault

%files -n kdebase4-workspace-branding-openSUSE
%defattr(-,root,root)
%doc branding/COPYING
/usr/bin/SUSEgreeter
/usr/share/applications/kde4/SUSEgreeter.desktop
/usr/share/autostart/SUSEgreeter.desktop
/usr/share/kde4/apps/SUSEgreeter
%dir /etc/kde4
%dir /etc/kde4/share
%dir /etc/kde4/share/config
%config /etc/kde4/share/config/*rc
%config /etc/kde4/share/config/kdeglobals
/usr/share/icons/hicolor/*/apps/SUSEgreeter.*
/usr/share/icons/hicolor/*/apps/mycomp.*
%dir /usr/share/kde4/config
%dir /usr/share/kde4/config/SuSE
%dir /usr/share/kde4/config/SuSE/default
/usr/share/kde4/env/startkde.proxy.sh
/usr/share/kde4/env/startkde.suse.sh
/usr/share/kde4/config/SuSE/default/MozillaFirefox.desktop
/usr/share/kde4/config/SuSE/default/Office.desktop
/usr/share/kde4/config/SuSE/default/SuSE.desktop
/usr/share/kde4/config/SuSE/default/Support.desktop
/usr/share/kde4/config/SuSE/default/live-installer.desktop
/usr/share/kde4/config/SuSE/default/myComputer.desktop
/var/adm/fillup-templates/sysconfig.windowmanager-kde4
%dir /usr/share/icons/oxygen/scalable/places
/usr/share/icons/oxygen/*/places/start-here-branding.*
%dir /usr/share/kde4/apps/kwin
/usr/share/kde4/apps/kwin/cubecap.png
/usr/share/kde4/apps/kwin/titlebar_decor.png
%dir /usr/share/kde4/apps/desktoptheme
%dir /usr/share/kde4/apps/desktoptheme/openSUSEdefault
%dir /usr/share/kde4/apps/desktoptheme/openSUSEdefault/widgets
%dir /usr/share/kde4/apps/ksplash
/usr/share/kde4/apps/konsole
%dir /usr/share/kde4/apps/ksplash/Themes
/usr/share/kde4/apps/ksplash/Themes/ksplashx-suse
%dir /etc/kde4/share/apps
%dir /etc/kde4/share/apps/konqueror
%dir /etc/kde4/share/apps/konqueror/profiles
/etc/kde4/share/apps/konqueror/profiles/webbrowsing
/usr/share/kde4/config/SuSE/default/bookmarks.xml
/usr/share/kde4/config/SuSE/default/documents.directory
/usr/share/kde4/config/SuSE/default/kcmnspluginrc.live
/usr/share/kde4/config/SuSE/default/feeds.opml
/usr/share/kde4/config/SuSE/default/kdedrc.live
/usr/share/kde4/config/SuSE/default/clock-no-events.js.live
/usr/share/kde4/config/SuSE/default/krunnerrc.live
/usr/share/kde4/config/SuSE/default/kwallet.kwl.live
/usr/share/kde4/config/SuSE/default/kwalletrc.live
/usr/share/kde4/config/SuSE/default/mysql-local.conf.live
/usr/share/kde4/config/SuSE/default/nepomukserverrc.live
%dir /usr/share/kde4/apps/plasma/updates
/usr/share/kde4/apps/plasma/updates/opensuse-update-firefox-icon-url.js
/usr/share/opensuse-kiwi
/usr/share/wallpapers/

%files -n kio_sysinfo
%defattr(-,root,root)
#/opt/kde3/%_lib/kde3/libksysinfopart.*
%dir /usr/share/kde4/apps/sysinfo
#/usr/share/kde4/services/ksysinfopart.desktop
/usr/share/kde4/services/sysinfo.protocol
%_libdir/kde4/kio_sysinfo.so
%_libdir/kde4/libksysinfopart.so
%_kde_share_dir/services/ksysinfopart.desktop
/usr/share/mime/packages/x-sysinfo.xml
/usr/share/applications/kde4/kfmclient_sysinfo.desktop

%files -n kio_sysinfo-branding-openSUSE
%defattr(-,root,root)
%doc branding/COPYING
/usr/share/kde4/apps/sysinfo/about

%files -n kdm-branding-openSUSE
%defattr(-,root,root)
%doc branding/COPYING
%dir /usr/share/kde4/apps/kdm
%dir /usr/share/kde4/apps/kdm/themes
/usr/share/kde4/apps/kdm/themes/SUSE
/usr/share/kde4/apps/kdm/pics
/var/adm/fillup-templates/sysconfig.displaymanager-kdm

%files -n kdelibs4-branding-openSUSE
%defattr(-,root,root)
%doc branding/COPYING
%_kde4_appsdir/kdeui/about/body-background.jpg

%changelog
openSUSE Build Service is sponsored by