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