Name: marble
Summary: A World Atlas
Summary(ja): デスクトップ地球儀
Version: 4.14.3
Release: 1%{?_dist_release}

# documents are GFDL
License: LGPLv2+ and GFDLv1.2
Group: Applications/Edutainment
URL: http://edu.kde.org/marble/

Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.xz

## upstream patches

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gpsd-devel
BuildRequires: desktop-file-utils
BuildRequires: kdelibs4-devel >= %{version}
BuildRequires: soprano-devel
BuildRequires: libXpm-devel

# split pkgs, (temporary?) upgrade path -- Rex
#Requires: %{name}-kstars = %{version}-%{release}
#Requires: %{name}-marble = %{version}-%{release}
#Requires: %{name}-math = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}

Obsoletes: kdeedu4-marble < %{version}-%{release}
Provides:  kdeedu4-marble = %{version}-%{release}

Vendor: Project Vine
Distribution: Vine Linux

%description
Marble is a generic geographical map widget and framework for 
KDE applications. The Marble widget shows the earth as a sphere 
but does not require hardware acceleration. A minimal set of 
geographical data is included, so it can be used without an 
internet connection.

This package is part of the KDE education module.

%package libs
Summary: Runtime libraries for %{name}
Summary(ja): %{name} のランタイムライブラリ
License: LGPLv2+
Group: System Environment/Libraries
Obsoletes: kdeedu4-marble-libs < %{version}-%{release}
Provides:  kdeedu4-marble-libs = %{version}-%{release}

%description libs
%{summary}.

%package devel
Summary: Development files for %{name}
Summary(ja): %{name} の開発用ファイル
# cmake scripts are BSD license
License: LGPLv2+ and BSD
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires:  kdelibs4-devel

Conflicts: kdeedu4-devel < 4.6.50

%description devel
Header files for developing applications using %{name}.

%prep
%setup -q 

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
    ..
popd

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

%install
rm -rf $RPM_BUILD_ROOT
make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}

%clean
rm -rf $RPM_BUILD_ROOT 

%check
for f in $RPM_BUILD_ROOT%{_datadir}/applications/kde4/*.desktop ; do
    desktop-file-validate $f
done


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

%posttrans
update-desktop-database -q &> /dev/null ||:
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:

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

%post libs
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &> /dev/null ||:

%posttrans libs
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:

%postun libs
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null ||:
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null ||:
fi


%files
%defattr(-,root,root)
%doc ChangeLog COPYING.DOC LICENSE.txt
%{_bindir}/marble
%{_bindir}/marble-mobile
%{_bindir}/marble-qt
%{_bindir}/marble-touch
%{_libdir}/kde4/marblethumbnail.so
%{_libdir}/kde4/plasma_applet_worldclock.so
%{_libdir}/kde4/plasma_runner_marble.so
%{_libdir}/qt4/imports/org/kde/edu/marble
%{_datadir}/appdata/marble.appdata.xml
%{_datadir}/applications/kde4/marble.desktop
%{_datadir}/applications/kde4/marble_geo.desktop
%{_datadir}/applications/kde4/marble_gpx.desktop
%{_datadir}/applications/kde4/marble_kml.desktop
%{_datadir}/applications/kde4/marble_osm.desktop
%{_datadir}/applications/kde4/marble-mobile.desktop
%{_datadir}/applications/kde4/marble-qt.desktop
%{_datadir}/applications/kde4/marble-touch.desktop
%{_datadir}/applications/kde4/marble_worldwind.desktop
%{_datadir}/config.kcfg/marble.kcfg
%{_datadir}/icons/hicolor/*/*/marble.*
%{_datadir}/kde4/apps/marble
%{_datadir}/kde4/services/marble_part.desktop
%{_datadir}/kde4/services/marble_part_gpx.desktop
%{_datadir}/kde4/services/marble_part_kml.desktop
%{_datadir}/kde4/services/marble_part_osm.desktop
%{_datadir}/kde4/services/marble_thumbnail_gpx.desktop
%{_datadir}/kde4/services/marble_thumbnail_kml.desktop
%{_datadir}/kde4/services/marble_thumbnail_osm.desktop
%{_datadir}/kde4/services/plasma-applet-kworldclock.desktop
%{_datadir}/kde4/services/plasma-runner-marble.desktop
%{_datadir}/mime/packages/geo.xml
%doc %{_docdir}/HTML/en/marble/

%files libs
%defattr(-,root,root)
%{_libdir}/libastro.so.*
%{_libdir}/libmarblewidget.so.*
%{_libdir}/kde4/libmarble_part.so
%{_libdir}/kde4/plugins/marble/
%{_libdir}/kde4/plugins/designer/

%files devel
%defattr(-,root,root)
%doc COPYING-CMAKE-SCRIPTS
%{_includedir}/astro/*
%{_includedir}/marble/*
%{_libdir}/libastro.so
%{_libdir}/libmarblewidget.so
%{_datadir}/kde4/apps/cmake/modules/

%changelog
* Thu Jan 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.14.3-1
- new upstream release

* Wed Dec 24 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.12.5-2
- rebuilt with gpsd 3.11

* Wed May 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.12.5-1
- new upstream release

* Sun Feb 09 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.12.2-1
- new upstream release

* Wed Dec 18 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.11.4-1
- new upstream release

* Sun Sep 08 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.11.1-1
- new upstream release

* Sat Jul 06 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.10.5-1
- new upstream release

* Fri Jan 04 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.5-1
- new upstream release

* Sat Nov 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.3-1
- new upstream release

* Sun Oct 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.2-1
- new upstream release

* Thu Sep 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.1-1
- new upstream release

* Mon Aug 13 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.9.0-1
- new upstream release

* Sun Aug  7 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.0-1
- split from kdeedu

* Sun Jun 19 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.4-1
- new upstream release

* Mon Mar 14 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.1-1
- new upstream release

* Sun Feb 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.0-2
- added BR: gcc-gfortran, libXpm-devel, soprano-devel

* Fri Feb 25 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.0-1
- new upstream release
- added kstars-libs, math-cantor-r subpackages

* Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> 4.5.1-2
- rebuilt with libboost-1.45.0

* Sat Sep 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.5.1-1
- rebuilt with libqalcurate-0.9.7

* Sat Aug 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.5.0-1
- new upstream release
- added BR: avogadro-devel

* Wed Jul  7 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.5-1
- new upstream release
- added Conflicts: kdeedu3

* Fri May  7 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.3-1
- new upstream release

* Sat Mar 13 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.1-1
- new upstream release
- built with new toolchain

* Wed Nov 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.3-1
- new upstream release

* Tue Oct 27 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.2-2
- just +1 release number (4.3.2-1vl5 was broken in putting)

* Sun Oct 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.2-1
- new upstream release

* Sat Sep  5 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
- new upstream release
- used %cmake macro
- added BR: eigen2-devel

* Sun Aug 30 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.0-1
- new upstream release
- split libs, kstars, marble, marble-libs and math sub-packages

* Sun May 10 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.8-1
- applied new versioning policy

* Sat Nov 24 2007 NAKAMURA Kenta <kenta@vinelinux.org> 3.5.8-0vl3
- added --with-qt-libraries configure option

* Thu Oct 18 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.8-0vl2
- rebuild for VineSeed

* Thu Oct 18 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.8-0vl1
- new upstream release

* Wed Jun 20 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.7-0vl2
- rebuild for VineSeed

* Sat May 26 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.7-0vl1
- new upstream release

* Mon Jan 22 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.6-0vl1
- new upstream release

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.5-0vl2
- rebuild for VineSeed

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.5-0vl1
- new upstream release

* Sat Sep 30 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.4-0vl3
- changed Group to Applications/Edutainment

* Tue Aug  1 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.4-0vl2
- rebuild for VineSeed

* Tue Aug  1 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.4-0vl1
- new upstream release

* Tue May 30 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.3-0vl2
- rebuild for VineSeed

* Tue May 30 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.3-0vl1
- new upstream release

* Thu Mar 23 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.2-0vl2
- rebuild for VineSeed

* Thu Mar 23 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.2-0vl1
- new upstream release
- update description

* Tue Jan 31 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.1-0vl2
- rebuild for VineSeed

* Tue Jan 31 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.1-0vl1
- new upstream release
- add BuildPrereq: ocaml facile

* Thu Dec  8 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.0-0vl2
- rebuild for VineSeed

* Tue Nov 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.0-0vl1
- new upstream release

* Mon Nov 14 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.0-0vl0.rc1
- new upstream release
- delete Patch10

* Fri Nov 11 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.92-0vl3
- add Patch0

* Wed Oct 19 2005 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.4.92-0vl2
- added Patch10 (some kstars/apogee files includes sys/io.h,
  but sys/io.h is NOT available on many archtectures but ix86)

* Mon Oct 17 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.92-0vl1
- new upstream release
- delete all patches

* Tue Sep 20 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.91-0vl1
- new upstream release
- delete Patch0
- add Patch0 - Patch2

* Thu Aug 11 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.2-0vl2
- rebuild for VineSeed

* Thu Aug 11 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.2-0vl1
- new upstream release
- add Patch0 (http://www.kde.org/info/security/advisory-20050815-1.txt)

* Thu Jun 30 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.1-0vl2
- build for VineSeed
- add --disable-rpath to configure option

* Mon Jun  6 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.1-0vl1
- new upstream release
- use %%{?_smp_mflags} for make option

* Sat Mar 19 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.0-0vl2
- rebuild for VineSeed

* Sat Mar 12 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.0-0vl1
- new upstream release

* Fri Mar  4 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.0-0vl0.rc1
- new upstream release (3.4.0-rc1)
- remove patch0

* Thu Feb 17 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl4
- rebuild for VineSeed

* Thu Feb 17 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl3
- add Patch0 (CAN-2005-0011)

* Sat Dec 18 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl2
- rebuild for VineSeed

* Sat Dec 18 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl1
- source upgrade
- build for Vine Linux 3.1

* Thu Oct 14 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.1-0vl1
- source upgrade
- update %%files

* Wed Aug 11 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.3-0vl2
- rebuild with qt32

* Tue Jun 15 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.3-0vl1
- source upgrade
- remove lines about vine26

* Thu Apr  1 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.2-0vl1
- source upgrade

* Tue Mar  9 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.1-0vl1
- source upgrade

* Sat Jan 17 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.5-0vl2
- rebuild for VineSeedPlus

* Sun Jan 11 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.5-0vl1
- source upgrade
- build for VinePlus/2.6
- (VinePlus/2.6) BuildPrereq: autoconf258

* Sun Dec 28 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.4-0vl3
- build for VineSeed with new toolchain and qt-3.2.3

* Sun Nov  2 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.4-0.26vl2
- rebuild with qt-3.2.1-0.26vl3

* Sun Oct 19 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.4-0vl2
- rebuild with qt-3.2.1-0vl3

* Thu Sep 18 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.4-0vl1
- build with gcc-3.2.3

* Mon Sep 15 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.4-0.26vl1
- source upgrade
- BuildPrereq: qt-devel >= 3.2.1 arts-devel >= 1:1.1.4

* Sat Aug  2 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.3-0.26vl1
- rebuild for Vine2.6

* Mon Jul 21 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.3-0vl1
- source upgrade
- change spec to build with gcc295
- change make option for SMP and add script

* Sat May 10 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.2-0vl1
- source upgrade
- add BuildPrereq: zlib-devel libjpeg-devel libpng-devel
- built with libpng >= 1.2.5 when %{vine26} is set to 0 (ie VineSeedPlus)
- add BuildPrereq: arts-devel >= 1:1.1.2 kdelibs-devel >= %{version}
- delete BuildPrereq: kdebase-devel >= %{version}

* Sun Apr 13 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.1.1-0vl1
- source upgrade
- remove patch
- change spec to make monolithic package only
- change spec to build both VineSeed and Vine2.5/2.6
- revised description and files section

* Sat Oct 19 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.4-0vl2
- objprelink2 support only ix86 (add %ifarch %{ix86} ... )

* Mon Oct 14 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.4-0vl1
- source upgrade
- BuildPrereq: autoconf253 objprelink2
- fix %files for .desktop files

* Tue Jul 23 2002 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.0.2-1vl1
- add BuildPrereq: autoconf252 automake15
- add %define monolithic 1
- add objprelink option (i386 only)
- delete BuildPrereq: desktop-file-utils

* Wed Jul 10 2002 Than Ngo <than@redhat.com> 3.0.2-1
- 3.0.2
- use desktop-file-install

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Sat May 25 2002 Bernhard Rosenkraenzer <bero@redhat.com>
- initial RPM
