|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
#
|
|
|
|
|
# spec file for package FlightGear-data
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
@@ -16,24 +16,40 @@
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%define main_version 2016.4
|
|
|
|
|
Name: FlightGear-data
|
|
|
|
|
Version: 2016.2.1
|
|
|
|
|
Version: %{main_version}.4
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: FlightGear base scenery and data files
|
|
|
|
|
License: GPL-2.0
|
|
|
|
|
Group: Amusements/Games/3D/Simulation
|
|
|
|
|
Url: http://www.flightgear.org/
|
|
|
|
|
Source0: http://downloads.sourceforge.net/project/flightgear/release-2016.2/FlightGear-%{version}-data.tar.bz2
|
|
|
|
|
Source0: http://downloads.sourceforge.net/project/flightgear/release-%{main_version}/FlightGear-%{version}-data.tar.bz2
|
|
|
|
|
# Remove warnings about hidden files to make other rpmlint warnings readable.
|
|
|
|
|
Source1: FlightGear-data-rpmlintrc
|
|
|
|
|
NoSource: 0
|
|
|
|
|
BuildRequires: dos2unix
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-xml
|
|
|
|
|
BuildRequires: texlive-latex-bin-bin
|
|
|
|
|
BuildRequires: xz
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
Recommends: FlightGear-docs-%{version}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This package contains the base scenery and aircraft for FlightGear.
|
|
|
|
|
It must be installed together with the FlightGear flight simulator package.
|
|
|
|
|
|
|
|
|
|
%package -n FlightGear-docs
|
|
|
|
|
Summary: FlightGear Documentation
|
|
|
|
|
Group: Documentation
|
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
|
|
%description -n FlightGear-docs
|
|
|
|
|
This package contains pdf, text and html documentation for the
|
|
|
|
|
FlightGear flight simulator package.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
@@ -44,26 +60,50 @@ cd %{buildroot}%{_datadir}/flightgear
|
|
|
|
|
tar -jxf %{SOURCE0} --strip-components 1
|
|
|
|
|
|
|
|
|
|
# cleanup temporary files and fix permissions
|
|
|
|
|
find "(" -name '.gitignore' -name '*#*' -o -name "*.bak" ")" -delete
|
|
|
|
|
find -type f -exec chmod 0644 "{}" "+"
|
|
|
|
|
|
|
|
|
|
find %{buildroot}%{_datadir}/flightgear -name '.git*' -print -delete -name '*#*' -print -delete -name "*.bak" -print -delete
|
|
|
|
|
dos2unix -c ascii Docs/model-combined.eff/README.model-combined.eff
|
|
|
|
|
# fix files not in utf-8
|
|
|
|
|
for path in Thanks Docs/README.xmlparticles; do
|
|
|
|
|
for path in Thanks Docs/README.xmlparticles ; do
|
|
|
|
|
iconv -f iso-8859-1 -t utf-8 -o "$path.utf8" "$path"
|
|
|
|
|
mv -f "$path.utf8" "$path"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# put documentation and license in the proper location
|
|
|
|
|
# Create html documentation and remove executable
|
|
|
|
|
cd Docs
|
|
|
|
|
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
|
|
|
|
|
./compile_docs.py
|
|
|
|
|
%endif
|
|
|
|
|
rm -f compile_docs.py
|
|
|
|
|
cd ../
|
|
|
|
|
# Move docs to default docdir
|
|
|
|
|
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
|
|
|
|
|
mv %{buildroot}%{_datadir}/flightgear/Docs %{buildroot}%{_defaultdocdir}/%{name}/
|
|
|
|
|
|
|
|
|
|
find %{buildroot}%{_datadir}/flightgear -type f -exec chmod 0644 "{}" "+"
|
|
|
|
|
#Change permissions back for executable scripts
|
|
|
|
|
chmod -f 0755 `find %{buildroot}%{_datadir}/flightgear -type f -perm 0644 -print0|xargs -0r grep -l '#!/usr'`
|
|
|
|
|
chmod -f 0755 `find %{buildroot}%{_datadir}/flightgear -type f -perm 0644 -print0|xargs -0r grep -l '#!/bin'`
|
|
|
|
|
|
|
|
|
|
# put documentation and license in the proper location
|
|
|
|
|
for f in COPYING AUTHORS NEWS README Thanks; do
|
|
|
|
|
mv "$f" "%{buildroot}%{_defaultdocdir}/%{name}"
|
|
|
|
|
done
|
|
|
|
|
# Move additional license files to docs See boo#987206
|
|
|
|
|
mv %{buildroot}%{_datadir}/flightgear/Fonts/LiberationFonts/COPYING %{buildroot}%{_defaultdocdir}/%{name}/COPYING-LiberationFonts
|
|
|
|
|
mv %{buildroot}%{_datadir}/flightgear/AI/Aircraft/A330-MRTT/COPYING %{buildroot}%{_defaultdocdir}/%{name}/COPYING-A330-MRTT
|
|
|
|
|
|
|
|
|
|
%fdupes %{buildroot}/%{_datadir}
|
|
|
|
|
# Zero length files in docs can be deleted
|
|
|
|
|
find %{buildroot}%{_defaultdocdir}/%{name} -type f -empty -print -delete
|
|
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}/%{_datadir}/flightgear
|
|
|
|
|
%fdupes -s %{buildroot}%{_defaultdocdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc %{_defaultdocdir}/%{name}
|
|
|
|
|
%{_datadir}/flightgear/
|
|
|
|
|
|
|
|
|
|
%files -n FlightGear-docs
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc %{_defaultdocdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|