summaryrefslogtreecommitdiff
path: root/os/rpm
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-03-27 16:09:15 +0000
committerrubidium <rubidium@openttd.org>2008-03-27 16:09:15 +0000
commitb88882c2fa46e65b399b73d4de647217d1ae8965 (patch)
treeddbdf7fb1c8727c30e73d0418de3c5eb04812c32 /os/rpm
parent692ac966254dce0bd4a47cfb3163981f7e39db45 (diff)
downloadopenttd-b88882c2fa46e65b399b73d4de647217d1ae8965.tar.xz
(svn r12448) -Change: add a spec file for RPMs. The spec file replaces the SuSE and Mandrake versions as these distributions are also supported by the new spec file. New spec file by Denis Burlaka.
Diffstat (limited to 'os/rpm')
-rw-r--r--os/rpm/openttd.spec75
1 files changed, 75 insertions, 0 deletions
diff --git a/os/rpm/openttd.spec b/os/rpm/openttd.spec
new file mode 100644
index 000000000..c505453fb
--- /dev/null
+++ b/os/rpm/openttd.spec
@@ -0,0 +1,75 @@
+#
+# spec file for package openttd (trunk)
+#
+# Copyright (c) 2007 The OpenTTD team.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself
+#
+Name: openttd
+Version: svn
+Release: head
+Group: Applications/Games
+Source: %{name}-%{version}-%{release}.tar.gz
+License: GPL
+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
+Requires: SDL zlib libpng freetype2 fontconfig
+BuildRequires: gcc SDL-devel zlib-devel libpng-devel fontconfig-devel
+%if %{_vendor}=="suse"
+BuildRequires: freetype2-devel
+%endif
+%if %{_vendor}=="fedora"
+BuildRequires: freetype-devel
+%endif
+%if %{_vendor}=="mandriva"
+BuildRequires: libfreetype6-devel
+%endif
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Prefix: /usr
+
+%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 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
+%setup
+
+%build
+./configure --prefix-dir=%{prefix} --binary-dir=bin --install-dir="$RPM_BUILD_ROOT"
+make
+
+%install
+make ROOT="$RPM_BUILD_ROOT" install
+
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
+cat << EOF > $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
+[Desktop Entry]
+Categories=Games;
+Encoding=UTF-8
+Exec=/usr/bin/openttd
+Name=OpenTTD
+Icon=openttd.32
+Terminal=false
+Type=Application
+EOF
+
+%clean
+rm -Rf "$RPM_BUILD_ROOT"
+
+%files
+%dir %{_datadir}/games/%{name}
+%dir %{_datadir}/games/%{name}/lang
+%dir %{_datadir}/games/%{name}/data
+%dir %{_datadir}/games/%{name}/gm
+%dir %{_datadir}/games/%{name}/docs
+%dir %{_datadir}/pixmaps
+%defattr(644, root, games, 755)
+%attr(755, root, games) %{_bindir}/%{name}
+%{_datadir}/games/%{name}/lang/*
+%{_datadir}/games/%{name}/data/*
+%{_datadir}/games/%{name}/docs/*
+%{_datadir}/pixmaps/*
+%{_datadir}/applications/%{name}.desktop
+