Blob Blame History Raw
Name:           fgrun
Summary:        Graphical front-end for launching FlightGear flight simulator
Version:        3.2.0
Release:        2%{?dist}
License:        GPLv2+ and CC-BY-SA
Group:          Amusements/Games
URL:            http://sourceforge.net/projects/fgrun
# git clone git://gitorious.org/fg/fgrun.git
# git archive --format=tar.bz2 -o fgrun-3.2.0.tar.bz2 --prefix=fgrun-3.2.0/ origin/release/3.2.0
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        README.Fedora
# The icon is licensed under the CC Attribution-Share Alike 3.0 license
# http://commons.wikimedia.org/wiki/File:Bt_plane.svg
Source10:       http://upload.wikimedia.org/wikipedia/commons/9/9c/Bt_plane.svg
Source11:       Bt_plane-16.png
Source12:       Bt_plane-32.png
Source13:       Bt_plane-48.png
Source14:       Bt_plane-64.png
Source15:       Bt_plane-128.png
Patch1:         0001-Build-fgrun-with-static-ui-libs.patch
Patch2:         0002-Fix-a-crash-when-setting-defaults.patch
Patch3:         0003-Default-settings-for-Fedora.patch
Patch4:         0004-Fix-reloadPath-logic.patch
Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root
Requires:       FlightGear, opengl-games-utils, hicolor-icon-theme
BuildRequires:  SimGear-devel >= 2.6.0
BuildRequires:  fltk-devel fltk-fluid plib-devel 
BuildRequires:  sg3_utils-devel OpenSceneGraph-devel
BuildRequires:  gettext boost-devel desktop-file-utils
BuildRequires:  cmake

%description 
FlightGear Launch Control is a graphical front-end for launching
FlightGear flight simulator

%prep 
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
cp -a %{SOURCE2} .

%build 
CXXFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
%{cmake} \
    -DSIMGEAR_SHARED=ON \
.
make %{?_smp_mflags}

%install 
rm -fr $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/fgrun-wrapper
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fltk/flightgear.org
install -m 0644 fgrun.prefs \
        $RPM_BUILD_ROOT%{_sysconfdir}/fltk/flightgear.org/fgrun.prefs
%find_lang %{name}

desktop-file-install                                    \
        --dir=$RPM_BUILD_ROOT%{_datadir}/applications   \
        %{SOURCE1}

# install icons
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps

install -m 0644 %{SOURCE10} \
        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -m 0644 %{SOURCE11} \
        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
install -m 0644 %{SOURCE12} \
        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
install -m 0644 %{SOURCE13} \
        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
install -m 0644 %{SOURCE14} \
        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
install -m 0644 %{SOURCE15} \
        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png

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

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

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

%clean 
rm -fr %{buildroot}

%files  -f %{name}.lang
%defattr(-,root,root,-) 
%doc COPYING NEWS AUTHORS README README.Fedora
%dir %{_sysconfdir}/fltk
%dir %{_sysconfdir}/fltk/flightgear.org
%{_sysconfdir}/fltk/flightgear.org/fgrun.prefs
%{_bindir}/* 
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*

%changelog
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 3.2.0-2
- Rebuild for boost 1.57.0

* Fri Oct 17 2014 Fabrice Bellet <fabrice@bellet.info> - 3.2.0-1
- new upstream release

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Thu Jul 10 2014 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.0.0-4
- Rebuilt for OSG-3.2.1.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 3.0.0-2
- Rebuild for boost 1.55.0

* Fri Feb 21 2014 Fabrice Bellet <fabrice@bellet.info> - 3.0.0-1
- new upstream release

* Wed Dec 11 2013 Fabrice Bellet <fabrice@bellet.info> - 1.7.0-2
- Prevent build failure with -Werror=format-security (bug #1037061).

* Sun Sep 22 2013 Fabrice Bellet <fabrice@bellet.info> - 1.7.0-1
- new upstream release

* Thu Aug 15 2013 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.6.2-8
- Rebuilt for OSG-3.2.0.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 1.6.2-6
- Rebuild for boost 1.54.0

* Wed Mar 13 2013 Fabrice Bellet <fabrice@bellet.info> - 1.6.2-5
- libpthread link patch is no longer needed (rh#918003)

* Wed Mar 06 2013 Fabrice Bellet <fabrice@bellet.info> - 1.6.2-4
- add libpthread to link fgrun

* Mon Feb 18 2013 Fabrice Bellet <fabrice@bellet.info> - 1.6.2-3
- rebuilt with newer SimGear

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Sep 11 2012 Fabrice Bellet <fabrice@bellet.info> 1.6.2-1
- new upstream release

* Tue Jul 24 2012 Fabrice Bellet <fabrice@bellet.info> 1.6.1-4
- upstream patch r665 implements system-wide settings

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

* Wed Mar 21 2012 Fabrice Bellet <fabrice@bellet.info> 1.6.1-2
- define default settings for Fedora
- fix a crash when resetting default values
- add a README.Fedora to quickly explain the initial setup
  with terrasync

* Tue Feb 28 2012 Fabrice Bellet <fabrice@bellet.info> 1.6.1-1
- new upstream release

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-0.2.svn20110905
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Sep 05 2011 Fabrice Bellet <fabrice@bellet.info> 1.6.0-0.1
- new snapshot

* Tue Jun 14 2011 Ralf Corsépius <corsepiu@fedoraproject.org> 1.5.2-8
- Rebuild against OSG-2.8.5.

* Fri May 27 2011 Fabrice Bellet <fabrice@bellet.info> 1.5.2-7
- rebuilt for newer fltk

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Nov 21 2010 Fabrice Bellet <fabrice@bellet.info> 1.5.2-5
- add a requires hicolor-icon-theme
- fix the icon cache scriptlets
- fix the .desktop file
- fix the %%defattr macro

* Sun Mar 14 2010 Fabrice Bellet <fabrice@bellet.info> 1.5.2-4
- rebuild with -D_FILE_OFFSET_BITS=64

* Fri Mar 12 2010 Fabrice Bellet <fabrice@bellet.info> 1.5.2-3
- add an icon

* Mon Mar 01 2010 Fabrice Bellet <fabrice@bellet.info> 1.5.2-2
- fix a BuildRequires for a recent version of SimGear

* Fri Feb 26 2010 Fabrice Bellet <fabrice@bellet.info> 1.5.2-1
- new upstream release
- use scandir() instead of fl_filename_list() to browse airports files

* Tue Jan 27 2009 Pankaj Pandey <pankaj86@gmail.com> 1.5.1-1
- Created this spec file