3 # - build all svga/sdl/X versions instead of bconds
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
11 # video (default: X11-only version):
12 %bcond_with svga # SVGALIB version
13 %bcond_with sdl # SDL version
14 %bcond_with sdlsvga # SDL/SVGALIB version
16 %bcond_with cda_internal # internal CD Audio Support
17 %bcond_with cda_sdl # SDL CD Audio Support
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
23 Summary: Free cross-platform real-time strategy gaming engine
24 Summary(pl.UTF-8): Wolnodostępny, międzyplatformowy silnik gier strategicznych czasu rzeczywistego
29 #Release: 0.pre1.%{snap}.1
32 Group: X11/Applications/Games
33 Source0: http://home.earthlink.net/~pappy86312/downloads/%{name}-%{snap}-src.tar.gz
34 # Source0-md5: e7926083835d9f913e4bfc7e1ab13cc1
35 Source1: %{name}.desktop
37 Patch0: %{name}-opt.patch
38 Patch1: %{name}-nonint.patch
39 Patch3: %{name}-flac-update.patch
40 URL: http://freecraft.org/
41 %{?with_sdl:BuildRequires: SDL-devel}
42 %{?with_sdlsvga:BuildRequires: SDL-devel}
43 %{?with_arts:BuildRequires: arts-devel}
44 BuildRequires: bzip2-devel
45 %{?with_flac:BuildRequires: flac-devel >= 1.0.3}
46 BuildRequires: libmad-devel
47 BuildRequires: libpng-devel
48 BuildRequires: libvorbis-devel
49 %{?with_svga:BuildRequires: svgalib-devel}
50 BuildRequires: zlib-devel
51 Conflicts: %{name}-data < 1:1.18-0.pre1
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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).
71 Summary: Freecraft - files that allow using orignal game data
72 Summary(pl.UTF-8): Freecraft - pliki pozwalające używać danych z oryginalnej gry
73 Group: X11/Applications/Games
74 Requires: %{name} = %{epoch}:%{version}-%{release}
75 Provides: %{name}-data = %{epoch}:%{version}-%{release}
76 Obsoletes: %{name}-data-fcmp
79 Freecraft - files that allow using orignal game data.
81 NOTE: it requires data from orignal WC2 CD or Expansion CD.
83 %description data-wc2 -l pl.UTF-8
84 Freecraft - pliki pozwalające używać danych z oryginalnej gry.
86 UWAGA: wymaga do działania danych z oryginalnego CD lub Expansion CD
90 %setup -q -n %{name}-%{snap}
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"}}}
103 WITH_SOUND="y"; export WITH_SOUND
106 %{!?with_arts:WITH_SOUND_ARTS="y"}
107 %{?with_arts:WITH_SOUND_ARTS="n"}
108 export WITH_SOUND_ARTS
111 WITH_THREADEDSOUND="y"; export WITH_THREADEDSOUND
114 WITH_FLAC="%{?with_flac:y}%{!?with_flac:n}"; export WITH_FLAC
117 WITH_OGG="y"; export WITH_OGG
120 WITH_MAD="y"; export WITH_MAD
123 %{?with_cda_internal:WITH_CDA="i"}
124 %{?with_cda_sdl:WITH_CDA="S"}
125 %{!?with_cda_internal:%{!?with_cda_sdl:WITH_CDA="n"}}
128 # COMPRESSION OPTIONS (both zlib and bzip2, no zziplib)
129 WITH_COMP="O"; export WITH_COMP
131 # WarCraft 2 Expansion CD
132 WITH_WC2EXPCD="%{?with_wc2:y}%{!?with_wc2:n}"; export WITH_WC2EXPCD
135 WITH_COMPILE="n"; export WITH_COMPILE
138 WITH_DEBUG="n"; export WITH_DEBUG
140 OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/games/%{name}/{,tools}} \
150 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
152 install freecraft $RPM_BUILD_ROOT%{_bindir}/freecraft-bin
153 cp -r data $RPM_BUILD_ROOT%{_datadir}/games/%{name}
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
159 cat > $RPM_BUILD_ROOT%{_bindir}/freecraft << EOF
161 cd /usr/share/games/freecraft
162 %{_bindir}/freecraft-bin "\$@"
165 rm -f doc/{*.lsm,gpl*} contrib/{doxygen*,macosx.tgz,msvc.zip,stdint.h}
166 cp -rf contrib $RPM_BUILD_ROOT%{_datadir}/games/%{name}
168 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
169 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
172 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/*
178 %dir %{_datadir}/games/%{name}
179 %attr(755,root,root) %{_datadir}/games/%{name}/tools
180 %{_datadir}/games/%{name}/contrib
181 %{_desktopdir}/*.desktop
185 %defattr(644,root,root,755)
186 %{_datadir}/games/%{name}/data