File kdevplatform4.spec of Package kdevplatform4

#
# spec file for package kdevplatform4
#
# Copyright (c) 2016 SUSE LINUX 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/
#


Name:           kdevplatform4
Version:        1.7.3
Release:        0
%define rname kdevplatform
%define kdevelop_version 4.7.3
%define libkdev_major 8
Summary:        Base Package for Integrated Development Environments
License:        GPL-2.0+
Group:          Development/Tools/IDE
Url:            http://www.kdevelop.org
Source0:        http://download.kde.org/stable/kdevelop/%{kdevelop_version}/src/%{rname}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM fix-for-null-pointer-dereference-with-gcc6.patch kde#360707
Patch1:         fix-for-null-pointer-dereference-with-gcc6.patch
BuildRequires:  boost-devel
BuildRequires:  db-devel
BuildRequires:  fdupes
BuildRequires:  grantlee-devel
BuildRequires:  libkde4-devel >= 4.7
BuildRequires:  libqjson-devel
BuildRequires:  subversion-devel
BuildRequires:  xz
#BuildRequires:  kompare - currently disabled upstream, see toplevel CMakeLists.txt
Requires:       %{name}-lang = %{version}
Requires:       libkdevplatform%{libkdev_major} = %{version}
BuildRoot:      %{_tmppath}/%{rname}-%{version}-build
%kde4_runtime_requires

%description
This package contains the common plugins for integrated developments
environment based on the KDevelop framework.

%lang_package
%prep
%setup -q -n %{rname}-%{version}
%if 0%{?suse_version} > 1320
%patch1 -p1
%endif
echo "find_package(Msgfmt REQUIRED)" >> CMakeLists.txt
echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt
%if 0%{?suse_version} <= 1320 && !0%{?is_opensuse}
# fix build with older cmake versions (i.e. on 13.2 and below) by
# readding "cmake_policy(SET CMP0002 OLD)" to po/CMakeLists.txt
# (was in there before but has been removed in 1.7.3)
sed -i -e "1s/^/cmake_policy(SET CMP0002 OLD)\n/" po/CMakeLists.txt
%endif

%build
  %cmake_kde4 -d build
  %make_jobs

%install
  cd build
  %make_install
  %kde_post_install
  %fdupes %{buildroot}%{_datadir}/locale
  cd ..
  %find_lang kdevappwizard %{rname}.lang
  %find_lang kdevclassbrowser %{rname}.lang
  %find_lang kdevcodeutils %{rname}.lang
  %find_lang kdevcontextbrowser %{rname}.lang
  %find_lang kdevcvs %{rname}.lang
  %find_lang kdevdocumentswitcher %{rname}.lang
  %find_lang kdevdocumentview %{rname}.lang
  %find_lang kdevexecute %{rname}.lang
  %find_lang kdevexecutescript %{rname}.lang
  %find_lang kdevexternalscript %{rname}.lang
  %find_lang kdevfilemanager %{rname}.lang
  %find_lang kdevfiletemplates %{rname}.lang
  %find_lang kdevgenericprojectmanager %{rname}.lang
  %find_lang kdevgit %{rname}.lang
  %find_lang kdevgrepview %{rname}.lang
  %find_lang kdevkonsole %{rname}.lang
  %find_lang kdevopenwith %{rname}.lang
  %find_lang kdevpastebin %{rname}.lang
  %find_lang kdevpatchreview %{rname}.lang
  %find_lang kdevplatform %{rname}.lang
  %find_lang kdevproblemreporter %{rname}.lang
  %find_lang kdevprojectdashboard %{rname}.lang
  %find_lang kdevprojectfilter %{rname}.lang
  %find_lang kdevprojectmanagerview %{rname}.lang
  %find_lang kdevquickopen %{rname}.lang
  %find_lang kdevreviewboard %{rname}.lang
  %find_lang kdevsnippet %{rname}.lang
  %find_lang kdevstandardoutputview %{rname}.lang
  %find_lang kdevsubversion %{rname}.lang
  %find_lang kdevswitchtobuddy %{rname}.lang
  %find_lang kdevtemplates_config %{rname}.lang
  %find_lang kdevtestview %{rname}.lang
  %find_lang kdevvcsprojectintegration %{rname}.lang

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files lang -f %{rname}.lang

%package -n libkdevplatform4-devel
Summary:        Base Package for Integrated Development Environments: Build Environment
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       libkdevplatform%{libkdev_major} = %{version}

%description -n libkdevplatform4-devel
This package contains the development files for building integrated
developments environments based on the KDevelop framework.

%files -n libkdevplatform4-devel
%defattr(-,root,root)
%{_kde4_includedir}/kdevplatform
%{_kde4_libdir}/libkdevplatformdebugger.so
%{_kde4_libdir}/libkdevplatformdocumentation.so
%{_kde4_libdir}/libkdevplatformjsontests.so
%{_kde4_libdir}/libkdevplatforminterfaces.so
%{_kde4_libdir}/libkdevplatformlanguage.so
%{_kde4_libdir}/libkdevplatformoutputview.so
%{_kde4_libdir}/libkdevplatformproject.so
%{_kde4_libdir}/libkdevplatformshell.so
%{_kde4_libdir}/libkdevplatformtests.so
%{_kde4_libdir}/libkdevplatformutil.so
%{_kde4_libdir}/libkdevplatformvcs.so
%{_kde4_libdir}/libsublime.so
%{_kde4_libdir}/cmake

%package -n libkdevplatform%{libkdev_major}
Summary:        Libraries for Integrated Development Environments
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Obsoletes:      libkdevplatform0

%description -n libkdevplatform%{libkdev_major}
This package contains the libraries for integrated development
environments based on the KDevelop framework.

%post -n libkdevplatform%{libkdev_major} -p /sbin/ldconfig

%postun -n libkdevplatform%{libkdev_major} -p /sbin/ldconfig

%files -n libkdevplatform%{libkdev_major}
%defattr(-,root,root)
%{_kde4_libdir}/libkdevplatformdebugger.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformdocumentation.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformjsontests.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatforminterfaces.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformlanguage.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformoutputview.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformproject.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformshell.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformtests.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformutil.so.%{libkdev_major}*
%{_kde4_libdir}/libkdevplatformvcs.so.%{libkdev_major}*
%{_kde4_libdir}/libsublime.so.%{libkdev_major}*

%files
%defattr(-,root,root)
%doc COPYING* README
%dir %{_kde4_appsdir}/kdevsession
%dir %{_kde4_modulesdir}/plugins/grantlee/
%dir %{_kde4_modulesdir}/plugins/grantlee/0.?/
%{_kde4_appsdir}/kdevappwizard/
%{_kde4_appsdir}/kdevclassbrowser/
%{_kde4_appsdir}/kdevcodegen/
%{_kde4_appsdir}/kdevcodeutils/
%{_kde4_appsdir}/kdevcontextbrowser/
%{_kde4_appsdir}/kdevcvs/
%{_kde4_appsdir}/kdevdebugger/
%{_kde4_appsdir}/kdevdocumentswitcher/
%{_kde4_appsdir}/kdevdocumentview/
%{_kde4_appsdir}/kdevexternalscript/
%{_kde4_appsdir}/kdevelop/
%{_kde4_appsdir}/kdevfilemanager/
%{_kde4_appsdir}/kdevfiletemplates/
%{_kde4_appsdir}/kdevgrepview/
%{_kde4_appsdir}/kdevpatchreview/
%{_kde4_appsdir}/kdevproblemreporter/
%{_kde4_appsdir}/kdevprojectmanagerview/
%{_kde4_appsdir}/kdevquickopen/
%{_kde4_appsdir}/kdevsession/
%{_kde4_appsdir}/kdevsnippet/
%{_kde4_appsdir}/kdevsourceformatter/
%{_kde4_appsdir}/kdevstandardoutputview/
%{_kde4_appsdir}/kdevtestview/
%{_kde4_appsdir}/plasma/
%{_kde4_configdir}/kdevappwizard.knsrc
%{_kde4_configdir}/kdevfiletemplates.knsrc
%{_kde4_iconsdir}/hicolor/*/*/*.png
%{_kde4_modulesdir}/plugins/grantlee/*/kdev_filters.so
%{_kde4_modulesdir}/*kdev*.so
%{_kde4_modulesdir}/imports/
%{_kde4_servicesdir}/kcm_kdev*.desktop
%{_kde4_servicesdir}/kdev*.desktop
%{_kde4_servicetypesdir}/kdevelopplugin.desktop
# should be in libexec?
%{_kde4_bindir}/kdev_dbus_socket_transformer
%{_kde4_bindir}/kdev_format_source
%{_kde4_bindir}/kdevplatform_shell_environment.sh

%changelog