SHA256
1
0
forked from pool/marble
marble/marble.spec

333 lines
9.0 KiB
RPMSpec

#
# spec file for package marble
#
# 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 _so -22
%define withqt5 0
Name: marble
Version: 15.08.0
Release: 0
Summary: Generic map viewer
License: LGPL-2.1+
Group: Amusements/Teaching/Other
Url: http://edu.kde.org
# PATCH-FIX-UPSTREAM marble_fix_ppc64_build.patch -- Don't expect LIB_SUFFIX to be set
Patch0: marble_fix_ppc64_build.patch
Source0: %{name}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: gpsd-devel
BuildRequires: perl
%if 0%{?withqt5}
BuildRequires: kconfig-devel
BuildRequires: pkgconfig(Qt5Core) >= 5.2.0
BuildRequires: pkgconfig(Qt5Xml) >= 5.2.0
BuildRequires: pkgconfig(Qt5Network) >= 5.2.0
BuildRequires: pkgconfig(Qt5Test) >= 5.2.0
BuildRequires: pkgconfig(Qt5Script) >= 5.2.0
BuildRequires: pkgconfig(Qt5Widgets) >= 5.2.0
BuildRequires: pkgconfig(Qt5WebKitWidgets) >= 5.2.0
BuildRequires: pkgconfig(Qt5Svg) >= 5.2.0
BuildRequires: pkgconfig(Qt5Sql) >= 5.2.0
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0
BuildRequires: pkgconfig(Qt5PrintSupport) >= 5.2.0
BuildRequires: pkgconfig(Qt5Quick) >= 5.2.0
BuildRequires: pkgconfig(Qt5OpenGL) >= 5.2.0
BuildRequires: pkgconfig(Qt5DBus) >= 5.2.0
BuildRequires: pkgconfig(Qt5SerialPort) >= 5.2.0
BuildRequires: pkgconfig(Qt5Designer) >= 5.2.0
BuildRequires: kf5-filesystem
BuildRequires: extra-cmake-modules
BuildRequires: kwallet-devel
BuildRequires: knewstuff-devel
BuildRequires: kparts-devel
BuildRequires: kcoreaddons-devel
BuildRequires: kdoctools-devel
BuildRequires: ki18n-devel
BuildRequires: phonon4qt5-devel
BuildRequires: kservice-devel
BuildRequires: krunner-devel
BuildRequires: libquazip-qt5-devel
Requires: libmarblewidget-qt5%{_so} = %{version}
%else
BuildRequires: libkde4-devel
BuildRequires: quazip-devel
Requires: libmarblewidget-qt4%{_so} = %{version}
%endif
Requires: %{name}-data = %{version}
Requires: libastro1 = %{version}
Requires: marble-frontend = %{version}
Recommends: %{name}-doc = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Marble is a viewer of map data.
%package qt
Summary: Qt Frontend for Marble
Group: Amusements/Teaching/Other
Requires: %{name} = %{version}
Provides: marble-frontend = %{version}
Conflicts: otherproviders(marble-frontend)
%description qt
The Qt frontend for the Marble map viewer
%package kde
Summary: The KDE optimized frontend for Marble
Group: Amusements/Teaching/Other
Requires: %{name} = %{version}
Provides: marble-frontend = %{version}
Conflicts: otherproviders(marble-frontend)
Supplements: packageand(marble:plasma5-desktop)
%description kde
The KDE frontend for the Marble map viewer
%package data
Summary: Generic map viewer: data
Group: Amusements/Teaching/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description data
Marble is a viewer of map data. This package contains its data.
%package devel
Summary: Generic map viewer: Build Environment
Group: Development/Libraries/KDE
Requires: libmarblewidget-qt5%{_so} = %{version}
%description devel
Development headers and libraries for Marble.
%package doc
Summary: Marble documentation
Group: Amusements/Teaching/Other
Requires: %{name} = %{version}
BuildArch: noarch
%description doc
Marble is a viewer of map data. This package contains its documentation.
%if 0%{?withqt5}
%package -n libmarblewidget-qt5%{_so}
%else
%package -n libmarblewidget%{_so}
%endif
Summary: Generic map viewer: Shared Library
Group: Development/Libraries/KDE
%if 0%{?withqt5}
%description -n libmarblewidget-qt5%{_so}
%else
%description -n libmarblewidget%{_so}
%endif
The shared library for the MarbleWidget shared library.
%package -n libastro1
Summary: Astronomy: Shared Library
Group: Development/Libraries/KDE
%description -n libastro1
The Astronomy shared library for the MarbleWidget shared library.
%prep
%setup -q
%patch0 -p1
%build
%ifarch ppc ppc64
export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
%if 0%{?withqt5}
export SUSE_ASNEEDED=0
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=%{_kf5_build_type} \
-DCMAKE_INSTALL_PREFIX=%{_kf5_prefix} \
-DCMAKE_PREFIX_PATH=%{_kf5_prefix} \
-DKDE_INSTALL_LIBDIR=%{_lib} \
-DKDE_INSTALL_SYSCONFDIR=%{_kf5_sysconfdir} \
-DKDE_INSTALL_QTPLUGINDIR=%{_lib}/qt5/plugins \
-DKDE_INSTALL_PLUGINDIR=%{_lib}/qt5/plugins \
-DKDE_INSTALL_QMLDIR=%{_lib}/qt5/qml \
-DKDE_INSTALL_QTQUICKIMPORTSDIR=%{_lib}/qt5/imports \
-DECM_MKSPECS_INSTALL_DIR=%{_kf5_mkspecsdir} \
-DBUILD_TESTING=OFF \
-DBUILD_MARBLE_TESTS=NO \
-DWITH_KF5=TRUE \
..
%else
%cmake_kde4 -d build -- -DQT5BUILD=OFF
%endif
%make_jobs
%install
%if 0%{?withqt5}
%kf5_makeinstall -C build
%fdupes -s %{buildroot}
rm -rf %{buildroot}%{_kf5_applicationsdir}/marble-mobile.desktop
rm -rf %{buildroot}%{_kf5_applicationsdir}/marble-touch.desktop
rm -rf %{buildroot}/designer
rm -rf %{buildroot}%{_kf5_bindir}/marble-mobile
rm -rf %{buildroot}%{_kf5_bindir}/marble-touch
%else
%kde4_makeinstall -C build
%kde_post_install
%fdupes -s %{buildroot}
rm -rf %{buildroot}%{_kde4_applicationsdir}/marble-mobile.desktop
rm -rf %{buildroot}%{_kde4_applicationsdir}/marble-touch.desktop
rm -rf %{buildroot}/designer
rm -rf %{buildroot}%{_bindir}/marble-mobile
rm -rf %{buildroot}%{_bindir}/marble-touch
%endif
%if 0%{?withqt5}
%post -n libmarblewidget-qt5%{_so} -p /sbin/ldconfig
%postun -n libmarblewidget-qt5%{_so} -p /sbin/ldconfig
%else
%post -n libmarblewidget%{_so} -p /sbin/ldconfig
%postun -n libmarblewidget%{_so} -p /sbin/ldconfig
%endif
%post -n libastro1 -p /sbin/ldconfig
%postun -n libastro1 -p /sbin/ldconfig
%if 0%{?withqt5}
%files
%defattr(-,root,root)
%doc CREDITS ChangeLog COPYING* LICENSE* MANIFESTO.txt
%dir %{_kf5_libdir}/plugins/
%exclude %{_kf5_sharedir}/marble/data
%exclude %{_kf5_sharedir}/marble/cmake
%{_kf5_applicationsdir}/marble_geo.desktop
%{_kf5_applicationsdir}/marble_gpx.desktop
%{_kf5_applicationsdir}/marble_kml.desktop
%{_kf5_applicationsdir}/marble_kmz.desktop
%{_kf5_applicationsdir}/marble_osm.desktop
%{_kf5_applicationsdir}/marble_worldwind.desktop
%{_kf5_configkcfgdir}/
%{_kf5_iconsdir}/hicolor/*/apps/marble.*
%{_kf5_kxmlguidir}/marble/
%{_kf5_libdir}/marble/
%{_kf5_libdir}/plugins/designer/
%{_kf5_plugindir}/libmarble*so
%{_kf5_plugindir}/libplasma_runner_marble.so
%{_kf5_servicesdir}/*desktop
%{_kf5_sharedir}/appdata/
%{_kf5_sharedir}/marble/
%files devel
%defattr(-,root,root)
%doc BUGS CODING
%{_includedir}/marble/
%{_includedir}/astro/
%{_kf5_libdir}/libmarblewidget-qt5.so
%{_kf5_libdir}/libastro.so
%{_kf5_sharedir}/marble/cmake/
%files data
%defattr(-,root,root)
%{_kf5_sharedir}/marble/data
%files doc
%defattr(-,root,root)
%{_kf5_htmldir}/en/marble/
%files -n libmarblewidget-qt5%{_so}
%defattr(-,root,root)
%{_kf5_libdir}/libmarblewidget-qt5.so.*
%files -n libastro1
%defattr(-,root,root)
%{_kf5_libdir}/libastro.so.*
%files qt
%defattr(-,root,root)
%{_kf5_applicationsdir}/marble-qt.desktop
%{_kf5_bindir}/marble-qt
%files kde
%defattr(-,root,root)
%{_kf5_applicationsdir}/marble.desktop
%{_kf5_bindir}/marble
%else
%files
%defattr(-,root,root)
%doc CREDITS ChangeLog COPYING* LICENSE* MANIFESTO.txt
%exclude %{_datadir}/marble/data
%exclude %{_datadir}/marble/cmake
%{_datadir}/applications/marble_geo.desktop
%{_datadir}/applications/marble_gpx.desktop
%{_datadir}/applications//marble_kml.desktop
%{_datadir}/applications/marble_kmz.desktop
%{_datadir}/applications/marble_osm.desktop
#{_datadir}/applications/marble_worldwind.desktop
%{_kde4_iconsdir}/hicolor/*/apps/marble.*
%{_libdir}/marble/
%{_libdir}/qt4/plugins/
%{_datadir}/appdata/
%{_datadir}/marble/
%files devel
%defattr(-,root,root)
%doc BUGS CODING
%{_includedir}/marble/
%{_includedir}/astro/
%{_libdir}/libmarblewidget.so
%{_libdir}/libastro.so
%{_datadir}/marble/cmake/
%files data
%defattr(-,root,root)
%{_datadir}/marble/data
%files doc
%defattr(-,root,root)
%{_kde4_htmldir}/en/marble/
%files -n libmarblewidget%{_so}
%defattr(-,root,root)
%{_libdir}/libmarblewidget.so.*
%files -n libastro1
%defattr(-,root,root)
%{_libdir}/libastro.so.*
%files qt
%defattr(-,root,root)
%{_datadir}/applications/marble-qt.desktop
%{__bindir}/marble-qt
%files kde
%defattr(-,root,root)
%{_kde4_applicationsdir}/marble.desktop
%{_bindir}/marble
%endif
%changelog
%changelog