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