]> git.pld-linux.org Git - packages/freecraft.git/blame - freecraft.spec
- removed invalid Application category
[packages/freecraft.git] / freecraft.spec
CommitLineData
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 23Summary: Free cross-platform real-time strategy gaming engine
7ca54191 24Summary(pl.UTF-8): Wolnodostępny, międzyplatformowy silnik gier strategicznych czasu rzeczywistego
9a94c697 25Name: freecraft
2d647b3e 26%define snap 030311
20da2b00 27Version: 1.18
fe07becd 28Release: 2
9517b855 29#Release: 0.pre1.%{snap}.1
20da2b00 30Epoch: 1
9a94c697 31License: GPL
195ffa4c 32Group: X11/Applications/Games
923675de 33Source0: http://home.earthlink.net/~pappy86312/downloads/%{name}-%{snap}-src.tar.gz
a1d572de 34# Source0-md5: e7926083835d9f913e4bfc7e1ab13cc1
fe07becd 35Source1: %{name}.desktop
36Source2: %{name}.png
2a215329
JB
37Patch0: %{name}-opt.patch
38Patch1: %{name}-nonint.patch
8efe1232 39Patch3: %{name}-flac-update.patch
923675de 40URL: http://freecraft.org/
4e06090e 41%{?with_sdl:BuildRequires: SDL-devel}
42%{?with_sdlsvga:BuildRequires: SDL-devel}
43%{?with_arts:BuildRequires: arts-devel}
2a215329 44BuildRequires: bzip2-devel
4e06090e 45%{?with_flac:BuildRequires: flac-devel >= 1.0.3}
79ded076 46BuildRequires: libmad-devel
2a215329
JB
47BuildRequires: libpng-devel
48BuildRequires: libvorbis-devel
4e06090e 49%{?with_svga:BuildRequires: svgalib-devel}
2a215329 50BuildRequires: zlib-devel
20da2b00 51Conflicts: %{name}-data < 1:1.18-0.pre1
9a94c697 52BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54%description
47265f2d
JB
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).
9a94c697 61
736547f9
JR
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).
9a94c697 69
2a215329 70%package data-wc2
9517b855 71Summary: Freecraft - files that allow using orignal game data
7ca54191 72Summary(pl.UTF-8): Freecraft - pliki pozwalające używać danych z oryginalnej gry
195ffa4c 73Group: X11/Applications/Games
20da2b00
JB
74Requires: %{name} = %{epoch}:%{version}-%{release}
75Provides: %{name}-data = %{epoch}:%{version}-%{release}
2a215329
JB
76Obsoletes: %{name}-data-fcmp
77
78%description data-wc2
79Freecraft - files that allow using orignal game data.
9a94c697 80
2a215329 81NOTE: it requires data from orignal WC2 CD or Expansion CD.
9a94c697 82
736547f9
JR
83%description data-wc2 -l pl.UTF-8
84Freecraft - pliki pozwalające używać danych z oryginalnej gry.
2a215329 85
736547f9 86UWAGA: wymaga do działania danych z oryginalnego CD lub Expansion CD
2a215329 87WC2.
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 100export WITH_VIDEO
9a94c697 101
102# sound support
2a215329 103WITH_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 108export WITH_SOUND_ARTS
109
9a94c697 110# threaded sound
2a215329 111WITH_THREADEDSOUND="y"; export WITH_THREADEDSOUND
9a94c697 112
8efe1232 113# FLAC support
4e06090e 114WITH_FLAC="%{?with_flac:y}%{!?with_flac:n}"; export WITH_FLAC
9a94c697 115
6236213f 116# Ogg support
2a215329 117WITH_OGG="y"; export WITH_OGG
9a94c697 118
119# MAD MP3 support
2a215329 120WITH_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 126export WITH_CDA
9a94c697 127
2a215329
JB
128# COMPRESSION OPTIONS (both zlib and bzip2, no zziplib)
129WITH_COMP="O"; export WITH_COMP
9a94c697 130
131# WarCraft 2 Expansion CD
4e06090e 132WITH_WC2EXPCD="%{?with_wc2:y}%{!?with_wc2:n}"; export WITH_WC2EXPCD
9a94c697 133
134# Compile (NO!)
2a215329 135WITH_COMPILE="n"; export WITH_COMPILE
9a94c697 136
0bab8c41 137# Debug
138WITH_DEBUG="n"; export WITH_DEBUG
139
20da2b00 140OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
2a215329
JB
141export OPTFLAGS
142./setup
9a94c697 143
2a215329
JB
144%{__make} depend
145%{__make}
9a94c697 146
147%install
148rm -rf $RPM_BUILD_ROOT
fe07becd 149install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/games/%{name}/{,tools}} \
150 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
9a94c697 151
2a215329 152install freecraft $RPM_BUILD_ROOT%{_bindir}/freecraft-bin
47265f2d 153cp -r data $RPM_BUILD_ROOT%{_datadir}/games/%{name}
9a94c697 154
2a215329
JB
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
9a94c697 159cat > $RPM_BUILD_ROOT%{_bindir}/freecraft << EOF
160#!/bin/sh
161cd /usr/share/games/freecraft
fe07becd 162%{_bindir}/freecraft-bin "\$@"
9a94c697 163EOF
2a215329 164
ac8081aa
JB
165rm -f doc/{*.lsm,gpl*} contrib/{doxygen*,macosx.tgz,msvc.zip,stdint.h}
166cp -rf contrib $RPM_BUILD_ROOT%{_datadir}/games/%{name}
9a94c697 167
fe07becd 168install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
169install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
170
9a94c697 171%clean
172rm -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
This page took 0.1004 seconds and 4 git commands to generate.