]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
- 1.1.14
[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.1.14
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:  9b7238f37faccf1c7be71de9475dc02b
15 Source1:        %{name}.desktop
16 Source2:        %{name}d.init
17 Patch0:         %{name}-Makefile.patch
18 URL:            http://www.wesnoth.org/
19 BuildRequires:  SDL-devel >= 1.2.7
20 BuildRequires:  SDL_image-devel >= 1.2
21 BuildRequires:  SDL_mixer-devel >= 1.2
22 BuildRequires:  SDL_net-devel >= 1.2
23 BuildRequires:  SDL_ttf-devel >= 2.0
24 BuildRequires:  autoconf >= 2.57
25 BuildRequires:  automake >= 1:1.9
26 BuildRequires:  gettext-devel
27 BuildRequires:  libstdc++-devel
28 BuildRequires:  libtool >= 2:1.5
29 BuildRequires:  zipios++-devel
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Battle for Wesnoth is a fantasy strategy game. Battle for control of
34 villages, using variety of units which have advantages and
35 disadvantages in different types of terrains and against different
36 types of attacks. Units gain experience and advance levels, and are
37 carried over from one scenario to the next campaign.
38
39 %description -l pl
40 Battle for Wesnoth jest strategiczn± gr± fantasy. Batalia o kontrolê
41 nad wsiami przy pomocy ró¿nego rodzaju oddzia³ów, które maj± przewagê
42 lub jej brak w odmiennym ukszta³towaniu terenu i przeciwko ró¿nym
43 sposobom ataku. Oddzia³y zdobywaj± do¶wiadczenie i poziomy
44 zaawansowania i s± przenoszone z jednej scenerii do nastêpnej
45 kampanii.
46
47 %package server
48 Summary:        Network server for Wesnoth
49 Summary(pl):    Sieciowy serwer dla Wesnoth
50 Group:          X11/Applications/Games/Strategy
51 Requires(post,preun):   /sbin/chkconfig
52
53 %description server
54 Server for playing networked games of Wesnoth.
55
56 %description server -l pl
57 Serwer do prowadzenia sieciowych gier Wesnoth.
58
59 %package tools
60 Summary:        Tools for Wesnoth
61 Summary(pl):    Narzêdzia dla Wesnoth
62 Group:          X11/Applications/Games/Strategy
63 Requires:       %{name} = %{version}-%{release}
64
65 %description tools
66 Map editor and translations tools.
67
68 %description tools -l pl
69 Edytor map i narzêdzia do t³umaczeñ.
70
71 %prep
72 %setup -q
73 %patch0 -p1
74
75 %build
76 %{__gettextize}
77 %{__aclocal}
78 %{__autoconf}
79 %{__autoheader}
80 %{__automake}
81 %configure \
82         %{?with_server:--enable-server} \
83         %{?with_tools:--enable-editor} \
84         %{?with_tools:--enable-tools}
85 %{__make}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d}
90
91 %{__make} install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 install images/wesnoth-icon.png $RPM_BUILD_ROOT%{_pixmapsdir}
95 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
96 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
97
98 %find_lang %{name} --all-name
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post server
104 /sbin/chkconfig --add wesnothd
105 if [ -f /var/lock/subsys/wesnothd ]; then
106         /etc/rc.d/init.d/wesnothd restart >&2
107 else
108         echo "Run \"/etc/rc.d/init.d/wesnothd start\" to start wesnothd." >&2
109 fi
110
111 %preun server
112 if [ "$1" = "0" ]; then
113         if [ -f /var/lock/subsys/wesnothd ]; then
114                 /etc/rc.d/init.d/wesnothd stop
115         fi
116         /sbin/chkconfig --del wesnothd
117 fi
118
119 %files -f %{name}.lang
120 %defattr(644,root,root,755)
121 %doc changelog README MANUAL*
122 %attr(755,root,root) %{_bindir}/wesnoth
123 %attr(755,root,root) %{_bindir}/wmlxgettext
124 %{_mandir}/man6/wesnoth.6*
125 %lang(de) %{_mandir}/de/man6/wesnoth.6*
126 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
127 %lang(en_GB) %{_mandir}/en_GB/man6/wesnoth.6*
128 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
129 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
130 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
131 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
132 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
133 %{_datadir}/%{name}
134 %{_desktopdir}/%{name}.desktop
135 %{_pixmapsdir}/*
136
137 %if %{with server}
138 %files server
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_bindir}/wesnothd
141 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
142 %{_mandir}/man6/wesnothd.6*
143 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
144 %lang(de) %{_mandir}/de/man6/wesnothd.6*
145 %lang(en_GB) %{_mandir}/en_GB/man6/wesnothd.6*
146 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
147 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
148 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
149 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
150 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
151 %dir /var/run/wesnothd
152 %endif
153
154 %if %{with tools}
155 %files tools
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_bindir}/cutter
158 %attr(755,root,root) %{_bindir}/exploder
159 %attr(755,root,root) %{_bindir}/wesnoth_editor
160 %{_mandir}/man6/wesnoth_editor.6*
161 %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
162 %lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
163 %lang(en_GB) %{_mandir}/en_GB/man6/wesnoth_editor.6*
164 %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
165 %lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
166 %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
167 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth_editor.6*
168 %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
169 %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
170 %endif
This page took 0.091379 seconds and 4 git commands to generate.