File kdesdk4-scripts.spec of Package kdesdk4-scripts

#
# spec file for package kdesdk4-scripts
#
# Copyright (c) 2015 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/
#


%define rname kde-dev-scripts

Name:           kdesdk4-scripts
Version:	    17.04.2
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        Scripts for KDE Development
License:        GPL-2.0 and GFDL-1.2
Group:          System/GUI/KDE
Url: http://www.kde.org
Source0:        %{rname}-%{version}.tar.xz
Patch0:         kde-dev-scripts-4.14.3-fix-bashisms.patch
BuildRequires:  libkde4-devel
Obsoletes:      kdesdk4-scripts < %{version}
Provides:       kdesdk4-scripts = %{version}
Obsoletes:      kde-dev-scripts < %{version}
Provides:       kde-dev-scripts = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{kde4_runtime_requires}

%description
This package contains the scripts for KDE development which are
contained in the kdesdk module.


%package kf5-porting
Summary:        The special scripts for porting to KF5
Group:          System/GUI/KDE

%description kf5-porting
This package contains the scripts to make the porting to KF5 easier.

%prep
%setup -q -n %{rname}-%{version}
%patch0 -p1

%build
%ifarch ppc64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mminimal-toc"
%endif
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
  %cmake_kde4 -d build -- -DCMAKE_CXXFLAGS="$RPM_OPT_FLAGS" -DCMAKE_CFLAGS="$RPM_OPT_FLAGS"
 %make_jobs

%install
  %kde4_makeinstall -C build
  %kde_post_install
  # Copy the KF5 porting scripts
  mkdir -p %{buildroot}%{_datadir}/kf5-port-scripts
  cp kf5/* %{buildroot}%{_datadir}/kf5-port-scripts/

%clean
  rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%{_kde4_bindir}/*
%{_mandir}/man1/*.gz
%{_kde4_appsdir}/uncrustify/

%files kf5-porting
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%{_datadir}/kf5-port-scripts/

%changelog