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