1 |
%define name cultivation |
2 |
%define Name Cultivation |
3 |
%define version 9 |
4 |
%define snapshot 20071217 |
5 |
%define subrel 1 |
6 |
%define release %mkrel 0.%{snapshot}.6 |
7 |
|
8 |
Name: %{name} |
9 |
Version: %{version} |
10 |
Release: %{release} |
11 |
Summary: A game about the interactions within a gardening community |
12 |
License: Public Domain |
13 |
Group: Games/Strategy |
14 |
URL: http://cultivation.sourceforge.net/ |
15 |
Source0: %Name-%{version}cvs%{snapshot}.tar.bz2 |
16 |
Patch0: Cultivation-9-upstream-make382.patch |
17 |
Patch1: Cultivation-9-upstream-fix_crash.patch |
18 |
BuildRequires: mesaglut-devel |
19 |
|
20 |
%description |
21 |
Cultivation is a game about a community of gardeners growing food |
22 |
for themselves in a shared space. |
23 |
|
24 |
Cultivation is quite different from most other games. It is a |
25 |
social simulation, and the primary form of conflict is over land |
26 |
and plant resources --- there is no shooting, but there are plenty |
27 |
of angry looks. It is also an evolution simulation. Within the |
28 |
world of Cultivation, you can explore a virtually infinite |
29 |
spectrum of different plant and gardener varieties. |
30 |
|
31 |
All of the graphics, sounds, melodies,and other content in |
32 |
Cultivation are 100% procedurally generated at playtime. In other |
33 |
words, there are no hand-painted texture maps --- instead, each |
34 |
object has a uniquely 'grown' appearance. Every time you play, |
35 |
Cultivation generates fresh visuals, music, and behaviors. |
36 |
|
37 |
|
38 |
%prep |
39 |
%setup -q -n %{Name}-%{version}cvs%{snapshot} |
40 |
%patch0 -p1 |
41 |
%patch1 -p1 |
42 |
|
43 |
%build |
44 |
export CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" |
45 |
pushd minorGems/sound/portaudio |
46 |
chmod u+x ./configure |
47 |
%configure2_5x |
48 |
%__make |
49 |
popd |
50 |
|
51 |
pushd game2 |
52 |
%__rm -f gameSource/Makefile |
53 |
%__cat \ |
54 |
Makefile.GnuLinux \ |
55 |
Makefile.common \ |
56 |
../minorGems/build/Makefile.minorGems \ |
57 |
gameSource/Makefile.all \ |
58 |
../minorGems/build/Makefile.minorGems_targets > gameSource/Makefile |
59 |
|
60 |
pushd gameSource |
61 |
%__make %{?_smp_mflags} |
62 |
popd |
63 |
|
64 |
popd |
65 |
|
66 |
%install |
67 |
install -d -m 755 %{buildroot}%{_gamesbindir} |
68 |
install -m 755 game2/gameSource/%{Name} \ |
69 |
%{buildroot}%{_gamesbindir}/%{name}.real |
70 |
|
71 |
install -d -m 755 %{buildroot}%{_gamesdatadir}/%{name} |
72 |
install -m 644 game2/gameSource/font.tga \ |
73 |
%{buildroot}%{_gamesdatadir}/%{name} |
74 |
install -m 644 game2/gameSource/features.txt \ |
75 |
%{buildroot}%{_gamesdatadir}/%{name} |
76 |
install -m 644 game2/gameSource/language.txt \ |
77 |
%{buildroot}%{_gamesdatadir}/%{name} |
78 |
install -d -m 755 %{buildroot}%{_gamesdatadir}/%{name}/languages |
79 |
install -m 644 game2/gameSource/languages/*.txt \ |
80 |
%{buildroot}%{_gamesdatadir}/%{name}/languages |
81 |
|
82 |
# startscript |
83 |
cat > %{buildroot}%{_gamesbindir}/%{name} <<'EOF' |
84 |
#!/bin/bash |
85 |
if [ ! -d $HOME/.%{name} ]; then |
86 |
mkdir -p $HOME/.%{name} |
87 |
cd $HOME/.%{name} |
88 |
cp %{_gamesdatadir}/%{name}/*.txt . |
89 |
ln -s %{_gamesdatadir}/%{name}/*.tga . |
90 |
ln -s %{_gamesdatadir}/%{name}/languages . |
91 |
ln -s %{_gamesbindir}/%{name}.real . |
92 |
fi |
93 |
|
94 |
cd $HOME/.%{name} |
95 |
|
96 |
# Basic switch of language according to locale defined in Unix systems |
97 |
case "$LC_MESSAGES" in |
98 |
fr* ) |
99 |
language="French" |
100 |
;; |
101 |
pt* ) |
102 |
language="Portuguese" |
103 |
;; |
104 |
* ) |
105 |
language="English" |
106 |
;; |
107 |
esac |
108 |
echo $language > ./language.txt |
109 |
|
110 |
./%{name}.real |
111 |
EOF |
112 |
chmod 755 %{buildroot}%{_gamesbindir}/%{name} |
113 |
|
114 |
# icon |
115 |
install -d -m 755 %{buildroot}%{_datadir}/pixmaps |
116 |
install -m 644 game2/build/win32/iconSource.png \ |
117 |
%{buildroot}%{_datadir}/pixmaps/%{name}.png |
118 |
|
119 |
mkdir -p %{buildroot}%{_datadir}/applications |
120 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF |
121 |
[Desktop Entry] |
122 |
Name=%{name} |
123 |
Comment=%summary |
124 |
Exec=%{name} |
125 |
Icon=%{name} |
126 |
Terminal=false |
127 |
Type=Application |
128 |
StartupNotify=true |
129 |
Categories=Game;Simulation; |
130 |
EOF |
131 |
|
132 |
|
133 |
%clean |
134 |
rm -rf %{buildroot} |
135 |
|
136 |
%files |
137 |
%defattr(-, root, games) |
138 |
%doc game2/documentation/* |
139 |
%{_gamesbindir}/%{name} |
140 |
%{_gamesbindir}/%{name}.real |
141 |
%{_gamesdatadir}/%{name} |
142 |
%{_datadir}/applications/*.desktop |
143 |
%{_datadir}/pixmaps/*.png |
144 |
|
145 |
|