os/linux/openttd.spec
changeset 597 f61f0ab9b3e7
parent 255 dceec2a6315d
child 1144 97530c070daf
equal deleted inserted replaced
596:e876d7319634 597:f61f0ab9b3e7
       
     1 %define name openttd 
       
     2 %define version 0.3.5
       
     3 %define release 1mdk
       
     4 
       
     5 Name: %{name} 
       
     6 Summary: An open source clone of the Microprose game "Transport Tycoon Deluxe"
       
     7 Version: %{version} 
       
     8 Release: %{release} 
       
     9 Source0: %{name}-%{version}.tar.bz2
       
    10 URL: http://www.openttd.org
       
    11 Group: Games/Strategy
       
    12 Packager: Dominik Scherer <dominik@openttd.com>
       
    13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot 
       
    14 License: GPL
       
    15 BuildRequires: libSDL1.2-devel >= 1.2.7
       
    16 BuildRequires: libpng3-devel >= 1.2.5 
       
    17 BuildRequires: zlib1-devel >= 1.2.1
       
    18 
       
    19 %description
       
    20 An enhanced open source clone of the Microprose game "Transport Tycoon Deluxe".
       
    21 You require the data files of the original Transport Tycoon Deluxe
       
    22 for Windows to play the game. You have to MANUALLY copy them to the
       
    23 game data directory!
       
    24 
       
    25 %prep 
       
    26 rm -rf $RPM_BUILD_ROOT 
       
    27 %setup
       
    28 
       
    29 %build
       
    30 make BINARY_DIR=%{_gamesbindir}/openttd/ INSTALL_DIR=%{_gamesdatadir}/openttd/ GAME_DATA_DIR=%{_gamesdatadir}/openttd/ USE_HOMEDIR=1 PERSONAL_DIR=.openttd
       
    31 
       
    32 %install
       
    33 mkdir -p $RPM_BUILD_ROOT%{_gamesbindir}/openttd
       
    34 mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang
       
    35 mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data
       
    36 
       
    37 cp ./openttd $RPM_BUILD_ROOT%{_gamesbindir}/openttd/openttd
       
    38 cp -r ./lang/*.lng $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang/
       
    39 cp -r ./data/*.grf $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data/
       
    40 cp -r ./data/opntitle.dat $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data/
       
    41 
       
    42 # icon
       
    43 install -m644 media/openttd.64.png -D $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
       
    44 install -m644 media/openttd.64.png -D $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
       
    45 install -m644 media/openttd.64.png -D $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png
       
    46 
       
    47 # menu entry
       
    48 mkdir -p $RPM_BUILD_ROOT/%{_menudir}
       
    49 cat << EOF > $RPM_BUILD_ROOT/%{_menudir}/%{name}
       
    50 ?package(%{name}):command="%{_gamesbindir}/openttd/openttd" icon="%{name}.png" \
       
    51   needs="X11" section="Amusement/Strategy" title="OpenTTD" \
       
    52   longtitle="%{Summary}"
       
    53 EOF
       
    54 
       
    55 %clean 
       
    56 rm -rf $RPM_BUILD_ROOT 
       
    57 
       
    58 %post
       
    59 %{update_menus}
       
    60 
       
    61 %postun
       
    62 %{clean_menus}
       
    63 
       
    64 %files 
       
    65 %defattr(-,root,root,0755) 
       
    66 %{_gamesbindir}/openttd/openttd
       
    67 
       
    68 %{_gamesdatadir}/openttd/lang/american.lng
       
    69 %{_gamesdatadir}/openttd/lang/catalan.lng
       
    70 %{_gamesdatadir}/openttd/lang/czech.lng
       
    71 %{_gamesdatadir}/openttd/lang/danish.lng
       
    72 %{_gamesdatadir}/openttd/lang/dutch.lng
       
    73 %{_gamesdatadir}/openttd/lang/english.lng
       
    74 %{_gamesdatadir}/openttd/lang/finnish.lng
       
    75 %{_gamesdatadir}/openttd/lang/french.lng
       
    76 %{_gamesdatadir}/openttd/lang/galician.lng
       
    77 %{_gamesdatadir}/openttd/lang/german.lng
       
    78 %{_gamesdatadir}/openttd/lang/hungarian.lng
       
    79 %{_gamesdatadir}/openttd/lang/icelandic.lng
       
    80 %{_gamesdatadir}/openttd/lang/italian.lng
       
    81 %{_gamesdatadir}/openttd/lang/latvian.lng
       
    82 %{_gamesdatadir}/openttd/lang/norwegian.lng
       
    83 %{_gamesdatadir}/openttd/lang/origveh.lng
       
    84 %{_gamesdatadir}/openttd/lang/polish.lng
       
    85 %{_gamesdatadir}/openttd/lang/portuguese.lng
       
    86 %{_gamesdatadir}/openttd/lang/romanian.lng
       
    87 %{_gamesdatadir}/openttd/lang/russian.lng
       
    88 %{_gamesdatadir}/openttd/lang/slovak.lng
       
    89 %{_gamesdatadir}/openttd/lang/spanish.lng
       
    90 %{_gamesdatadir}/openttd/lang/swedish.lng
       
    91 %{_gamesdatadir}/openttd/lang/turkish.lng
       
    92 
       
    93 %{_gamesdatadir}/openttd/data/canalsw.grf
       
    94 %{_gamesdatadir}/openttd/data/openttd.grf
       
    95 %{_gamesdatadir}/openttd/data/opntitle.dat
       
    96 %{_gamesdatadir}/openttd/data/signalsw.grf
       
    97 %{_gamesdatadir}/openttd/data/trkfoundw.grf
       
    98 
       
    99 %{_menudir}/%{name}
       
   100 %{_iconsdir}/*.png
       
   101 %{_miconsdir}/*.png
       
   102 %{_liconsdir}/*.png
       
   103 
       
   104 %doc changelog.txt readme.txt COPYING os/linux/README.urpmi
       
   105 
       
   106 %changelog 
       
   107 * Wed Dec ?? 2004 Dominik Scherer <dominik@openttd.com> 0.3.5-1mdk
       
   108 - Upgraded to 0.3.5
       
   109 - Added a warning message about the additional required files (only displayed when installing via urpmi)
       
   110 
       
   111 * Wed Sep 15 2004 Dominik Scherer <> 0.3.4-1mdk
       
   112 - Upgraded to 0.3.4
       
   113 
       
   114 * Wed Jul 31 2004 Dominik Scherer <> 0.3.3-1mdk
       
   115 - Initial release