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