]> git.mxchange.org Git - simgear.git/commitdiff
Add SimGear RPM package spec file.
authorThorstenB <brehmt@gmail.com>
Mon, 2 Jul 2012 19:51:40 +0000 (21:51 +0200)
committerThorstenB <brehmt@gmail.com>
Mon, 2 Jul 2012 19:51:40 +0000 (21:51 +0200)
Example for Linux package builders.

.gitignore
package/RedHat/README [new file with mode: 0644]
package/openSUSE/README [new file with mode: 0644]
package/openSUSE/SimGear.spec [new file with mode: 0644]

index a6fdabb3b2414fd9ee48016b2e541cf92ee9c1c5..0c9d97838fcb138b41a0919f3d7a5376a1143637 100644 (file)
@@ -1,5 +1,4 @@
 Makefile
-SimGear.spec
 *.o
 lib*.a
 .*.swp
diff --git a/package/RedHat/README b/package/RedHat/README
new file mode 100644 (file)
index 0000000..e034f93
--- /dev/null
@@ -0,0 +1,13 @@
+Building a SimGear RPM package for Red Hat
+
+Please see the "package/openSUSE" directory for an
+example how to build a SimGear RPM package with
+shared SimGear libraries.
+
+You may need to adapt the names (exact spelling) of some
+of the package dependencies in the openSUSE RPM spec,
+since these may slightly differ for Red Hat.
+
+(If you have a working and tested Red Hat RPM spec,
+you're welcome to contribute it to this project.)
+
diff --git a/package/openSUSE/README b/package/openSUSE/README
new file mode 100644 (file)
index 0000000..1151720
--- /dev/null
@@ -0,0 +1,23 @@
+Building a SimGear 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 SimGear from source do the following:
+
+1. obtain simgear-2.8.0.tar.bz2 (adapt version if
+    necessary) and copy it into ~/rpmbuild/SOURCES
+
+2. look in the BuildRequires section of SimGear.spec
+   and check that all the packages referred to are
+   installed (note, some of these packages may be part
+   of openSUSE's "games" repository).
+
+3. run 'rpmbuild -ba simgear.spec' and find the RPM
+   build result in ~/rpmbuild/RPMS
+
+That's all!
+
diff --git a/package/openSUSE/SimGear.spec b/package/openSUSE/SimGear.spec
new file mode 100644 (file)
index 0000000..50c3fdd
--- /dev/null
@@ -0,0 +1,66 @@
+Summary:    Simulator Construction Gear
+Name:       SimGear
+Version:    2.8.0
+Release:    1
+License:    LGPL
+URL:        http://www.flightgear.org
+Group:      Amusements/Games/3D/Simulation
+Source:     http://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/simgear-%{version}.tar.bz2
+BuildRoot:  %{_tmppath}/%{name}-%{version}-build
+
+BuildRequires: gcc, gcc-c++, cmake
+BuildRequires: freealut, freealut-devel
+BuildRequires: libopenal1-soft, openal-soft
+BuildRequires: plib-devel >= 1.8.5
+BuildRequires: libOpenSceneGraph-devel >= 3.0
+BuildRequires: zlib, zlib-devel
+BuildRequires: libjpeg62, libjpeg62-devel
+BuildRequires: boost-devel >= 1.37
+BuildRequires: subversion-devel, libapr1-devel
+Requires:      OpenSceneGraph-plugins >= 3.0
+
+%description
+This package contains a tools and libraries useful for constructing
+simulation and visualization applications such as FlightGear or TerraGear.
+
+%package devel
+Group:         Development/Libraries/Other
+Summary:       Development header files for SimGear
+Requires:      SimGear = %{version}
+Requires:      plib-devel
+
+%description devel
+Development headers and libraries for building applications against SimGear.
+
+%prep
+%setup -T -q -n simgear-%{version} -b 0
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS"
+# build SHARED simgear libraries
+cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSIMGEAR_SHARED:BOOL=ON -DENABLE_TESTS:BOOL=OFF -DJPEG_FACTORY:BOOL=ON
+make %{?_smp_mflags}
+
+%install
+make DESTDIR=%{buildroot} install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr (-, root, root, -)
+%doc AUTHORS COPYING ChangeLog NEWS README
+%{_libdir}/libSimGear*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%dir %{_includedir}/simgear
+%{_includedir}/simgear/*
+%{_libdir}/libSimGear*.so
+
+%changelog
+* Mon Jul 02 2012 thorstenb@flightgear.org
+- Initial version
+