]>
Commit | Line | Data |
---|---|---|
9a94c697 | 1 | # |
2 | # TODO: | |
47265f2d | 3 | # - build all svga/sdl/X versions instead of bconds |
923675de | 4 | # - check if it builds, because I got an error with |
5 | # *.desktop at the end of building process, and | |
6 | # cannot build package without commenting out line with | |
7 | # *.desktop in %files, but it might be my fault | |
8 | # so i keep section %files unchanged for now | |
9a94c697 | 9 | # |
10 | # Conditional build: | |
8efe1232 | 11 | # video (default: X11-only version): |
97343500 | 12 | %bcond_with svga # SVGALIB version |
13 | %bcond_with sdl # SDL version | |
14 | %bcond_with sdlsvga # SDL/SVGALIB version | |
8efe1232 | 15 | # CD-Audio support: |
97343500 | 16 | %bcond_with cda_internal # internal CD Audio Support |
17 | %bcond_with cda_sdl # SDL CD Audio Support | |
8efe1232 | 18 | # other: |
97343500 | 19 | %bcond_with arts # arts audio output support |
20 | %bcond_with flac # with FLAC audio codec support | |
21 | %bcond_with wc2 # WarCraft 2 Expansion CD | |
9a94c697 | 22 | # |
47265f2d | 23 | Summary: Free cross-platform real-time strategy gaming engine |
7ca54191 | 24 | Summary(pl.UTF-8): Wolnodostępny, międzyplatformowy silnik gier strategicznych czasu rzeczywistego |
9a94c697 | 25 | Name: freecraft |
2d647b3e | 26 | %define snap 030311 |
20da2b00 | 27 | Version: 1.18 |
fe07becd | 28 | Release: 2 |
9517b855 | 29 | #Release: 0.pre1.%{snap}.1 |
20da2b00 | 30 | Epoch: 1 |
9a94c697 | 31 | License: GPL |
195ffa4c | 32 | Group: X11/Applications/Games |
923675de | 33 | Source0: http://home.earthlink.net/~pappy86312/downloads/%{name}-%{snap}-src.tar.gz |
a1d572de | 34 | # Source0-md5: e7926083835d9f913e4bfc7e1ab13cc1 |
fe07becd | 35 | Source1: %{name}.desktop |
36 | Source2: %{name}.png | |
2a215329 JB |
37 | Patch0: %{name}-opt.patch |
38 | Patch1: %{name}-nonint.patch | |
8efe1232 | 39 | Patch3: %{name}-flac-update.patch |
923675de | 40 | URL: http://freecraft.org/ |
4e06090e | 41 | %{?with_sdl:BuildRequires: SDL-devel} |
42 | %{?with_sdlsvga:BuildRequires: SDL-devel} | |
43 | %{?with_arts:BuildRequires: arts-devel} | |
2a215329 | 44 | BuildRequires: bzip2-devel |
4e06090e | 45 | %{?with_flac:BuildRequires: flac-devel >= 1.0.3} |
79ded076 | 46 | BuildRequires: libmad-devel |
2a215329 JB |
47 | BuildRequires: libpng-devel |
48 | BuildRequires: libvorbis-devel | |
4e06090e | 49 | %{?with_svga:BuildRequires: svgalib-devel} |
2a215329 | 50 | BuildRequires: zlib-devel |
20da2b00 | 51 | Conflicts: %{name}-data < 1:1.18-0.pre1 |
9a94c697 | 52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
54 | %description | |
47265f2d JB |
55 | FreeCraft is a free cross-platform real-time strategy gaming engine. |
56 | It is possible to play against human opponents over LAN, Internet, or | |
57 | against the computer. The engine can be used to build C&C, WC2, SC and | |
58 | AOE-like real-time strategy (RTS) games. It successfully runs under | |
59 | Linux, BSD, BeOS, MacOS/X, MacOS/Darwin and MS Windows (Windows XP is | |
60 | not supported). | |
9a94c697 | 61 | |
736547f9 JR |
62 | %description -l pl.UTF-8 |
63 | FreeCraft to wolnodostępny, międzyplatformowy silnik gier | |
64 | strategicznych czasu rzeczywistego. Można grać przeciwko ludziom przez | |
65 | sieć lokalną lub Internet, a także przeciwko komputerowi. Silnik może | |
66 | być użyty do zbudowania gier strategicznych czasu rzeczywistego (RTS) | |
67 | w stylu C&C, WC2, SC i AOE. Działa pod systemami: Linux, BSD, BeOS, | |
68 | MacOS/X, MacOS/Darwin i MS Windows (XP jeszcze nie jest obsługiwane). | |
9a94c697 | 69 | |
2a215329 | 70 | %package data-wc2 |
9517b855 | 71 | Summary: Freecraft - files that allow using orignal game data |
7ca54191 | 72 | Summary(pl.UTF-8): Freecraft - pliki pozwalające używać danych z oryginalnej gry |
195ffa4c | 73 | Group: X11/Applications/Games |
20da2b00 JB |
74 | Requires: %{name} = %{epoch}:%{version}-%{release} |
75 | Provides: %{name}-data = %{epoch}:%{version}-%{release} | |
2a215329 JB |
76 | Obsoletes: %{name}-data-fcmp |
77 | ||
78 | %description data-wc2 | |
79 | Freecraft - files that allow using orignal game data. | |
9a94c697 | 80 | |
2a215329 | 81 | NOTE: it requires data from orignal WC2 CD or Expansion CD. |
9a94c697 | 82 | |
736547f9 JR |
83 | %description data-wc2 -l pl.UTF-8 |
84 | Freecraft - pliki pozwalające używać danych z oryginalnej gry. | |
2a215329 | 85 | |
736547f9 | 86 | UWAGA: wymaga do działania danych z oryginalnego CD lub Expansion CD |
2a215329 | 87 | WC2. |
9a94c697 | 88 | |
89 | %prep | |
20da2b00 | 90 | %setup -q -n %{name}-%{snap} |
2a215329 JB |
91 | %patch0 -p1 |
92 | %patch1 -p1 | |
9a94c697 | 93 | |
94 | %build | |
9a94c697 | 95 | # Version to compile |
4e06090e | 96 | %{?with_svga:WITH_VIDEO="V"} |
97 | %{?with_sdl:WITH_VIDEO="S"} | |
98 | %{?with_sdlsvga:WITH_VIDEO="B"} | |
99 | %{!?with_svga:%{!?with_sdl:%{!?with_sdlsvga:WITH_VIDEO="X"}}} | |
2a215329 | 100 | export WITH_VIDEO |
9a94c697 | 101 | |
102 | # sound support | |
2a215329 | 103 | WITH_SOUND="y"; export WITH_SOUND |
9a94c697 | 104 | |
0bab8c41 | 105 | # sound support arts |
4e06090e | 106 | %{!?with_arts:WITH_SOUND_ARTS="y"} |
107 | %{?with_arts:WITH_SOUND_ARTS="n"} | |
0bab8c41 | 108 | export WITH_SOUND_ARTS |
109 | ||
9a94c697 | 110 | # threaded sound |
2a215329 | 111 | WITH_THREADEDSOUND="y"; export WITH_THREADEDSOUND |
9a94c697 | 112 | |
8efe1232 | 113 | # FLAC support |
4e06090e | 114 | WITH_FLAC="%{?with_flac:y}%{!?with_flac:n}"; export WITH_FLAC |
9a94c697 | 115 | |
6236213f | 116 | # Ogg support |
2a215329 | 117 | WITH_OGG="y"; export WITH_OGG |
9a94c697 | 118 | |
119 | # MAD MP3 support | |
2a215329 | 120 | WITH_MAD="y"; export WITH_MAD |
9a94c697 | 121 | |
122 | # CD audio | |
4e06090e | 123 | %{?with_cda_internal:WITH_CDA="i"} |
124 | %{?with_cda_sdl:WITH_CDA="S"} | |
125 | %{!?with_cda_internal:%{!?with_cda_sdl:WITH_CDA="n"}} | |
2a215329 | 126 | export WITH_CDA |
9a94c697 | 127 | |
2a215329 JB |
128 | # COMPRESSION OPTIONS (both zlib and bzip2, no zziplib) |
129 | WITH_COMP="O"; export WITH_COMP | |
9a94c697 | 130 | |
131 | # WarCraft 2 Expansion CD | |
4e06090e | 132 | WITH_WC2EXPCD="%{?with_wc2:y}%{!?with_wc2:n}"; export WITH_WC2EXPCD |
9a94c697 | 133 | |
134 | # Compile (NO!) | |
2a215329 | 135 | WITH_COMPILE="n"; export WITH_COMPILE |
9a94c697 | 136 | |
0bab8c41 | 137 | # Debug |
138 | WITH_DEBUG="n"; export WITH_DEBUG | |
139 | ||
20da2b00 | 140 | OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}" |
2a215329 JB |
141 | export OPTFLAGS |
142 | ./setup | |
9a94c697 | 143 | |
2a215329 JB |
144 | %{__make} depend |
145 | %{__make} | |
9a94c697 | 146 | |
147 | %install | |
148 | rm -rf $RPM_BUILD_ROOT | |
fe07becd | 149 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/games/%{name}/{,tools}} \ |
150 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
9a94c697 | 151 | |
2a215329 | 152 | install freecraft $RPM_BUILD_ROOT%{_bindir}/freecraft-bin |
47265f2d | 153 | cp -r data $RPM_BUILD_ROOT%{_datadir}/games/%{name} |
9a94c697 | 154 | |
2a215329 JB |
155 | install tools/build.sh $RPM_BUILD_ROOT%{_datadir}/games/%{name}/tools |
156 | install tools/wartool $RPM_BUILD_ROOT%{_bindir} | |
157 | ln -sf %{_bindir}/wartool $RPM_BUILD_ROOT%{_datadir}/games/%{name}/tools/wartool | |
158 | ||
9a94c697 | 159 | cat > $RPM_BUILD_ROOT%{_bindir}/freecraft << EOF |
160 | #!/bin/sh | |
161 | cd /usr/share/games/freecraft | |
fe07becd | 162 | %{_bindir}/freecraft-bin "\$@" |
9a94c697 | 163 | EOF |
2a215329 | 164 | |
ac8081aa JB |
165 | rm -f doc/{*.lsm,gpl*} contrib/{doxygen*,macosx.tgz,msvc.zip,stdint.h} |
166 | cp -rf contrib $RPM_BUILD_ROOT%{_datadir}/games/%{name} | |
9a94c697 | 167 | |
fe07becd | 168 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
169 | install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir} | |
170 | ||
9a94c697 | 171 | %clean |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
174 | %files | |
175 | %defattr(644,root,root,755) | |
ac8081aa | 176 | %doc doc/* |
9a94c697 | 177 | %attr(755,root,root) %{_bindir}/* |
42588924 | 178 | %dir %{_datadir}/games/%{name} |
2a215329 | 179 | %attr(755,root,root) %{_datadir}/games/%{name}/tools |
ac8081aa | 180 | %{_datadir}/games/%{name}/contrib |
fe07becd | 181 | %{_desktopdir}/*.desktop |
182 | %{_pixmapsdir}/*.png | |
9a94c697 | 183 | |
2a215329 JB |
184 | %files data-wc2 |
185 | %defattr(644,root,root,755) | |
9a94c697 | 186 | %{_datadir}/games/%{name}/data |