]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
- updated to 0.7.11
[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:        0.7.11
10 Release:        1
11 License:        GPL v2
12 Group:          X11/Applications/Games/Strategy
13 Icon:           wesnoth-icon.xpm
14 Source0:        http://www.wesnoth.org/files/%{name}-%{version}.tar.gz
15 # Source0-md5:  6eee8a3495aec8d5e509f15bdb7790db
16 Source1:        %{name}.desktop
17 Source2:        %{name}d.init
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 Requires:       SDL_image >= 1.2
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 Battle for Wesnoth is a fantasy strategy game. Battle for control of
29 villages, using variety of units which have advantages and
30 disadvantages in different types of terrains and against different
31 types of attacks. Units gain experience and advance levels, and are
32 carried over from one scenario to the next campaign.
33
34 %description -l pl
35 Battle for Wesnoth jest strategiczn± gr± fantasy. Batalia o
36 kontrolê nad wsiami przy pomocy ró¿nego rodzaju oddzia³ów, które maj±
37 przewagê lub jej brak w odmiennym ukszta³towaniu terenu i przeciwko
38 ró¿nym sposobom ataku. Oddzia³y zdobywaj± do¶wiadczenie i poziomy
39 zaawansowania i s± przenoszene z jednej scenerii do nastêpnej kampani.
40
41 %package server
42 Summary:        Network server for Wesnoth
43 Summary(pl):    Sieciowy serwer dla Wesnoth
44 Group:          X11/Applications/Games/Strategy
45 Requires(post,preun):   /sbin/chkconfig
46
47 %description server
48 Server for playing networked games of Wesnoth.
49
50 %description server -l pl
51 Serwer do prowadzenia sieciowych gier Wesnoth.
52
53 %package tools
54 Summary:        Tools for Wesnoth
55 Summary(pl):    Narzêdzia dla Wesnoth
56 Group:          X11/Applications/Games/Strategy
57 Requires:       %{name} = %{version}
58
59 %description tools
60 Map editor and translations tools.
61
62 %description tools -l pl
63 Edytor map i narzêdzia do t³umaczeñ.
64
65 %prep
66 %setup -q
67
68 %build
69 %configure \
70         %{?with_server:--enable-server} \
71         %{?with_tools:--enable-editor} \
72         %{?with_tools:--enable-tools}
73 %{__make}
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
78 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
79
80 %{__make} install \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 install images/wesnoth-icon.png $RPM_BUILD_ROOT%{_pixmapsdir}
84 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
85 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post server
91 /sbin/chkconfig --add wesnothd
92 if [ -f /var/lock/subsys/wesnothd ]; then
93         /etc/rc.d/init.d/wesnothd restart >&2
94 else
95         echo "Run \"/etc/rc.d/init.d/wesnothd start\" to start wesnothd." >&2
96 fi
97
98 %preun server
99 if [ "$1" = "0" ]; then
100         if [ -f /var/lock/subsys/wesnothd ]; then
101                 /etc/rc.d/init.d/wesnothd stop
102         fi
103         /sbin/chkconfig --del wesnothd
104 fi
105
106 %files
107 %defattr(644,root,root,755)
108 %doc changelog README MANUAL*
109 %attr(755,root,root) %{_bindir}/wesnoth
110 %{_mandir}/man6/wesnoth.6*
111 %{_datadir}/%{name}
112 %{_desktopdir}/%{name}.desktop
113 %{_pixmapsdir}/*
114
115 %if %{with server}
116 %files server
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_bindir}/wesnothd
119 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
120 %{_mandir}/man6/wesnothd.6*
121 %endif
122
123 %if %{with tools}
124 %files tools
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_bindir}/make_translation
127 %attr(755,root,root) %{_bindir}/merge_translations
128 %attr(755,root,root) %{_bindir}/wesnoth_editor
129 %{_mandir}/man6/wesnoth_editor.6*
130 %endif
This page took 0.076519 seconds and 4 git commands to generate.