Blob Blame History Raw
Name:		FlightGear-data
Summary:	FlightGear base scenery and data files
Version:	1.9.0
Release:	3%{?dist}

License:	GPLv2+
Group:		Amusements/Games
Source0:	ftp://ftp.flightgear.org/pub/fgfs/Shared/FlightGear-data-%{version}.tar.bz2
URL:		http://www.flightgear.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
Obsoletes:	fgfs-base < 1.9.0-1

%description
This package contains the base scenery for FlightGear and must be
installed

%prep

%build

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/FlightGear
tar jxf %{SOURCE0} --strip-components 1 \
	-C $RPM_BUILD_ROOT/%{_datadir}/FlightGear

# cleanup temporary files and fix permissions
find $RPM_BUILD_ROOT/%{_datadir}/FlightGear -name '*#*' -exec rm {} \;
find $RPM_BUILD_ROOT/%{_datadir}/FlightGear -type f -exec chmod 644 {} \;

# fix wrong eol encoding on some doc files
for f in Docs/FGShortRef.css Docs/README.kln89.html Docs/FGShortRef.html \
	Docs/README.submodels Docs/README.yasim Docs/README.xmlparticles
do
	sed -i 's/\r//' $RPM_BUILD_ROOT/%{_datadir}/FlightGear/$f
done

# remove hidden dirs
for d in Aircraft/c172/Panels/Textures/.xvpics \
	Textures/Runway/.xvpics
do
	rm -rf $RPM_BUILD_ROOT/%{_datadir}/FlightGear/$d
done

# fix files not in utf-8
for f in Thanks Docs/README.xmlparticles
do
	path=$RPM_BUILD_ROOT/%{_datadir}/FlightGear/$f
	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
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
for f in COPYING AUTHORS NEWS README Thanks Docs
do
	mv $RPM_BUILD_ROOT/%{_datadir}/FlightGear/$f \
		$RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
done

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root, 0755)
%doc %{_docdir}/%{name}-%{version}
%{_datadir}/FlightGear

%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jan 06 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.0-1
- new upstream release

* Mon Jan  7 2008 Fabrice Bellet <fabrice@bellet.info> 1.0.0-1
- new upstream release

* Sun Sep 23 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.2.pre1
- update License tag

* Wed Jun 27 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.1.pre1
- new upstream (pre-)release

* Sat Apr  7 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-3
- use sed instead of dos2unix to correct end-of-line encoding

* Mon Apr  2 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-2
- Move documentation and license to a better place and mark it as %%doc
- Fix wrong end-of-line encoding in some doc files

* Tue Mar 20 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-1
- Initial packaging