os/linux/openttd-0.3.3.spec
changeset 255 685481fd0a7d
parent 254 c711cd6b716c
child 256 dbeb1546519b
equal deleted inserted replaced
254:c711cd6b716c 255:685481fd0a7d
     1 %define name openttd 
       
     2 %define version 0.3.3
       
     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 Source10: %{name}.64.png
       
    11 Patch0: %{name}-%{version}-patch.diff
       
    12 URL: http://www.openttd.org
       
    13 Group: Games/Strategy
       
    14 Packager: Dominik Scherer <>
       
    15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot 
       
    16 License: GPL
       
    17 BuildRequires: libSDL1.2-devel >= 1.2.7
       
    18 BuildRequires: libpng3-devel >= 1.2.5 
       
    19 BuildRequires: zlib1-devel >= 1.2.1
       
    20 
       
    21 %description
       
    22 An enhanced open source clone of the Microprose game "Transport Tycoon Deluxe".
       
    23 You require the data files of the original Transport Tycoon Deluxe
       
    24 for Windows to play the game. You have to MANUALLY copy them to the
       
    25 game data directory!
       
    26 
       
    27 %prep 
       
    28 rm -rf $RPM_BUILD_ROOT 
       
    29 %setup
       
    30 %patch -p1
       
    31 
       
    32 %build
       
    33 make BINARY_DIR=%{_gamesbindir}/openttd/ INSTALL_DIR=%{_gamesdatadir}/openttd/ GAME_DATA_DIR=%{_gamesdatadir}/openttd/ USE_HOMEDIR=1 PERSONAL_DIR=.openttd
       
    34 
       
    35 %install
       
    36 mkdir -p $RPM_BUILD_ROOT%{_gamesbindir}/openttd
       
    37 mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang
       
    38 
       
    39 cp ./ttd $RPM_BUILD_ROOT%{_gamesbindir}/openttd/ttd
       
    40 cp -r ./lang/*.lng $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang/
       
    41 cp -r ./data $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/
       
    42 
       
    43 # icon
       
    44 install -m644 %{SOURCE10} -D $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
       
    45 install -m644 %{SOURCE10} -D $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png
       
    46 install -m644 %{SOURCE10} -D $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png
       
    47 
       
    48 # menu entry
       
    49 mkdir -p $RPM_BUILD_ROOT/%{_menudir}
       
    50 cat << EOF > $RPM_BUILD_ROOT/%{_menudir}/%{name}
       
    51 ?package(%{name}):command="%{_gamesbindir}/openttd/ttd" icon="%{name}.png" \
       
    52   needs="X11" section="Amusement/Strategy" title="OpenTTD" \
       
    53   longtitle="%{Summary}"
       
    54 EOF
       
    55 
       
    56 %clean 
       
    57 rm -rf $RPM_BUILD_ROOT 
       
    58 
       
    59 %post
       
    60 %{update_menus}
       
    61 
       
    62 %postun
       
    63 %{clean_menus}
       
    64 
       
    65 %files 
       
    66 %defattr(-,root,root,0755) 
       
    67 %{_gamesbindir}/openttd/ttd
       
    68 
       
    69 %{_gamesdatadir}/openttd/lang/czech.lng
       
    70 %{_gamesdatadir}/openttd/lang/danish.lng
       
    71 %{_gamesdatadir}/openttd/lang/english.lng
       
    72 %{_gamesdatadir}/openttd/lang/french.lng
       
    73 %{_gamesdatadir}/openttd/lang/galician.lng
       
    74 %{_gamesdatadir}/openttd/lang/german.lng
       
    75 %{_gamesdatadir}/openttd/lang/hungarian.lng
       
    76 %{_gamesdatadir}/openttd/lang/italian.lng
       
    77 %{_gamesdatadir}/openttd/lang/norwegian.lng
       
    78 %{_gamesdatadir}/openttd/lang/polish.lng
       
    79 %{_gamesdatadir}/openttd/lang/slovak.lng
       
    80 %{_gamesdatadir}/openttd/lang/swedish.lng
       
    81 
       
    82 %{_gamesdatadir}/openttd/data/canalsw.grf
       
    83 %{_gamesdatadir}/openttd/data/openttd.grf
       
    84 %{_gamesdatadir}/openttd/data/opntitle.dat
       
    85 %{_gamesdatadir}/openttd/data/signalsw.grf
       
    86 
       
    87 %{_menudir}/%{name}
       
    88 %{_iconsdir}/*.png
       
    89 %{_miconsdir}/*.png
       
    90 %{_liconsdir}/*.png
       
    91 
       
    92 %doc changelog.txt readme.txt COPYING
       
    93 
       
    94 %changelog 
       
    95 * Wed Jul 31 2004 Dominik Scherer <> 0.3.3-1mdk
       
    96 - Initial release