1
0
Fork 0

Update RedHat rpm spec

Adapt to CMake
Use shared SimGear libraries
Drop separate icon (use icon from package)
Update to 2.8.0
(RedHat package dependencies may still be inaccurate/incomplete)
This commit is contained in:
ThorstenB 2012-06-30 10:48:00 +02:00
parent b93bed7527
commit 294c081369
4 changed files with 32 additions and 28 deletions

View file

@ -1,8 +1,7 @@
Building FlightGear RPM package for Red Hat
G.Richard Keech <rkeech@redhat.com>
2003-10-29
Initial version: G.Richard Keech <rkeech@redhat.com>, 2003-10-29
Last updated: The FlightGear Project, 2012-06-30
This directory contains the files which, along with
the source code tar files, can be used to build
@ -16,20 +15,18 @@ To build flighgear from source do the following:
1. copy flightgear.spec to /usr/src/redhat/SPECS/
2. copy flightgear.48.png to /usr/src/redhat/SOURCES
2. copy flightgear.desktop to /usr/src/redhat/SOURCES
3. copy flightgear.desktop to /usr/src/redhat/SOURCES
4. obtain fgfs-base-0.9.3.tar.gz and FlightGear-0.9.3.tar.gz
3. obtain FlightGear-data-2.8.0.tar.bz2 and flightgear-2.8.0.tar.bz2
and copy them into /usr/src/redhat/SOURCES.
5. obtain and install SimGear (>= 0.3.4).
4. obtain and install SimGear (= 2.8.0).
6. look in the BuildRequires section of flightgear.spec
5. look in the BuildRequires section of flightgear.spec
and check that all the packages referred to are
installed.
7. cd /usr/src/redhat/SPECS
6. cd /usr/src/redhat/SPECS
rpmbuild -ba flightgear.spec
that's it.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1,7 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=FlightGear
Comment=FlightGear Flight Simulator
Exec=fgfs
Icon=
Categories=GNOME;Application;Game
Icon=flightgear
Categories=Game;Simulation

View file

@ -1,21 +1,22 @@
%define name flightgear
%define version 0.9.3
%define release 1grk
%define version 2.8.0
%define release 1
Summary: The FlightGear Flight Simulator
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
URL: http://www.flightgear.org
Group: Games/Other
BuildRoot: %{_tmppath}/%{name}-buildroot
Source: ftp://ftp.flightgear.org/pub/fgfs/Source/FlightGear-%{version}.tar.gz
Source1: ftp://ftp.flightgear.org/pub/fgfs/Shared/fgfs-base-%{version}.tar.gz
Source: http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/flightgear-%{version}.tar.bz2
Source1: http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Shared/FlightGear-data-%{version}.tar.bz2
Source3: flightgear.desktop
Source10: %{name}.48.png
BuildRequires: plib >= 1.6.0, simgear = 0.3.4, XFree86-devel, XFree86-Mesa-libGL, XFree86-Mesa-libGLU, gcc, zlib-devel
BuildRequires: plib >= 1.8.0, SimGear = %{version}
BuildRequires: XFree86-devel, XFree86-Mesa-libGL, XFree86-Mesa-libGLU, gcc, zlib-devel
BuildRequires: OpenSceneGraph >= 3.0.0
Requires: XFree86-devel, XFree86-Mesa-libGL, XFree86-Mesa-libGLU, gcc, zlib-devel
URL: http://www.flightgear.org
Obsoletes: FlightGear
Provides: FlightGear = %{version}-%{release}
@ -26,15 +27,14 @@ ideas. We are developing a solid basic sim that can be expanded and improved
upon by anyone interested in contributing.
%prep
%setup -q -n FlightGear-%{version}
rm -f docs-mini/*~
%setup -q -n %{name}-%{version}
%build
%configure
cmake -DSIMGEAR_SHARED:BOOL=ON -DENABLE_TESTS:BOOL=OFF -DFG_DATA_DIR:STRING="/usr/share/flightgear" -DJPEG_FACTORY:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH="/usr"
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}
tar xzf %{SOURCE1} -C $RPM_BUILD_ROOT%{_libdir}
mv $RPM_BUILD_ROOT%{_libdir}/FlightGear-%{version} $RPM_BUILD_ROOT%{_libdir}/FlightGear
@ -46,8 +46,9 @@ desktop-file-install --vendor flightgear --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/flightgear.desktop
# install icon
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
cp %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
cp icons/fg-128.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/FlightGear.png
%post
@ -66,6 +67,11 @@ rm -rf $RPM_BUILD_ROOT
%_mandir/man1/*
%changelog
* Thu Jun 28 2012 Thorsten Brehm <thorstenb@flightgear.org>
- Updated to 2.8.0
- Converted to CMake
- Use shared SimGear libraries
* Sun Oct 26 2003 Richard Keech <rkeech@redhat.com>
- updated for 0.9.3