]> git.mxchange.org Git - flightgear.git/commitdiff
Add openSUSE RPM specification
authorThorstenB <brehmt@gmail.com>
Mon, 2 Jul 2012 19:43:51 +0000 (21:43 +0200)
committerThorstenB <brehmt@gmail.com>
Mon, 2 Jul 2012 20:00:41 +0000 (22:00 +0200)
package/RedHat/flightgear.spec
package/openSUSE/FlightGear.desktop [new file with mode: 0644]
package/openSUSE/FlightGear.spec [new file with mode: 0644]
package/openSUSE/README [new file with mode: 0644]

index 6feac439a4b8a6b6d2fdd3fe6fd1bd5670977f85..7c03fc1e41b986a4ea01060b43da4d60e46872da 100644 (file)
@@ -6,17 +6,17 @@ Summary: The FlightGear Flight Simulator
 Name: %{name}
 Version: %{version}
 Release: %{release}
-License: GPL
+License: GPL-2.0
 URL: http://www.flightgear.org
 Group: Games/Other
 BuildRoot: %{_tmppath}/%{name}-buildroot
 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
+BuildRequires: gcc, gcc-c++, cmake
 BuildRequires: plib >= 1.8.0, SimGear = %{version}
-BuildRequires: XFree86-devel, XFree86-Mesa-libGL, XFree86-Mesa-libGLU, gcc, zlib-devel
+BuildRequires: XFree86-devel, XFree86-Mesa-libGL, XFree86-Mesa-libGLU, zlib-devel
 BuildRequires: OpenSceneGraph >= 3.0.0
-Requires: XFree86-devel, XFree86-Mesa-libGL, XFree86-Mesa-libGLU, gcc, zlib-devel
 Obsoletes: FlightGear
 Provides: FlightGear = %{version}-%{release}
 
diff --git a/package/openSUSE/FlightGear.desktop b/package/openSUSE/FlightGear.desktop
new file mode 100644 (file)
index 0000000..9fa442f
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=FlightGear
+Comment=FlightGear Flight Simulator
+Exec=fgfs
+Icon=FlightGear
+Categories=Game;Simulation;
diff --git a/package/openSUSE/FlightGear.spec b/package/openSUSE/FlightGear.spec
new file mode 100644 (file)
index 0000000..be2010d
--- /dev/null
@@ -0,0 +1,78 @@
+Summary:    The FlightGear Flight Simulator
+Name:       FlightGear
+Version:    2.8.0
+Release:    1
+License:    GPL-2.0
+URL:        http://www.flightgear.org
+Group:      Amusements/Games/3D/Simulation
+BuildRoot:  %{_tmppath}/%{name}-buildroot
+Source0:    http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/flightgear-%{version}.tar.bz2
+Source1:    %{name}.desktop
+
+BuildRequires: gcc, gcc-c++, cmake
+BuildRequires: update-desktop-files
+BuildRequires: SimGear = %{version}, SimGear-devel = %{version}
+BuildRequires: libOpenSceneGraph-devel >= 3.0
+BuildRequires: subversion-devel, libapr1-devel
+BuildRequires: freealut, freealut-devel
+BuildRequires: libopenal1-soft, openal-soft
+BuildRequires: zlib, zlib-devel
+BuildRequires: libfreetype6
+BuildRequires: libjpeg62, libjpeg62-devel
+BuildRequires: libudev-devel
+BuildRequires: boost-devel >= 1.37
+
+Requires: OpenSceneGraph-plugins >= 3.0
+Requires: FlightGear-data = %{version}
+Requires: SimGear = %{version}
+
+%description
+The FlightGear project is working to create a sophisticated flight simulator
+framework for the development and pursuit of interesting flight simulator
+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} -T -b 0
+rm -f docs-mini/*
+# remove unnecessary DATE/TIME dependency
+sed -i 's/__DATE__" "__TIME__//' src/FDM/JSBSim/FGJSBBase.cpp
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS"
+export BUILD_ID=OpenSuSE
+export BUILD_NUMBER=0
+cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSIMGEAR_SHARED:BOOL=ON -DENABLE_TESTS:BOOL=OFF -DFG_DATA_DIR:STRING="/usr/share/flightgear" -DJPEG_FACTORY:BOOL=ON
+make %{?_smp_mflags}
+
+%install
+make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
+# install desktop link
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/
+cp %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications/
+%suse_update_desktop_file -i %{name}
+# move docs into doc/packages subfolder
+mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/FlightGear
+cp README $RPM_BUILD_ROOT/usr/share/doc/packages/FlightGear/.
+cp COPYING $RPM_BUILD_ROOT/usr/share/doc/packages/FlightGear/.
+cp AUTHORS $RPM_BUILD_ROOT/usr/share/doc/packages/FlightGear/.
+# install icon
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
+cp icons/fg-128.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/FlightGear.png
+# remove obsolete/test utilities
+cd $RPM_BUILD_ROOT/usr/bin && rm -f GPSsmooth MIDGsmooth UGsmooth metar
+
+%files
+%defattr(-, root, root, -)
+%dir /usr/share/doc/packages/FlightGear
+/usr/share/doc/packages/FlightGear/*
+%{_bindir}/*
+%_mandir/man1/*
+%{_datadir}/pixmaps/FlightGear.png
+%{_datadir}/applications/%{name}.desktop
+
+%changelog
+* Thu Jun 30 2012 thorstenb@flightgear.org
+- Initial version
+
diff --git a/package/openSUSE/README b/package/openSUSE/README
new file mode 100644 (file)
index 0000000..36f3e1e
--- /dev/null
@@ -0,0 +1,28 @@
+Building a FlightGear RPM package for openSUSE
+
+(Last tested with openSUSE 11.4+12.1)
+
+This directory contains the files which, along with
+the source code tar files, can be used to build
+an RPM package targeted at an openSUSE Linux system.
+
+To build FlightGear from source do the following:
+
+1. obtain flightgear-2.8.0.tar.bz2 (adapt version if
+   necessary) and copy it into ~/rpmbuild/SOURCES
+
+2. copy FlightGear.desktop to ~/rpmbuild/SOURCES
+
+3. obtain (or build) and install SimGear (exact
+   match with FlightGear's version required).
+
+4. look in the BuildRequires section of FlightGear.spec
+   and check that all the packages referred to are
+   installed (note, some of these packages may be part
+   of openSUSE's "games" repository).
+
+5. run 'rpmbuild -ba FlightGear.spec' and find the RPM
+   build result in ~/rpmbuild/RPMS
+
+That's all!
+