mirror of https://github.com/OpenTTD/OpenTTD
(svn r14507) -Codechange: Update the RPM spec file (futher changes are expected till 0.7)
parent
639f9d8305
commit
0c253041bd
|
@ -1,75 +1,176 @@
|
||||||
|
# $id$
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# spec file for the openttd rpm package
|
||||||
#
|
#
|
||||||
# spec file for package openttd (trunk)
|
# Copyright (c) 2007-2008 The OpenTTD developers
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 The OpenTTD team.
|
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
# package are under the same license as the package itself
|
# package are under the same license as the package itself
|
||||||
#
|
#
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Name: openttd
|
Name: openttd
|
||||||
Version: svn
|
Version: 0.7.0
|
||||||
Release: head
|
Release: 1%{?dist}
|
||||||
Group: Applications/Games
|
|
||||||
Source: %{name}-%{version}-%{release}.tar.gz
|
Group: Amusements/Games
|
||||||
License: GPL
|
License: GPLv2
|
||||||
URL: http://www.openttd.org
|
URL: http://www.openttd.org
|
||||||
Packager: Denis Burlaka <burlaka@yandex.ru>
|
|
||||||
Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe
|
Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe
|
||||||
Requires: SDL zlib libpng freetype2 fontconfig
|
|
||||||
BuildRequires: gcc SDL-devel zlib-devel libpng-devel fontconfig-devel
|
Source: %{name}-%{version}.tar.bz2
|
||||||
%if %{_vendor}=="suse"
|
|
||||||
BuildRequires: freetype2-devel
|
Requires: fontconfig
|
||||||
%endif
|
Requires: libicu
|
||||||
%if %{_vendor}=="fedora"
|
Requires: libpng
|
||||||
|
Requires: SDL
|
||||||
|
Requires: zlib
|
||||||
|
BuildRequires: fontconfig-devel
|
||||||
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: libicu-devel
|
||||||
|
BuildRequires: SDL-devel
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
# vendor specific dependencies
|
||||||
|
%if %{_vendor}=="alt"
|
||||||
|
Requires: freetype
|
||||||
BuildRequires: freetype-devel
|
BuildRequires: freetype-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{_vendor}=="mandriva"
|
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
|
||||||
|
Requires: freetype2
|
||||||
BuildRequires: libfreetype6-devel
|
BuildRequires: libfreetype6-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
|
||||||
|
Requires: freetype
|
||||||
|
BuildRequires: freetype-devel
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
%endif
|
||||||
|
%if %{_vendor}=="suse"
|
||||||
|
Requires: freetype2
|
||||||
|
BuildRequires: freetype2-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||||
Prefix: /usr
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OpenTTD is a clone of the Microprose game "Transport Tycoon Deluxe", a popular game originally written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features.
|
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
|
||||||
|
the following 6 data files from your Transport Tycoon Deluxe CD to the game
|
||||||
|
data directory in %{_datadir}/games/%{name}/data:
|
||||||
|
|
||||||
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 download of the game.
|
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
|
||||||
|
information, see the file 'COPYING' included with every release and source
|
||||||
|
download of the game.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --prefix-dir=%{prefix} --binary-dir=bin --install-dir="$RPM_BUILD_ROOT"
|
./configure \
|
||||||
make
|
--revision=%{version} \
|
||||||
|
--prefix-dir="%{_prefix}" \
|
||||||
|
--binary-dir="bin" \
|
||||||
|
--binary-name="%{name}" \
|
||||||
|
# --menu-name="OpenTTD" \
|
||||||
|
# --data-dir="share\games\%{name}" \
|
||||||
|
# --doc-dir="share\doc\%{name}" \
|
||||||
|
# --icon-dir="share/pixmaps" \
|
||||||
|
# --icon-theme-dir="share/icons/hicolor" \
|
||||||
|
# --man-dir="share/man/man6" \
|
||||||
|
# --menu-dir="share/applications" \
|
||||||
|
--enable-debug=0 \
|
||||||
|
# --menu_group="Game;" \
|
||||||
|
--with-sdl \
|
||||||
|
--with-zlib \
|
||||||
|
--with-png \
|
||||||
|
--with-freetype \
|
||||||
|
--with-fontconfig \
|
||||||
|
--with-icu \
|
||||||
|
--enable-strip
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make ROOT="$RPM_BUILD_ROOT" install
|
rm -rf "%{buildroot}"
|
||||||
|
make install INSTALL_DIR="%{buildroot}"
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
|
# Validate menu entrys (vendor specific)
|
||||||
cat << EOF > $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
|
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||||
[Desktop Entry]
|
desktop-file-install \
|
||||||
Categories=Games;
|
# --delete-original \
|
||||||
Encoding=UTF-8
|
--vendor="%{_vendor}" \
|
||||||
Exec=/usr/bin/openttd
|
--remove-key Version \
|
||||||
Name=OpenTTD
|
--dir="%{buildroot}/%{_datadir}/applications/" \
|
||||||
Icon=openttd.32
|
"%{buildroot}/%{_datadir}/applications/%{name}.desktop"
|
||||||
Terminal=false
|
%endif
|
||||||
Type=Application
|
|
||||||
EOF
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -Rf "$RPM_BUILD_ROOT"
|
rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%post
|
||||||
|
# Update the icon cache (vendor specific)
|
||||||
|
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
|
||||||
|
%update_icon_cache hicolor
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||||
|
touch --no-create %{_datadir}/icons/hicolor
|
||||||
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||||
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%postun
|
||||||
|
# Update the icon cache (vendor specific)
|
||||||
|
%if %{_vendor}=="MandrakeSoft" || %{_vendor}=="mandriva"
|
||||||
|
%update_icon_cache hicolor
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{_vendor} == "redhat" || %{_vendor}=="fedora"
|
||||||
|
touch --no-create %{_datadir}/icons/hicolor
|
||||||
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||||
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%defattr(-, root, games, -)
|
||||||
|
%dir %{_datadir}/doc/%{name}
|
||||||
%dir %{_datadir}/games/%{name}
|
%dir %{_datadir}/games/%{name}
|
||||||
%dir %{_datadir}/games/%{name}/lang
|
%dir %{_datadir}/games/%{name}/lang
|
||||||
%dir %{_datadir}/games/%{name}/data
|
%dir %{_datadir}/games/%{name}/data
|
||||||
%dir %{_datadir}/games/%{name}/gm
|
%dir %{_datadir}/games/%{name}/gm
|
||||||
%dir %{_datadir}/games/%{name}/docs
|
|
||||||
%dir %{_datadir}/pixmaps
|
|
||||||
%defattr(644, root, games, 755)
|
|
||||||
%attr(755, root, games) %{_bindir}/%{name}
|
%attr(755, root, games) %{_bindir}/%{name}
|
||||||
|
%{_datadir}/doc/%{name}/*
|
||||||
%{_datadir}/games/%{name}/lang/*
|
%{_datadir}/games/%{name}/lang/*
|
||||||
%{_datadir}/games/%{name}/data/*
|
%{_datadir}/games/%{name}/data/*
|
||||||
%{_datadir}/games/%{name}/docs/*
|
|
||||||
%{_datadir}/pixmaps/*
|
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
|
%{_datadir}/pixmaps/*
|
||||||
|
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||||
|
%doc %{_mandir}/man6/%{name}.6.gz
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Oct 20 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||||
|
|
||||||
|
- Added libicu dependency
|
||||||
|
|
||||||
|
* Thu Sep 23 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||||
|
|
||||||
|
- Merged both versions of the spec file
|
||||||
|
|
||||||
|
* Fri Aug 29 2008 Jonathan Coome <maedhros@openttd.org>
|
||||||
|
|
||||||
|
- Rewrite spec file from scratch.
|
||||||
|
|
||||||
|
* Sat Aug 02 2008 Benedikt Brüggemeier <skidd13@openttd.org>
|
||||||
|
|
||||||
|
- Updated spec file
|
||||||
|
|
||||||
|
* Thu Mar 27 2008 Denis Burlaka <burlaka@yandex.ru>
|
||||||
|
|
||||||
|
- Universal spec file
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue