From: ThorstenB Date: Mon, 2 Jul 2012 19:51:40 +0000 (+0200) Subject: Add SimGear RPM package spec file. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=edcbfb52eb6a1aabf678d56b2803a193501489fe;p=simgear.git Add SimGear RPM package spec file. Example for Linux package builders. --- diff --git a/.gitignore b/.gitignore index a6fdabb3..0c9d9783 100644 --- a/.gitignore +++ b/.gitignore @@ -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 index 00000000..e034f938 --- /dev/null +++ b/package/RedHat/README @@ -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 index 00000000..11517209 --- /dev/null +++ b/package/openSUSE/README @@ -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 index 00000000..50c3fdd1 --- /dev/null +++ b/package/openSUSE/SimGear.spec @@ -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 +