[packages/FlightGear] split data to be noarch subpackage
glen
glen at pld-linux.org
Fri Mar 28 21:14:40 CET 2014
commit 175f976e2cc109c6b39b68ccee64c6dc7778ba08
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Mar 28 22:14:32 2014 +0200
split data to be noarch subpackage
FlightGear.spec | 40 ++++++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 12 deletions(-)
---
diff --git a/FlightGear.spec b/FlightGear.spec
index e614da1..f61d745 100644
--- a/FlightGear.spec
+++ b/FlightGear.spec
@@ -11,28 +11,29 @@ License: GPL
Group: X11/Applications/Games
Source0: ftp://mirrors.ibiblio.org/pub/mirrors/flightgear/ftp/Source/flightgear-%{version}.tar.bz2
# Source0-md5: 23e2de5f311f4cbe94ec3386736ee8a5
-Source1: ftp://flightgear.wo0t.de/ftp/Shared/FlightGear-data-%{version}.tar.bz
+Source1: ftp://flightgear.wo0t.de/ftp/Shared/%{name}-data-%{version}.tar.bz
# Source1-md5: 049cfa1f7bc7de528630c2a41c6ad6eb
#Source2: ftp://ftp.flightgear.org/pub/fgfs/Everything-0.7/Base-Packages/fgfs-docs-0.7.7.tar.gz
## Source2-md5: 31f35d3e63e522565e8990ead99e7507
Patch0: flightgear-cmake.patch
URL: http://www.flightgear.org/
-BuildRequires: fltk-gl-devel
-BuildRequires: cmake
BuildRequires: OpenAL-devel
BuildRequires: OpenGL-devel
BuildRequires: SimGear-devel = %{version}
+BuildRequires: cmake
+BuildRequires: fltk-gl-devel
BuildRequires: freeglut-devel
BuildRequires: libstdc++-devel
BuildRequires: libxml-devel
BuildRequires: plib-devel >= 1.8.5-3
BuildRequires: zlib-devel
+Requires: %{name}-data = %{version}
Requires: OpenGL
Requires: OpenSceneGraph-plugins
Requires: plib >= 1.8.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _noautoreqdep libGL.so.1 libGLU.so.1 libGLcore.so.1
+%define _noautoreqdep libGL.so.1 libGLU.so.1 libGLcore.so.1
%description
The Flight Gear project is working to create a sophisticated flight
@@ -44,29 +45,41 @@ be expanded and improved upon by anyone interested in contributing.
Projekt Flight Gear to wyrafinowany symulator lotów pozwalający
rozpowszechniać idee tego typu symulacji.
+%package data
+Summary: FlightGear base scenery and data files
+License: GPL v2+
+Group: Applications/Games
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description data
+This package contains the base scenery for FlightGear and must be
+installed
+
%prep
%setup -q -n flightgear-%{version} -a 1
%patch0 -p1
-find %{name} -name 'CVS' -type d | xargs rm -rf
+cat > runfgfs <<'EOF'
+#!/bin/sh
+exec %{_bindir}/fgfs --fg-root=%{_datadir}/games/%{name}/fgdata "$@"
+EOF
%build
install -d build
cd build
-%cmake ../
+%cmake ..
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/games/%{name}
-
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-echo "#!/bin/sh" > runfgfs
-echo "exec %{_bindir}/fgfs --fg-root=%{_datadir}/games/%{name}/fgdata \$*" >> runfgfs
-install runfgfs $RPM_BUILD_ROOT%{_bindir}
-cp -R fgdata $RPM_BUILD_ROOT%{_datadir}/games/%{name}
+install -p runfgfs $RPM_BUILD_ROOT%{_bindir}
+cp -a fgdata $RPM_BUILD_ROOT%{_datadir}/games/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -75,5 +88,8 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc AUTHORS NEWS docs-mini/*
%attr(755,root,root) %{_bindir}/*
-%{_datadir}/games/%{name}
%{_mandir}/*/*
+
+%files data
+%defattr(644,root,root,755)
+%{_datadir}/games/%{name}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/FlightGear.git/commitdiff/175f976e2cc109c6b39b68ccee64c6dc7778ba08
More information about the pld-cvs-commit
mailing list