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