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