]> git.pld-linux.org Git - packages/crossfire.git/blob - crossfire.spec
- up to 1.75.0
[packages/crossfire.git] / crossfire.spec
1 Summary:        Multiplayer roguelike game server
2 Summary(pl.UTF-8):      Serwer gry roguelike dla wielu graczy
3 Name:           crossfire
4 Version:        1.75.0
5 Release:        1
6 License:        GPL v2+
7 Group:          X11/Applications/Games
8 Source0:        https://downloads.sourceforge.net/crossfire/%{name}-%{version}.tar.gz
9 # Source0-md5:  7d2e39294056ad521f603dfc31c2cf7f
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}.logrotate
13 Patch0:         python3.patch
14 URL:            https://crossfire.real-time.com/
15 BuildRequires:  autoconf >= 2.50
16 BuildRequires:  automake
17 BuildRequires:  check
18 BuildRequires:  cproto
19 BuildRequires:  libtool
20 BuildRequires:  python3-devel
21 BuildRequires:  rpmbuild(macros) >= 1.268
22 BuildRequires:  xorg-lib-libX11-devel
23 BuildRequires:  xorg-lib-libXaw-devel
24 BuildRequires:  xorg-lib-libXmu-devel
25 BuildRequires:  xorg-lib-libXt-devel
26 Requires(post,preun):   /sbin/chkconfig
27 %pyrequires_eq  python3
28 Requires:       crossfire-maps
29 Requires:       rc-scripts
30 Conflicts:      logrotate < 3.8.0
31 Obsoletes:      crossfire-editor < 1.75.0
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _localstatedir  /var/lib
35
36 %description
37 This is a multiplayer graphical arcade and adventure game made for the
38 X-Window environment. There are also Windows and Java clients
39 available.
40
41 It has certain flavours from other games, especially Gauntlet (TM) and
42 Nethack/Moria.
43
44 Any number of players can move around in their own window, finding and
45 sing items and battle monsters. They can choose to cooperate or
46 compete in the same "world".
47
48 %description -l pl.UTF-8
49 To jest graficzna gra przygodowa dla środowiska X-Window. Są także
50 dostępni klienci pod Windows i w Javie.
51
52 %package editor
53 Summary:        Crossfire map editor
54 Summary(pl.UTF-8):      Edytor map Crossfire
55 Group:          X11/Applications/Games
56
57 %description editor
58 Crossfire map editor.
59
60 %description editor -l pl.UTF-8
61 Edytor map Crossfire.
62
63 %package doc
64 Summary:        Crossfire game documentation
65 Summary(pl.UTF-8):      Dokumentacja gry Crossfire
66 Group:          Documentation
67
68 %description doc
69 Crossfire documentation for players. Includes handbook and spoiler.
70
71 %description doc -l pl.UTF-8
72 Dokumentacja dla graczy Crossfire. Zawiera podręcznik oraz spoiler.
73
74 %package plugin-python
75 Summary:        Python plugin for Crossfire server
76 Summary(pl.UTF-8):      Wtyczka Pythona dla serwera Crossfire
77 Group:          X11/Applications/Games
78 Requires:       %{name} = %{version}-%{release}
79
80 %description plugin-python
81 Python plugin for Crossfire server.
82
83 %description plugin-python -l pl.UTF-8
84 Wtyczka Pythona dla serwera Crossfire.
85
86 %package plugin-anim
87 Summary:        Animation plugin for Crossfire server
88 Summary(pl.UTF-8):      Wtyczka animacji dla serwera Crossfire
89 Group:          X11/Applications/Games
90 Requires:       %{name} = %{version}-%{release}
91
92 %description plugin-anim
93 Animation plugin for Crossfire server.
94
95 %description plugin-anim -l pl.UTF-8
96 Wtyczka animacji dla serwera Crossfire.
97
98 %prep
99 %setup -q
100 %patch0 -p1
101
102 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
103       utils/cfdb_convert
104
105 %build
106 %configure \
107         PYTHON=%{__python3} \
108         PYTHON_LIBS="`python3-config --libs --embed`" \
109         --disable-static
110
111 %{__make} V=1
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT{/var/log,/etc/{sysconfig,%{name},logrotate.d},/etc/rc.d/init.d} \
116         $RPM_BUILD_ROOT%{_localstatedir}/%{name}/{tmp,maps}
117
118 %{__make} install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %{__rm} $RPM_BUILD_ROOT%{_libdir}/crossfire/plugins/*.la
122 %{__rm} $RPM_BUILD_ROOT%{_bindir}/crossloop*
123 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/crossloop*.6*
124 %{__rm} $RPM_BUILD_ROOT%{_bindir}/player_dl.pl
125 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
126 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
127 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
128 touch $RPM_BUILD_ROOT/var/log/crossfire
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post
134 /sbin/chkconfig --add crossfire
135 %service crossfire restart "Crossfire server"
136
137 %preun
138 if [ "$1" = "0" ]; then
139         %service crossfire stop
140         /sbin/chkconfig --del crossfire
141 fi
142
143 %files
144 %defattr(644,root,root,755)
145 %doc AUTHORS README.rst ChangeLog
146 %attr(750,root,games) %{_bindir}/crossfire-server
147 %attr(755,root,games) %{_bindir}/cfdb_convert
148 %dir %attr(750,root,games) %{_datadir}/crossfire
149 %{_datadir}/crossfire/*
150 %{_mandir}/man6/crossfire-server.6*
151 %dir %attr(770,root,games) %{_localstatedir}/crossfire
152 %dir %attr(770,root,games) %{_localstatedir}/crossfire/players
153 %dir %attr(770,root,games) %{_localstatedir}/crossfire/unique-items
154 %dir %attr(770,root,games) %{_localstatedir}/crossfire/tmp
155 %dir %attr(770,root,games) %{_localstatedir}/crossfire/maps
156 %attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/crossfire/bookarch
157 %attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/crossfire/highscore
158 %attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/crossfire/temp.maps
159 %attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/crossfire/clockdata
160 %attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/crossfire/banish_file
161 %dir %{_sysconfdir}/crossfire
162 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/crossfire/*
163 %attr(754,root,root) /etc/rc.d/init.d/crossfire
164 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/crossfire
165 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/crossfire
166 %attr(660,root,games) %config(noreplace) %verify(not md5 mtime size) /var/log/crossfire
167 %dir %{_libdir}/crossfire
168 %dir %{_libdir}/crossfire/plugins
169 %attr(755,root,root) %{_libdir}/crossfire/plugins/cfcitybell.so
170 %attr(755,root,root) %{_libdir}/crossfire/plugins/citylife.so
171 %if "%{_libexecdir}" != "%{_libdir}"
172 %dir %{_libexecdir}/crossfire
173 %endif
174 %attr(755,root,root) %{_libexecdir}/crossfire/random_map
175
176 %files doc
177 %defattr(644,root,root,755)
178 %doc doc/{handbook.ps,spoiler.ps}
179 %doc doc/{stats.txt,commands.txt,survival-guide.txt}
180 %doc doc/{skills.txt,runes-guide.txt}
181
182 %files plugin-python
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/crossfire/plugins/cfpython.so
185
186 %files plugin-anim
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libdir}/crossfire/plugins/cfanim.so
This page took 0.089389 seconds and 4 git commands to generate.