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