9c5b6f9
Name:		FlightGear-data
9c5b6f9
Summary:	FlightGear base scenery and data files
9c5b6f9
Version:	1.9.0
f2ef193
Release:	3%{?dist}
9c5b6f9
9c5b6f9
License:	GPLv2+
9c5b6f9
Group:		Amusements/Games
9c5b6f9
Source0:	ftp://ftp.flightgear.org/pub/fgfs/Shared/FlightGear-data-%{version}.tar.bz2
9c5b6f9
URL:		http://www.flightgear.org/
9c5b6f9
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9c5b6f9
BuildArch:	noarch
9c5b6f9
Obsoletes:	fgfs-base < 1.9.0-1
9c5b6f9
9c5b6f9
%description
9c5b6f9
This package contains the base scenery for FlightGear and must be
9c5b6f9
installed
9c5b6f9
9c5b6f9
%prep
9c5b6f9
9c5b6f9
%build
9c5b6f9
9c5b6f9
%install
9c5b6f9
rm -rf $RPM_BUILD_ROOT
9c5b6f9
install -d $RPM_BUILD_ROOT%{_datadir}/FlightGear
9c5b6f9
tar jxf %{SOURCE0} --strip-components 1 \
9c5b6f9
	-C $RPM_BUILD_ROOT/%{_datadir}/FlightGear
9c5b6f9
9c5b6f9
# cleanup temporary files and fix permissions
9c5b6f9
find $RPM_BUILD_ROOT/%{_datadir}/FlightGear -name '*#*' -exec rm {} \;
9c5b6f9
find $RPM_BUILD_ROOT/%{_datadir}/FlightGear -type f -exec chmod 644 {} \;
9c5b6f9
9c5b6f9
# fix wrong eol encoding on some doc files
9c5b6f9
for f in Docs/FGShortRef.css Docs/README.kln89.html Docs/FGShortRef.html \
9c5b6f9
	Docs/README.submodels Docs/README.yasim Docs/README.xmlparticles
9c5b6f9
do
9c5b6f9
	sed -i 's/\r//' $RPM_BUILD_ROOT/%{_datadir}/FlightGear/$f
9c5b6f9
done
9c5b6f9
9c5b6f9
# remove hidden dirs
9c5b6f9
for d in Aircraft/c172/Panels/Textures/.xvpics \
9c5b6f9
	Textures/Runway/.xvpics
9c5b6f9
do
9c5b6f9
	rm -rf $RPM_BUILD_ROOT/%{_datadir}/FlightGear/$d
9c5b6f9
done
9c5b6f9
9c5b6f9
# fix files not in utf-8
9c5b6f9
for f in Thanks Docs/README.xmlparticles
9c5b6f9
do
9c5b6f9
	path=$RPM_BUILD_ROOT/%{_datadir}/FlightGear/$f
9c5b6f9
	iconv -f iso-8859-1 -t utf-8 -o ${path}.utf8 $path
9c5b6f9
	mv -f ${path}.utf8 ${path}
9c5b6f9
done
9c5b6f9
9c5b6f9
# put documentation and license in the proper location
9c5b6f9
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
9c5b6f9
for f in COPYING AUTHORS NEWS README Thanks Docs
9c5b6f9
do
9c5b6f9
	mv $RPM_BUILD_ROOT/%{_datadir}/FlightGear/$f \
9c5b6f9
		$RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
9c5b6f9
done
9c5b6f9
9c5b6f9
%clean
9c5b6f9
rm -rf $RPM_BUILD_ROOT
9c5b6f9
9c5b6f9
%files
9c5b6f9
%defattr(-, root, root, 0755)
9c5b6f9
%doc %{_docdir}/%{name}-%{version}
9c5b6f9
%{_datadir}/FlightGear
9c5b6f9
9c5b6f9
%changelog
f2ef193
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-3
f2ef193
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f2ef193
2acda2e
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-2
2acda2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2acda2e
9c5b6f9
* Tue Jan 06 2009 Fabrice Bellet <fabrice@bellet.info> 1.9.0-1
9c5b6f9
- new upstream release
9c5b6f9
9c5b6f9
* Mon Jan  7 2008 Fabrice Bellet <fabrice@bellet.info> 1.0.0-1
9c5b6f9
- new upstream release
9c5b6f9
9c5b6f9
* Sun Sep 23 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.2.pre1
9c5b6f9
- update License tag
9c5b6f9
9c5b6f9
* Wed Jun 27 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.11-0.1.pre1
9c5b6f9
- new upstream (pre-)release
9c5b6f9
9c5b6f9
* Sat Apr  7 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-3
9c5b6f9
- use sed instead of dos2unix to correct end-of-line encoding
9c5b6f9
9c5b6f9
* Mon Apr  2 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-2
9c5b6f9
- Move documentation and license to a better place and mark it as %%doc
9c5b6f9
- Fix wrong end-of-line encoding in some doc files
9c5b6f9
9c5b6f9
* Tue Mar 20 2007 Fabrice Bellet <fabrice@bellet.info> 0.9.10-1
9c5b6f9
- Initial packaging