SHA256
1
0
forked from pool/marble
Raymond Wooninck 2015-08-30 18:22:21 +00:00 committed by Git OBS Bridge
parent a358723f75
commit f739933b83
3 changed files with 97 additions and 93 deletions

6
libmarblewidget.changes Normal file
View File

@ -0,0 +1,6 @@
-------------------------------------------------------------------
Sun Aug 30 18:20:17 UTC 2015 - tittiatcoke@gmail.com
- Initial package to fullfil the buildrequirements for libkgeomap
as it is still based on Qt4

89
libmarblewidget.spec Normal file
View File

@ -0,0 +1,89 @@
#
# spec file for package libmarblewidget
#
# 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
Name: libmarblewidget
Version: 15.08.0
Release: 0
Summary: Generic map viewer library for libkgeomapr
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
BuildRequires: libkde4-devel
BuildRequires: quazip-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The shared library for the MarbleWidget shared library.
%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 -n libmarblewidget%{_so}
Summary: Generic map viewer: Shared Library
Group: Development/Libraries/KDE
%description -n libmarblewidget%{_so}
The shared library for the MarbleWidget shared library.
%prep
%setup -q
%patch0 -p1
%build
%ifarch ppc ppc64
export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
%cmake_kde4 -d qt4 -- -DQT5BUILD=OFF
cd qt4/src/lib/marble
make
%install
pushd qt4/src/lib/marble
%kde4_makeinstall
popd
%fdupes -s %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files devel
%defattr(-,root,root)
%doc BUGS CODING
%{_includedir}/marble/
%{_kf5_libdir}/libmarblewidget-qt5.so
%{_kf5_sharedir}/marble/cmake/
%files
%defattr(-,root,root)
%doc CREDITS ChangeLog COPYING* LICENSE* MANIFESTO.txt
%{_libdir}/libmarblewidget.so.*
%changelog

View File

@ -17,8 +17,6 @@
%define _so -22
%define withqt5 0
Name: marble
Version: 15.08.0
Release: 0
@ -32,7 +30,6 @@ 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
@ -63,11 +60,6 @@ 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}
@ -111,6 +103,7 @@ Marble is a viewer of map data. This package contains its data.
Summary: Generic map viewer: Build Environment
Group: Development/Libraries/KDE
Requires: libmarblewidget-qt5%{_so} = %{version}
Requires: libastro1 = %{version}
%description devel
Development headers and libraries for Marble.
@ -124,19 +117,11 @@ 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
@ -155,10 +140,9 @@ The Astronomy shared library for the MarbleWidget shared library.
export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
%if 0%{?withqt5}
export SUSE_ASNEEDED=0
mkdir build
cd build
pushd build
cmake -DCMAKE_BUILD_TYPE=%{_kf5_build_type} \
-DCMAKE_INSTALL_PREFIX=%{_kf5_prefix} \
-DCMAKE_PREFIX_PATH=%{_kf5_prefix} \
@ -173,14 +157,9 @@ cmake -DCMAKE_BUILD_TYPE=%{_kf5_build_type} \
-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
@ -188,32 +167,16 @@ cmake -DCMAKE_BUILD_TYPE=%{_kf5_build_type} \
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}%{_datadir}/applications/marble-mobile.desktop
rm -rf %{buildroot}%{_datadir}/applications/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
@ -271,59 +234,5 @@ cmake -DCMAKE_BUILD_TYPE=%{_kf5_build_type} \
%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/*.desktop
%exclude %{_datadir}/applications/marble-qt.desktop
#exclude %{_datadir}/applications/marble.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)
#{_datadir}/applications/marble.desktop
#{_bindir}/marble
%endif
%changelog
%changelog