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