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