]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
4af0ac95bcfa8d06f1244a75b7b0b70088673c1e
[packages/wesnoth.git] / wesnoth.spec
1 # TODO
2 # - rename language files sr@latin to sr@Latn and include them
3 # - use desktop file included with project (consider which one are better)
4 # - dont know what should I do with sr@latin man pages
5 # Conditional build
6 %bcond_without  server  # without server
7 %bcond_without  tools   # without tools
8 %bcond_without  fribidi # without Bidirectional language support
9 #
10 Summary:        Strategy game with a fantasy theme
11 Summary(pl.UTF-8):      Strategiczna gra z motywem fantasy
12 Name:           wesnoth
13 Version:        1.4.4
14 Release:        3
15 Epoch:          1
16 License:        GPL v2+
17 Group:          X11/Applications/Games/Strategy
18 Source0:        http://www.wesnoth.org/files/%{name}-%{version}.tar.bz2
19 # Source0-md5:  b2260808e94eba12aa7ceaa40fa0ee4d
20 Source1:        %{name}.desktop
21 Source2:        %{name}_editor.desktop
22 Source3:        %{name}d.init
23 Patch0:         %{name}-Makefile.patch
24 Patch1:         %{name}-locale_dir.patch
25 URL:            http://www.wesnoth.org/
26 BuildRequires:  SDL-devel >= 1.2.7
27 BuildRequires:  SDL_image-devel >= 1.2
28 BuildRequires:  SDL_mixer-devel >= 1.2
29 BuildRequires:  SDL_net-devel >= 1.2
30 BuildRequires:  SDL_ttf-devel >= 2.0
31 BuildRequires:  autoconf >= 2.59
32 BuildRequires:  automake >= 1:1.9
33 BuildRequires:  boost-devel >= 1.33
34 %{?with_fribidi:BuildRequires:  fribidi-devel}
35 BuildRequires:  gettext-devel
36 BuildRequires:  libpng-devel
37 BuildRequires:  libstdc++-devel
38 BuildRequires:  libtool >= 2:1.5
39 BuildRequires:  python-devel
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.268
42 BuildRequires:  zipios++-devel
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 Battle for Wesnoth is a fantasy strategy game. Battle for control of
47 villages, using variety of units which have advantages and
48 disadvantages in different types of terrains and against different
49 types of attacks. Units gain experience and advance levels, and are
50 carried over from one scenario to the next campaign.
51
52 %description -l pl.UTF-8
53 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
54 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
55 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
56 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
57 przenoszone z jednej scenerii do następnej kampanii.
58
59 %package server
60 Summary:        Network server for Wesnoth
61 Summary(pl.UTF-8):      Sieciowy serwer dla Wesnoth
62 Group:          X11/Applications/Games/Strategy
63 Requires(post,preun):   /sbin/chkconfig
64 Requires(postun):       /usr/sbin/groupdel
65 Requires(postun):       /usr/sbin/userdel
66 Requires(pre):  /usr/sbin/groupadd
67 Requires(pre):  /usr/sbin/useradd
68 Requires:       rc-scripts >= 0.4.0.17
69
70 %description server
71 Server for playing networked games of Wesnoth.
72
73 %description server -l pl.UTF-8
74 Serwer do prowadzenia sieciowych gier Wesnoth.
75
76 %package tools
77 Summary:        Tools for Wesnoth
78 Summary(pl.UTF-8):      Narzędzia dla Wesnoth
79 Group:          X11/Applications/Games/Strategy
80 Requires:       %{name} = %{epoch}:%{version}-%{release}
81
82 %description tools
83 Map editor and translations tools.
84
85 %description tools -l pl.UTF-8
86 Edytor map i narzędzia do tłumaczeń.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %patch1 -p1
92
93 %build
94 %{__gettextize}
95 %{__aclocal} -I m4
96 %{__autoconf}
97 %{__autoheader}
98 %{__automake}
99 %configure \
100         %{?with_server:--enable-server} \
101         %{?with_tools:--enable-editor} \
102         %{?with_tools:--enable-tools} \
103         --with%{!?with_fribidi:out}-fribidi \
104         --docdir=%{_docdir}/%{name}-%{version} \
105         --with-icondir=%{_pixmapsdir} \
106         --with-zipios
107 %{__make}
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT
115
116 # install additional docs
117 install changelog README  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
118 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
119
120 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
121 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
122 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
123
124 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
125
126 # unsupported(?)
127 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
128 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
129 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
130
131 # the same as manuals from %{_mandir}/man?
132 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
133
134 %find_lang %{name} --all-name
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %pre server
140 %groupadd -P %{name}-server -g 178  wesnothd
141 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
142
143 %post server
144 /sbin/chkconfig --add wesnothd
145 %service wesnothd restart
146
147 %preun server
148 if [ "$1" = "0" ]; then
149         %service wesnothd stop
150         /sbin/chkconfig --del wesnothd
151         %userremove wesnothd
152         %groupremove wesnothd
153 fi
154
155 %files -f %{name}.lang
156 %defattr(644,root,root,755)
157 %doc %{_docdir}/%{name}-%{version}
158 %attr(755,root,root) %{_bindir}/wesnoth
159 %{_mandir}/man6/wesnoth.6*
160 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
161 %lang(da) %{_mandir}/da/man6/wesnoth.6*
162 %lang(de) %{_mandir}/de/man6/wesnoth.6*
163 %lang(es) %{_mandir}/es/man6/wesnoth.6*
164 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
165 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
166 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
167 %lang(it) %{_mandir}/it/man6/wesnoth.6*
168 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
169 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
170 %lang(nl) %{_mandir}/nl/man6/wesnoth.6*
171 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
172 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
173 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
174 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
175 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
176 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
177 %{_datadir}/%{name}
178 %{_desktopdir}/%{name}.desktop
179 %{_pixmapsdir}/%{name}-icon.png
180
181 %if %{with server}
182 %files server
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/wesnothd
185 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
186 %{_mandir}/man6/wesnothd.6*
187 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
188 %lang(da) %{_mandir}/da/man6/wesnothd.6*
189 %lang(de) %{_mandir}/de/man6/wesnothd.6*
190 %lang(es) %{_mandir}/es/man6/wesnothd.6*
191 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
192 %lang(gl) %{_mandir}/gl/man6/wesnothd.6*
193 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
194 %lang(it) %{_mandir}/it/man6/wesnothd.6*
195 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
196 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
197 %lang(nl) %{_mandir}/nl/man6/wesnothd.6*
198 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
199 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
200 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
201 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
202 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
203 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
204 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
205 %endif
206
207 %if %{with tools}
208 %files tools
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_bindir}/cutter
211 %attr(755,root,root) %{_bindir}/exploder
212 %attr(755,root,root) %{_bindir}/wesnoth_editor
213 %attr(755,root,root) %{_bindir}/wmlindent
214 %attr(755,root,root) %{_bindir}/wmllint
215 %attr(755,root,root) %{_bindir}/wmlscope
216 %{_mandir}/man6/wesnoth_editor.6*
217 %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
218 %lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
219 %lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
220 %lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
221 %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
222 %lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
223 %lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
224 %lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
225 %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
226 %lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
227 %lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
228 %lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
229 %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
230 %lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
231 %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
232 %lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
233 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
234 %{_desktopdir}/%{name}_editor.desktop
235 %{_pixmapsdir}/%{name}_editor-icon.png
236 %endif
This page took 0.053723 seconds and 3 git commands to generate.