1 |
%define name cultivation |
%define name cultivation |
2 |
%define Name Cultivation |
%define Name Cultivation |
3 |
%define version 9 |
%define version 9 |
4 |
%define snapshot 20071217 |
%define release %mkrel 2 |
5 |
%define subrel 1 |
%define subrel 1 |
|
%define release %mkrel 0.%{snapshot}.6 |
|
6 |
|
|
7 |
Name: %{name} |
Name: %{name} |
8 |
Version: %{version} |
Version: %{version} |
11 |
License: Public Domain |
License: Public Domain |
12 |
Group: Games/Strategy |
Group: Games/Strategy |
13 |
URL: http://cultivation.sourceforge.net/ |
URL: http://cultivation.sourceforge.net/ |
14 |
Source0: %Name-%{version}cvs%{snapshot}.tar.bz2 |
Source0: http://sourceforge.net/projects/cultivation/files/cultivation/v9/Cultivation_%{version}_UnixSource.tar.gz |
15 |
Patch0: Cultivation-9-upstream-make382.patch |
Patch0: Cultivation-9-deb-portaudio.patch |
16 |
Patch1: Cultivation-9-upstream-fix_crash.patch |
Patch1: Cultivation-9-deb-abs_paths.patch |
17 |
|
Patch2: Cultivation-9-deb-math_h.patch |
18 |
|
Patch3: Cultivation-9-upstream-fix_crash.patch |
19 |
|
Patch4: Cultivation-9-mageia-build64bit.patch |
20 |
BuildRequires: mesaglut-devel |
BuildRequires: mesaglut-devel |
21 |
|
BuildRequires: portaudio0-devel |
22 |
|
BuildRequires: png-devel |
23 |
|
BuildRequires: imagemagick |
24 |
|
|
25 |
%description |
%description |
26 |
Cultivation is a game about a community of gardeners growing food |
Cultivation is a game about a community of gardeners growing food |
41 |
|
|
42 |
|
|
43 |
%prep |
%prep |
44 |
%setup -q -n %{Name}-%{version}cvs%{snapshot} |
%setup -q -n %{Name}_%{version}_UnixSource |
45 |
%patch0 -p1 |
%patch0 -p1 |
46 |
%patch1 -p1 |
%patch1 -p1 |
47 |
|
%patch2 -p1 |
48 |
|
%patch3 -p1 |
49 |
|
%patch4 -p1 |
50 |
|
|
51 |
%build |
%build |
|
export CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" |
|
|
pushd minorGems/sound/portaudio |
|
|
chmod u+x ./configure |
|
|
%configure2_5x |
|
|
%__make |
|
|
popd |
|
52 |
|
|
53 |
|
export CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" |
54 |
pushd game2 |
pushd game2 |
55 |
%__rm -f gameSource/Makefile |
chmod u+x configure |
56 |
%__cat \ |
./configure --linux |
|
Makefile.GnuLinux \ |
|
|
Makefile.common \ |
|
|
../minorGems/build/Makefile.minorGems \ |
|
|
gameSource/Makefile.all \ |
|
|
../minorGems/build/Makefile.minorGems_targets > gameSource/Makefile |
|
|
|
|
|
pushd gameSource |
|
|
%__make %{?_smp_mflags} |
|
57 |
popd |
popd |
58 |
|
convert -type Grayscale -negate ./game2/build/macOSX/icon128_mask.png mask.png |
59 |
|
composite -compose CopyOpacity mask.png ./game2/build/macOSX/icon128_color.png cultivation.png |
60 |
|
mkdir -p 32x32 |
61 |
|
convert -scale 32x32 cultivation.png 32x32/cultivation.png |
62 |
|
convert 32x32/cultivation.png 32x32/cultivation.xpm |
63 |
|
sed -i -e 's/-lX11//' game2/gameSource/Makefile |
64 |
|
sed -i -e 's/^DEBUG_FLAG = .*/DEBUG_FLAG = /' game2/gameSource/Makefile |
65 |
|
sed -i -e 's/^OPTIMIZE_FLAG = .*/OPTIMIZE_FLAG = /' game2/gameSource/Makefile |
66 |
|
sed -i -e 's/^COMPILE_FLAGS = /COMPILE_FLAGS = $${CFLAGS} /' game2/gameSource/Makefile |
67 |
|
echo zzzz |
68 |
|
%__make %{?_smp_mflags} -C game2/gameSource CFLAGS="${CFLAGS} -DDATADIR=\"/usr/share/games/cultivation\"" |
69 |
|
|
|
popd |
|
70 |
|
|
71 |
%install |
%install |
72 |
install -d -m 755 %{buildroot}%{_gamesbindir} |
install -d -m 755 %{buildroot}%{_gamesbindir} |
134 |
Categories=Game;Simulation; |
Categories=Game;Simulation; |
135 |
EOF |
EOF |
136 |
|
|
|
|
|
137 |
%clean |
%clean |
138 |
rm -rf %{buildroot} |
rm -rf %{buildroot} |
139 |
|
|
146 |
%{_datadir}/applications/*.desktop |
%{_datadir}/applications/*.desktop |
147 |
%{_datadir}/pixmaps/*.png |
%{_datadir}/pixmaps/*.png |
148 |
|
|
|
|
|