/[packages]/updates/1/cultivation/current/SPECS/cultivation.spec
ViewVC logotype

Annotation of /updates/1/cultivation/current/SPECS/cultivation.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.28