(svn r17666) -Fix [FS#3193]: RPM spec failed for SUSE (Ammler)
This commit is contained in:
		@@ -24,10 +24,9 @@ Summary:       OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoo
 | 
				
			|||||||
Source:        %{name}-%{version}-source.tar.bz2
 | 
					Source:        %{name}-%{version}-source.tar.bz2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Requires:      fontconfig
 | 
					Requires:      fontconfig
 | 
				
			||||||
Requires:      libicu
 | 
					 | 
				
			||||||
Requires:      libpng
 | 
					 | 
				
			||||||
Requires:      SDL
 | 
					Requires:      SDL
 | 
				
			||||||
Requires:      zlib
 | 
					Requires:      zlib
 | 
				
			||||||
 | 
					BuildRequires: gcc-c++
 | 
				
			||||||
BuildRequires: fontconfig-devel
 | 
					BuildRequires: fontconfig-devel
 | 
				
			||||||
BuildRequires: libpng-devel
 | 
					BuildRequires: libpng-devel
 | 
				
			||||||
BuildRequires: libicu-devel
 | 
					BuildRequires: libicu-devel
 | 
				
			||||||
@@ -38,33 +37,32 @@ BuildRequires: zlib-devel
 | 
				
			|||||||
Requires:      freetype
 | 
					Requires:      freetype
 | 
				
			||||||
BuildRequires: freetype-devel
 | 
					BuildRequires: freetype-devel
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
 | 
					 | 
				
			||||||
Requires:      freetype2
 | 
					 | 
				
			||||||
BuildRequires: libfreetype6-devel
 | 
					 | 
				
			||||||
%endif
 | 
					 | 
				
			||||||
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
 | 
					%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
 | 
				
			||||||
Requires:      freetype
 | 
					Requires:      freetype
 | 
				
			||||||
BuildRequires: freetype-devel
 | 
					BuildRequires: freetype-devel
 | 
				
			||||||
BuildRequires: desktop-file-utils
 | 
					BuildRequires: desktop-file-utils
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
%if %{_vendor}=="suse"
 | 
					%if %{_vendor}=="suse" || %{_vendor}=="mandriva"
 | 
				
			||||||
Requires:      freetype2
 | 
					Requires:      freetype2
 | 
				
			||||||
BuildRequires: freetype2-devel
 | 
					BuildRequires: freetype2-devel
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
 | 
					%if %{_vendor}=="suse"
 | 
				
			||||||
 | 
					BuildRequires: update-desktop-files
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# recommends works for suse (not sles9) and mandriva, only
 | 
				
			||||||
 | 
					%if 0%{?suse_version} > 910  || %{_vendor}=="mandriva"
 | 
				
			||||||
 | 
					Recommends:	opengfx
 | 
				
			||||||
 | 
					# for 0.8.0
 | 
				
			||||||
 | 
					#Recommends:	opensfx
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 | 
					BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%description
 | 
					%description
 | 
				
			||||||
OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe"
 | 
					OpenTTD is a reimplementation of the Microprose game "Transport Tycoon Deluxe"
 | 
				
			||||||
with lots of new features and enhancements. To play the game you need to copy
 | 
					with lots of new features and enhancements. To play the game you need either
 | 
				
			||||||
the following 6 data files from your Transport Tycoon Deluxe CD to the game
 | 
					the original data from the game or install the recommend package OpenGFX.
 | 
				
			||||||
data directory in %{_datadir}/games/%{name}/data:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
From the Windows version of TTD you need:
 | 
					 | 
				
			||||||
sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Or if you have the DOS version you need:
 | 
					 | 
				
			||||||
sample.cat TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
OpenTTD is licensed under the GNU General Public License version 2.0. For more
 | 
					OpenTTD is licensed under the GNU General Public License version 2.0. For more
 | 
				
			||||||
information, see the file 'COPYING' included with every release and source
 | 
					information, see the file 'COPYING' included with every release and source
 | 
				
			||||||
@@ -74,22 +72,29 @@ download of the game.
 | 
				
			|||||||
%setup -q
 | 
					%setup -q
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
 | 
					# suse sle <10 has no support for makedepend
 | 
				
			||||||
 | 
					%if 0%{?sles_version} == 9 || 0%{?sles_version} == 10
 | 
				
			||||||
 | 
					%define 	do_makedepend	0
 | 
				
			||||||
 | 
					%else
 | 
				
			||||||
 | 
					%define 	do_makedepend	1
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
./configure \
 | 
					./configure \
 | 
				
			||||||
	--revision=%{version} \
 | 
					 | 
				
			||||||
	--prefix-dir="%{_prefix}" \
 | 
						--prefix-dir="%{_prefix}" \
 | 
				
			||||||
	--binary-dir="bin" \
 | 
					 | 
				
			||||||
	--binary-name="%{name}" \
 | 
						--binary-name="%{name}" \
 | 
				
			||||||
	--enable-debug=0 \
 | 
					 | 
				
			||||||
	--with-sdl \
 | 
					 | 
				
			||||||
	--with-zlib \
 | 
					 | 
				
			||||||
	--with-png \
 | 
					 | 
				
			||||||
	--with-freetype \
 | 
					 | 
				
			||||||
	--with-fontconfig \
 | 
					 | 
				
			||||||
	--with-icu \
 | 
					 | 
				
			||||||
	--enable-strip \
 | 
						--enable-strip \
 | 
				
			||||||
 | 
						--binary-dir="bin" \
 | 
				
			||||||
 | 
						--data-dir="share/%{name}" \
 | 
				
			||||||
 | 
						--with-makedepend="%{do_makedepend}" \
 | 
				
			||||||
 | 
					#	--revision="%{ver}%{?prever:-%{prever}}" \
 | 
				
			||||||
 | 
					#	--enable-debug=0 \
 | 
				
			||||||
 | 
					#	--with-sdl \
 | 
				
			||||||
 | 
					#	--with-zlib \
 | 
				
			||||||
 | 
					#	--with-png \
 | 
				
			||||||
 | 
					#	--with-freetype \
 | 
				
			||||||
 | 
					#	--with-fontconfig \
 | 
				
			||||||
 | 
					#	--with-icu \
 | 
				
			||||||
#	--menu_group="Game;" \
 | 
					#	--menu_group="Game;" \
 | 
				
			||||||
#	--menu-name="OpenTTD" \
 | 
					#	--menu-name="OpenTTD" \
 | 
				
			||||||
#	--data-dir="share\games\%{name}" \
 | 
					 | 
				
			||||||
#	--doc-dir="share\doc\%{name}" \
 | 
					#	--doc-dir="share\doc\%{name}" \
 | 
				
			||||||
#	--icon-dir="share/pixmaps" \
 | 
					#	--icon-dir="share/pixmaps" \
 | 
				
			||||||
#	--icon-theme-dir="share/icons/hicolor" \
 | 
					#	--icon-theme-dir="share/icons/hicolor" \
 | 
				
			||||||
@@ -99,7 +104,6 @@ download of the game.
 | 
				
			|||||||
make %{?_smp_mflags}
 | 
					make %{?_smp_mflags}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%install
 | 
					%install
 | 
				
			||||||
rm -rf "%{buildroot}"
 | 
					 | 
				
			||||||
make install INSTALL_DIR="%{buildroot}"
 | 
					make install INSTALL_DIR="%{buildroot}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Validate menu entrys (vendor specific)
 | 
					# Validate menu entrys (vendor specific)
 | 
				
			||||||
@@ -111,13 +115,28 @@ desktop-file-install \
 | 
				
			|||||||
	"%{buildroot}/%{_datadir}/applications/%{name}.desktop" \
 | 
						"%{buildroot}/%{_datadir}/applications/%{name}.desktop" \
 | 
				
			||||||
#	--delete-original
 | 
					#	--delete-original
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
 | 
					%if %{_vendor}=="suse"
 | 
				
			||||||
 | 
					%__cat > %{name}.desktop << EOF
 | 
				
			||||||
 | 
					[Desktop Entry]
 | 
				
			||||||
 | 
					Encoding=UTF-8
 | 
				
			||||||
 | 
					Name=OpenTTD
 | 
				
			||||||
 | 
					Comment=OpenTTD - A clone of the Microprose game 'Transport Tycoon Deluxe'
 | 
				
			||||||
 | 
					GenericName=OpenTTD
 | 
				
			||||||
 | 
					Type=Application
 | 
				
			||||||
 | 
					Terminal=false
 | 
				
			||||||
 | 
					Exec=%{name}
 | 
				
			||||||
 | 
					Icon=%{name}
 | 
				
			||||||
 | 
					Categories=Game;StrategyGame;
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					%suse_update_desktop_file -i %{name} Game StrategyGame
 | 
				
			||||||
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%clean
 | 
					%clean
 | 
				
			||||||
rm -rf "%{buildroot}"
 | 
					#rm -rf "%{buildroot}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%post
 | 
					%post
 | 
				
			||||||
# Update the icon cache (vendor specific)
 | 
					# Update the icon cache (vendor specific)
 | 
				
			||||||
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
 | 
					%if %{_vendor}=="mandriva"
 | 
				
			||||||
%update_icon_cache hicolor
 | 
					%update_icon_cache hicolor
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -130,7 +149,7 @@ fi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
%postun
 | 
					%postun
 | 
				
			||||||
# Update the icon cache (vendor specific)
 | 
					# Update the icon cache (vendor specific)
 | 
				
			||||||
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
 | 
					%if %{_vendor}=="mandriva"
 | 
				
			||||||
%update_icon_cache hicolor
 | 
					%update_icon_cache hicolor
 | 
				
			||||||
%endif
 | 
					%endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -144,38 +163,39 @@ fi
 | 
				
			|||||||
%files
 | 
					%files
 | 
				
			||||||
%defattr(-, root, games, -)
 | 
					%defattr(-, root, games, -)
 | 
				
			||||||
%dir %{_datadir}/doc/%{name}
 | 
					%dir %{_datadir}/doc/%{name}
 | 
				
			||||||
%dir %{_datadir}/games/%{name}
 | 
					%dir %{_datadir}/%{name}
 | 
				
			||||||
%dir %{_datadir}/games/%{name}/lang
 | 
					%dir %{_datadir}/%{name}/lang
 | 
				
			||||||
%dir %{_datadir}/games/%{name}/data
 | 
					%dir %{_datadir}/%{name}/data
 | 
				
			||||||
%dir %{_datadir}/games/%{name}/gm
 | 
					%dir %{_datadir}/%{name}/gm
 | 
				
			||||||
 | 
					%dir %{_datadir}/%{name}/scripts
 | 
				
			||||||
%attr(755, root, games) %{_bindir}/%{name}
 | 
					%attr(755, root, games) %{_bindir}/%{name}
 | 
				
			||||||
%{_datadir}/doc/%{name}/*
 | 
					%{_datadir}/doc/%{name}/*
 | 
				
			||||||
%{_datadir}/games/%{name}/lang/*
 | 
					%{_datadir}/%{name}/lang/*
 | 
				
			||||||
%{_datadir}/games/%{name}/data/*
 | 
					%{_datadir}/%{name}/data/*
 | 
				
			||||||
%{_datadir}/games/%{name}/scripts/*
 | 
					%{_datadir}/%{name}/scripts/*
 | 
				
			||||||
%{_datadir}/applications/*%{name}.desktop
 | 
					%{_datadir}/applications/*%{name}.desktop
 | 
				
			||||||
%{_datadir}/pixmaps/*
 | 
					%{_datadir}/pixmaps/*
 | 
				
			||||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
 | 
					%{_datadir}/icons/*
 | 
				
			||||||
%doc %{_mandir}/man6/%{name}.6.gz
 | 
					%doc %{_mandir}/man6/%{name}.6.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%changelog
 | 
					%changelog
 | 
				
			||||||
* Mon Oct 20 2008 Benedikt Brüggemeier <skidd13@openttd.org>
 | 
					* Sat Sep 26 2009 Marcel Gmür <ammler@openttdcoop.org> - 0.7.2
 | 
				
			||||||
 | 
					- no subfolder games for datadir
 | 
				
			||||||
 | 
					- cleanup: no post and postun anymore
 | 
				
			||||||
 | 
					- Recommends: opengfx (for suse and mandriva)
 | 
				
			||||||
 | 
					- add SUSE support
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Mon Oct 20 2008 Benedikt Brüggemeier <skidd13@openttd.org>
 | 
				
			||||||
- Added libicu dependency
 | 
					- Added libicu dependency
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Thu Sep 23 2008 Benedikt Brüggemeier <skidd13@openttd.org>
 | 
					* Thu Sep 23 2008 Benedikt Brüggemeier <skidd13@openttd.org>
 | 
				
			||||||
 | 
					 | 
				
			||||||
- Merged both versions of the spec file
 | 
					- Merged both versions of the spec file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Fri Aug 29 2008 Jonathan Coome <maedhros@openttd.org>
 | 
					* Fri Aug 29 2008 Jonathan Coome <maedhros@openttd.org>
 | 
				
			||||||
 | 
					 | 
				
			||||||
- Rewrite spec file from scratch.
 | 
					- Rewrite spec file from scratch.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Sat Aug 02 2008 Benedikt Brüggemeier <skidd13@openttd.org>
 | 
					* Sat Aug 02 2008 Benedikt Brüggemeier <skidd13@openttd.org>
 | 
				
			||||||
 | 
					 | 
				
			||||||
- Updated spec file
 | 
					- Updated spec file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Thu Mar 27 2008 Denis Burlaka <burlaka@yandex.ru>
 | 
					* Thu Mar 27 2008 Denis Burlaka <burlaka@yandex.ru>
 | 
				
			||||||
 | 
					 | 
				
			||||||
- Universal spec file
 | 
					- Universal spec file
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user