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