kgraphviewer/kgraphviewer.spec

122 lines
3.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package kgraphviewer
#
# Copyright (c) 2014 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/
#
# Spec file for kgraphviewer
%define soname 2
Name: kgraphviewer
Version: 2.1.40git.1403573518
Release: 0
Summary: Graphviz dot graph file viewer for KDE
License: GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and GPL-3.0
Group: Development/Tools/Other
Url: https://projects.kde.org/projects/extragear/graphics/kgraphviewer
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-lang.tar.bz2
Patch0: test_old_graphviz.diff
BuildRequires: boost-devel
BuildRequires: graphviz-devel
BuildRequires: libkde4-devel
BuildRequires: zlib-devel
Requires: graphviz
Requires: libkgraphviewer%{soname} = %{version}
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{kde4_runtime_requires}
%description
KGraphViewer is a Graphviz dot graph file viewer for KDE
%package -n libkgraphviewer%{soname}
Summary: Graphviz dot graph file viewer for KDE
Group: Development/Tools/Other
Suggests: kgraphviewer = %{version}
%description -n libkgraphviewer%{soname}
KGraphViewer is a Graphviz dot graph file viewer for KDE
%package -n kgraphviewer-devel
Summary: Graphviz dot graph file viewer for KDE
Group: Development/Tools/Other
Requires: kgraphviewer = %{version}
Requires: libkgraphviewer%{soname} = %{version}
%description -n kgraphviewer-devel
KGraphViewer is a Graphviz dot graph file viewer for KDE
%lang_package
%prep
%setup -q -a 1
%if 0%{?suse_version} < 1320
#patch -p1 < old_graphviz.diff
%patch0 -p1
%endif
cat >> CMakeLists.txt << EOF
add_subdirectory( po )
EOF
%build
# The patch for older graphviz version is provided in the repo
%if 0%{?suse_version} < 1320
#patch -p1 < old_graphviz.diff
%endif
%cmake_kde4 -d build
%make_jobs
%install
%kde4_makeinstall -C build
%kde_post_install
%find_lang kgraphviewer %{name}.lang
%post -n libkgraphviewer%{soname} -p /sbin/ldconfig
%postun -n libkgraphviewer%{soname} -p /sbin/ldconfig
%files -n kgraphviewer-devel
%defattr(-,root,root)
%{_kde4_includedir}/*
%{_kde4_libdir}/libkgraphviewer.so
%files -n libkgraphviewer%{soname}
%defattr(-,root,root)
%{_kde4_libdir}/libkgraphviewer.so.*
%files lang -f %{name}.lang
%defattr(-,root,root)
%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.DOC
%dir %{_kde4_datadir}/appdata
%{_kde4_applicationsdir}/kgrapheditor.desktop
%{_kde4_applicationsdir}/kgraphviewer.desktop
%{_kde4_appsdir}/kgrapheditor
%{_kde4_appsdir}/kgraphviewer
%{_kde4_appsdir}/kgraphviewerpart
%{_kde4_bindir}/*
%{_kde4_configkcfgdir}/kgrapheditorsettings.kcfg
%{_kde4_configkcfgdir}/kgraphviewer_partsettings.kcfg
%{_kde4_configkcfgdir}/kgraphviewersettings.kcfg
%{_kde4_datadir}/appdata/kgraphviewer*
%{_kde4_iconsdir}/*
%{_kde4_modulesdir}/kgraphviewerpart.so
%{_kde4_servicesdir}/kgraphviewer_part.desktop
%changelog