Blob Blame History Raw
## enable python bindings or not
#global python 1
## enable designer plugin
%global designer 1

Name:    marble
Summary: Virtual globe and world atlas 
Epoch:   1
Version: 4.11.95
Release: 1%{?dist}

License: LGPLv2+
#URL:    https://projects.kde.org/projects/kde/kdeedu/marble
URL:     http://edu.kde.org/marble/
%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0:  http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz

# find libqextserialport-1.2.so
# TODO: upstreamable? Or do we want to fix qextserialport-devel instead?
Patch0: marble-4.11.90-qextserialport.patch

## upstreamable patches

## upstream patches
# forward-ported Python binding updates from 4.11
Patch100: 0001-Python-bindings-update.patch
Patch101: 0002-Python-bindings-update.patch

BuildRequires: desktop-file-utils
BuildRequires: kdelibs4-devel >= %{version}
%if 0%{?fedora}
BuildRequires: pkgconfig(libgps)
%endif
# qt-mobility-devel
BuildRequires: pkgconfig(QtLocation)
%if 0%{?python}
BuildRequires: pykde4-devel >= %{version} 
%endif
BuildRequires: qextserialport-devel
BuildRequires: quazip-devel
BuildRequires: shapelib-devel
# TODO: The following are not packaged in Fedora:
# * liblocation , position information on Maemo 5 devices , <http://maemo.org/>
#   position information via GPS/WLAN for the Nokia N900 smartphone
# (This one is probably not worth packaging.)
# * libwlocate , WLAN-based geolocation , <http://www.openwlanmap.org/>
#   Position information based on neighboring WLAN networks
# (But this one probably is.)

Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}

# when split occurred
Obsoletes: kdeedu-marble < 4.7.0-10
Provides:  kdeedu-marble = %{version}-%{release}
Provides:  kdeedu-marble%{?_isa} = %{version}-%{release}

Provides: marble-part = %{version}-%{release}
Provides: marble-part%{?_isa} = %{version}-%{release}

%if ! 0%{?marble}
Obsoletes: python-marble < %{epoch}:%{version}-%{release}
%endif

%description
Marble is a Virtual Globe and World Atlas that you can use to learn more
about Earth: You can pan and zoom around and you can look up places and
roads. A mouse click on a place label will provide the respective Wikipedia
article.

Of course it's also possible to measure distances between locations or watch
the current cloud cover. Marble offers different thematic maps: A classroom-
style topographic map, a satellite view, street map, earth at night and
temperature and precipitation maps. All maps include a custom map key, so it
can also be used as an educational tool for use in class-rooms. For
educational purposes you can also change date and time and watch how the
starry sky and the twilight zone on the map change.

In opposite to other virtual globes Marble also features multiple
projections: Choose between a Flat Map ("Plate carré"), Mercator or the Globe.

%package  libs
Summary:  Runtime files for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Obsoletes: kdeedu-marble-libs < 4.7.0-10
Provides:  kdeedu-marble-libs = %{version}-%{release}
%description libs
%{summary}.

%package devel
Summary:  Development files for %{name} 
# when split occurred
Conflicts: kdeedu-devel < 4.7.0-10
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: kdelibs4-devel 
%description devel
%{summary}.

%package -n python-marble
Summary: Exerimental python bindings for Marble
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: pykde4 >= %{version}
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
%description -n python-marble
%{summary}.


%prep
%setup -q

%patch0 -p1 -b .qextserialport
%patch100 -p1 -b .python-bindings-update-1
%patch101 -p1 -b .python-bindings-update-2


%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} \
  -DEXPERIMENTAL_PYTHON_BINDINGS:BOOL=%{?python:ON}%{!?python:OFF} \
  -DIGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS:BOOL=ON \
  -DWITH_DESIGNER_PLUGIN:BOOL=%{?designer:ON}%{!?designer:OFF} \
  ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang %{name} --with-kde --without-mo


%check
desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/marble.desktop


%post
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-mime-database %{_kde4_datadir}/mime >& /dev/null

%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-mime-database %{_kde4_datadir}/mime >& /dev/null
fi

%files -f %{name}.lang
%doc LICENSE.txt
%doc CREDITS MANIFESTO.txt TODO USECASES
%{_kde4_appsdir}/marble/
%{_kde4_bindir}/marble
# subpkg for -qt/-touch ? -- rex
%{_kde4_bindir}/marble-qt
%{_kde4_bindir}/marble-mobile
%{_kde4_bindir}/marble-touch
#{_kde4_bindir}/routing-instructions
#{_kde4_bindir}/tilecreator
%{_kde4_datadir}/applications/kde4/marble.desktop
%{_kde4_datadir}/applications/kde4/marble_gpx.desktop
%{_kde4_datadir}/applications/kde4/marble_kml.desktop
%{_kde4_datadir}/applications/kde4/marble_kmz.desktop
%{_kde4_datadir}/applications/kde4/marble_osm.desktop
%{_kde4_datadir}/applications/kde4/marble_shp.desktop
%{_kde4_datadir}/config.kcfg/marble.kcfg
%{_kde4_datadir}/kde4/services/marble_part.desktop
%{_kde4_datadir}/kde4/services/marble_part_gpx.desktop
%{_kde4_datadir}/kde4/services/marble_part_kml.desktop
%{_kde4_datadir}/kde4/services/marble_part_kmz.desktop
%{_kde4_datadir}/kde4/services/marble_part_osm.desktop
%{_kde4_datadir}/kde4/services/marble_part_shp.desktop
%{_kde4_libdir}/kde4/libmarble_part.so
%{_kde4_iconsdir}/hicolor/*/*/marble.*
# worldclock links against libmarblewidget, include here
%{_kde4_libdir}/kde4/plasma_applet_worldclock.so
%{_kde4_datadir}/kde4/services/plasma-applet-kworldclock.desktop
%{_kde4_libdir}/kde4/plasma_runner_marble.so
%{_kde4_datadir}/kde4/services/plasma-runner-marble.desktop
%{_qt4_importdir}/org/
%{_kde4_datadir}/mime/packages/geo.xml

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig

%files libs
%{_kde4_libdir}/libmarblewidget.so.*
%{_kde4_libdir}/kde4/plugins/marble/
%if 0%{?designer}
%{_kde4_libdir}/kde4/plugins/designer/*.so
%endif

%files devel
%doc docs/*
%{_kde4_appsdir}/cmake/modules/FindMarble.cmake
%{_includedir}/marble/
%{_kde4_libdir}/libmarblewidget.so

%if 0%{?python}
%files -n python-marble
%{python_sitearch}/PyKDE4/marble.so
%endif


%changelog
* Thu Nov 21 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.11.95-1
- 4.11.95 (disable still-not-building python bindings)

* Sun Nov 17 2013 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1:4.11.90-3
- forward-port Python bindings updates from 4.11, reenable Python bindings

* Sun Nov 17 2013 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1:4.11.90-2
- fix designer plugin path (kde#327690), reenable designer plugin

* Sat Nov 16 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.11.90-1
- 4.11.90, disable broken python bindings, designer plugin

* Sat Nov 02 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.11.3-1
- 4.11.3

* Sat Sep 28 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.11.2-1
- 4.11.2

* Wed Sep 04 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.11.1-1
- 4.11.1

* Mon Aug 12 2013 Rex Dieter <rdieter@fedoraproject.org> 1:4.11.0-3
- respin

* Sun Aug 11 2013 Rex Dieter <rdieter@fedoraproject.org> 1:4.11.0-2
- (re)enable python bindings

* Thu Aug 08 2013 Than Ngo <than@redhat.com> - 1:4.11.0-1
- 4.11.0

* Thu Jul 25 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.10.97-1
- 4.10.97

* Tue Jul 23 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.10.95-1
- 4.10.95

* Tue Jul 02 2013 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1:4.10.90-2
- BuildRequires: qextserialport-devel quazip-devel
- find libqextserialport-1.2.so
- update the file list to list the files for kmz support (based on quazip)

* Thu Jun 27 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.10.90-1
- 4.10.90
- disable python bindings (for now, broken)

* Mon Jun 17 2013 Rex Dieter <rdieter@fedoraproject.org> 4.10.4-2
- rebuild (sip)

* Sat Jun 01 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.10.4-1
- 4.10.4

* Mon May 06 2013 Than Ngo <than@redhat.com> - 4.10.3-1
- 4.10.3

* Sun Mar 31 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.10.2-1
- 4.10.2

* Sat Mar 02 2013 Rex Dieter <rdieter@fedoraproject.org> 4.10.1-1
- 4.10.1

* Fri Feb 01 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.10.0-1
- 4.10.0

* Mon Jan 21 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.9.98-1
- 4.9.98

* Fri Jan 04 2013 Rex Dieter <rdieter@fedoraproject.org> - 1:4.9.97-1
- 4.9.97

* Sun Dec 23 2012 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1:4.9.95-2
- apply upstream patch to fix the build of the Python bindings

* Thu Dec 20 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.9.95-1
- 4.9.95
- disable python bindings

* Mon Dec 03 2012 Rex Dieter <rdieter@fedoraproject.org> 4.9.90-1
- 4.9.90 (4.10 beta2)

* Mon Dec 03 2012 Than Ngo <than@redhat.com> - 4.9.4-1
- 4.9.4

* Sat Nov 03 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.9.3-1
- 4.9.3

* Thu Nov 01 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.9.2-4
- BR: shapelib-devel

* Wed Oct 03 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.9.2-3
- rebuild (sip)

* Sat Sep 29 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.9.2-2
- re-enable python bindings

* Sat Sep 29 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.9.2-1
- 4.9.2

* Mon Sep 03 2012 Than Ngo <than@redhat.com> - 1:4.9.1-1
- 4.9.1

* Fri Jul 27 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.9.0-1
- 4.9.0

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.8.97-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Jul 11 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.97-1
- 4.8.97

* Wed Jun 27 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.95-1
- 4.8.95

* Sat Jun 09 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.90-1
- 4.8.90

* Tue May 29 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.80-1
- 4.8.80

* Mon Apr 30 2012 Jaroslav Reznik <jreznik@redhat.com> - 1:4.8.3-1
- 4.8.3

* Fri Mar 30 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.2-1
- 4.8.2

* Tue Mar 27 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.1-2
- enable designer plugin (#807128)

* Mon Mar 05 2012 Jaroslav Reznik <jreznik@redhat.com> - 1:4.8.1-1
- 4.8.1

* Thu Feb 09 2012 Jaroslav Reznik <jreznik@redhat.com> 1:4.8.0-6
- more qt 4.8 fixes (show proper icons for MarbleLegendBrowser)

* Tue Feb 07 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.0-5
- upstream qt48_transparency patch (fix display of water/ocenas in atlas view)

* Mon Feb 06 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.0-4
- drop hard-coded -O3 optimization

* Fri Feb 03 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.0-3
- python-marble: fix versioned dependency

* Fri Feb 03 2012 Rex Dieter <rdieter@fedoraproject.org> 1:4.8.0-2
- enable (experimental) python bindings
- s/kdebase-runtime/kde-runtime/

* Sun Jan 22 2012 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.0-1
- 4.8.0

* Wed Jan 04 2012 Radek Novacek <rnovacek@redhat.com> - 1:4.7.97-1
- 4.7.97

* Wed Dec 21 2011 Radek Novacek <rnovacek@redhat.com> - 1:4.7.95-1
- 4.7.95

* Mon Dec 05 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.90-2
- set IGNORE_CMAKE_INSTALL_PREFIX_FOR_DECLARATIVE_PLUGINS

* Sun Dec 04 2011 Rex Dieter <rdieter@fedoraproject.org> - 1:4.7.90-1
- 4.7.90

* Fri Nov 25 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.80-1
- 4.7.80

* Sat Oct 29 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.3-1
- 4.7.3
- pkgconfig-style deps

* Tue Oct 04 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.2-1
- 4.7.2

* Sat Sep 17 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.1-2
- Provides: kdeedu-marble%%{?_isa}

* Fri Sep 16 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.1-1
- 4.7.1

* Wed Sep 14 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.0-11
- update URL

* Tue Aug 30 2011 Rex Dieter <rdieter@fedoraproject.org> 1:4.7.0-10
- first try