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