308 lines
11 KiB
RPMSpec
308 lines
11 KiB
RPMSpec
%global logwatch_root %{_datadir}/logwatch
|
|
%global logwatch_conf %{logwatch_root}/dist.conf
|
|
%global logwatch_scripts %{logwatch_root}/scripts
|
|
|
|
Name: xpilot-ng
|
|
Version: 4.7.3
|
|
Release: 6%{?dist}
|
|
Summary: Multiplayer space arcade game
|
|
|
|
Group: Amusements/Games
|
|
License: GPLv2+
|
|
URL: http://xpilot.sourceforge.net
|
|
Source0: http://downloads.sourceforge.net/sourceforge/xpilot/xpilot-ng-%{version}.tar.gz
|
|
Source1: xpilot-ng.png
|
|
Source2: xpilot-ng-x11.desktop
|
|
Source3: xpilot-ng-sdl.desktop
|
|
Source4: xpilot-ng-server.service
|
|
Source5: xpilot-ng.sysconfig
|
|
Source6: xpilot-ng.logrotate
|
|
Source10: logwatch.logconf.xpilot
|
|
Source11: logwatch.script.xpilot
|
|
Source12: logwatch.serviceconf.xpilot
|
|
Source13: logwatch.shared.applyxpilotdate
|
|
Patch0: xpilot-ng-4.7.2-scoreassert.patch
|
|
Patch1: xpilot-ng-4.7.2-rhbz830640.patch
|
|
|
|
BuildRequires: desktop-file-utils
|
|
BuildRequires: expat-devel SDL_ttf-devel SDL_image-devel zlib-devel
|
|
BuildRequires: libXt-devel libGLU-devel libXxf86misc-devel
|
|
Requires: dejavu-sans-fonts
|
|
|
|
%description
|
|
A highly addictive, infinitely configurable multiplayer space
|
|
arcade game. You pilot a spaceship around space, dodging
|
|
obstacles, shooting players and bots, collecting power-ups, and
|
|
causing general mayhem.
|
|
|
|
|
|
%package server
|
|
Summary: Server for hosting xpilot games
|
|
Group: Amusements/Games
|
|
Requires(pre): shadow-utils
|
|
Requires(post): systemd-units
|
|
Requires(preun): systemd-units
|
|
Requires(postun): systemd-units
|
|
# Make sure the old no longer supported selinux policy from 4.7.2 gets removed
|
|
Obsoletes: %{name}-selinux < %{version}
|
|
|
|
%description server
|
|
The xpilot server. This allows you to host xpilot games on your
|
|
computer and develop new xpilot maps. This is required if you
|
|
are playing alone, but not required if you are joining one of the
|
|
public xpilot games hosted on the internet.
|
|
|
|
|
|
%package logwatch
|
|
Summary: logwatch scripts for the xpilot game server
|
|
Group: Amusements/Games
|
|
Requires: %{name}-server = %{version}-%{release} logwatch
|
|
%description logwatch
|
|
logwatch scripts for the Xpilot game server
|
|
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0
|
|
%patch1 -p1
|
|
pushd doc/man
|
|
iconv --from=ISO-8859-1 --to=UTF-8 xpilot-ng-server.man > xpilot-ng-server.man.new
|
|
mv xpilot-ng-server.man.new xpilot-ng-server.man
|
|
iconv --from=ISO-8859-1 --to=UTF-8 xpilot-ng-x11.man > xpilot-ng-x11.man.new
|
|
mv xpilot-ng-x11.man.new xpilot-ng-x11.man
|
|
popd
|
|
|
|
|
|
%build
|
|
%configure
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
%install
|
|
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|
|
|
chmod a+x $RPM_BUILD_ROOT/%{_datadir}/%{name}/mapconvert.py
|
|
|
|
desktop-file-install \
|
|
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
|
|
%{SOURCE2}
|
|
desktop-file-install \
|
|
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
|
|
%{SOURCE3}
|
|
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
|
|
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
|
|
|
|
install -p -D -m 644 %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/%{name}-server.service
|
|
|
|
# Copy certain configuration files to /etc so that they can be properly managed
|
|
# as config files.
|
|
install -p -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}-server-cmdline-opts
|
|
install -p -D -m 644 lib/defaults.txt $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/defaults.txt
|
|
install -p -D -m 600 lib/password.txt $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/password.txt
|
|
|
|
install -p -D -m 644 %{SOURCE6} \
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{name}-server
|
|
|
|
# Replace bundled fonts with system fonts
|
|
|
|
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/FreeSansBoldOblique.ttf
|
|
ln -s %{_datadir}/fonts/dejavu/DejaVuSans-BoldOblique.ttf $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/FreeSansBoldOblique.ttf
|
|
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/VeraMoBd.ttf
|
|
ln -s %{_datadir}/fonts/dejavu/DejaVuSansMono-Bold.ttf $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/VeraMoBd.ttf
|
|
|
|
|
|
# Install logwatch files
|
|
install -pD -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{logwatch_conf}/logfiles/%{name}.conf
|
|
install -pD -m 0755 %{SOURCE11} $RPM_BUILD_ROOT%{logwatch_scripts}/services/%{name}
|
|
install -pD -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{logwatch_conf}/services/%{name}.conf
|
|
install -pD -m 0755 %{SOURCE13} $RPM_BUILD_ROOT%{logwatch_scripts}/shared/applyxpilotdate
|
|
|
|
|
|
%post
|
|
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
|
%postun
|
|
if [ $1 -eq 0 ] ; then
|
|
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
|
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
fi
|
|
|
|
%posttrans
|
|
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
|
|
|
%pre server
|
|
getent group xpilot >/dev/null || groupadd -r xpilot
|
|
getent passwd xpilot >/dev/null || \
|
|
useradd -r -g xpilot -d %{_datadir}/%{name} -s /sbin/nologin \
|
|
-c "xpilot game server" xpilot
|
|
exit 0
|
|
|
|
%post server
|
|
if [ $1 -eq 1 ] ; then
|
|
# Initial installation
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
%preun server
|
|
if [ $1 -eq 0 ] ; then
|
|
# Package removal, not upgrade
|
|
/bin/systemctl --no-reload disable xpilot-ng-server.service > /dev/null 2>&1 || :
|
|
/bin/systemctl stop xpilot-ng-server.service > /dev/null 2>&1 || :
|
|
fi
|
|
|
|
%postun server
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
if [ $1 -ge 1 ] ; then
|
|
# Package upgrade, not uninstall
|
|
/bin/systemctl try-restart xpilot-ng-server.service >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
|
|
%files
|
|
%{_bindir}/xpilot-ng-replay
|
|
%{_bindir}/xpilot-ng-sdl
|
|
%{_bindir}/xpilot-ng-x11
|
|
%dir %{_datadir}/%{name}
|
|
%{_datadir}/%{name}/textures
|
|
%{_datadir}/%{name}/fonts
|
|
%{_datadir}/applications/*.desktop
|
|
%{_datadir}/icons/hicolor/48x48/apps/*.png
|
|
%{_mandir}/man6/xpilot-ng-replay.6.gz
|
|
%{_mandir}/man6/xpilot-ng-sdl.6.gz
|
|
%{_mandir}/man6/xpilot-ng-x11.6.gz
|
|
%doc README COPYING
|
|
|
|
%files server
|
|
%{_bindir}/xpilot-ng-xp-mapedit
|
|
%{_bindir}/xpilot-ng-server
|
|
/lib/systemd/system/xpilot-ng-server.service
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-server
|
|
%{_datadir}/%{name}
|
|
%dir %{_sysconfdir}/%{name}
|
|
%config(noreplace) %attr(0600,xpilot,root) %{_sysconfdir}/%{name}/password.txt
|
|
%config(noreplace) %{_sysconfdir}/%{name}/defaults.txt
|
|
%config(noreplace) %{_sysconfdir}/%{name}/xpilot-ng-server-cmdline-opts
|
|
%{_mandir}/man6/xpilot-ng-server.6.gz
|
|
%{_mandir}/man6/xpilot-ng-xp-mapedit.6.gz
|
|
%doc README COPYING
|
|
|
|
%files logwatch
|
|
%{logwatch_conf}/logfiles/%{name}.conf
|
|
%{logwatch_conf}/services/%{name}.conf
|
|
%{logwatch_scripts}/services/%{name}
|
|
%{logwatch_scripts}/shared/applyxpilotdate
|
|
|
|
|
|
%changelog
|
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.3-6
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.3-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.3-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Sun Feb 10 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 4.7.3-3
|
|
- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077
|
|
|
|
* Sun Jul 27 2012 Hans de Goede <hdegoede@redhat.com> - 4.7.3-2
|
|
- Move server cmdline config file to /etc/xpilot-ng, where all the other
|
|
config-files are. You can now find it here:
|
|
/etc/xpilot/xpilot-ng-server-cmdline-opts
|
|
|
|
* Sun Jul 27 2012 Hans de Goede <hdegoede@redhat.com> - 4.7.3-1
|
|
- Fix a crash in the welcome screen (rhbz#830640)
|
|
- Upgrade to latest upstream 4.7.3
|
|
- Drop selinux module, it no longer compiles and selinux support belongs
|
|
in selinux-policy*, not in the apps themselves
|
|
- Replace sysv init script by a systemd unit file
|
|
|
|
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-22
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-21
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-20
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Sun Apr 25 2010 Wart <wart@kobold.org> - 4.7.2-19
|
|
- Replace bundled fonts with system fonts (BZ #477487)
|
|
|
|
* Fri Jan 15 2010 Hans de Goede <hdegoede@redhat.com> - 4.7.2-18
|
|
- Fix FTBFS (#511717)
|
|
|
|
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-17
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-16
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 4.7.2-15
|
|
- Rebuild for Python 2.6
|
|
|
|
* Fri Feb 18 2008 Wart <wart at kobold.org>
|
|
- Better Sourceforge download URL
|
|
|
|
* Fri Feb 18 2008 Wart <wart at kobold.org> 4.7.2-14
|
|
- Rebuild for gcc 4.3
|
|
|
|
* Thu Aug 23 2007 Wart <wart at kobold.org> 4.7.2-13
|
|
- Minor selinux modifications for rawhide
|
|
- License tag clarification
|
|
- Fix version and category fields in .desktop files
|
|
- Use new user creation guidelines
|
|
|
|
* Fri Feb 23 2007 Wart <wart at kobold.org> 4.7.2-12
|
|
- Update logwatch script with a previously unknown log field
|
|
|
|
* Thu Feb 22 2007 Wart <wart at kobold.org> 4.7.2-11
|
|
- Add patch to prevent crash when running with robots not in idle mode
|
|
- Added logwatch files
|
|
- Switch from fedora-usermgmt to vanilla useradd
|
|
|
|
* Tue Aug 29 2006 Wart <wart at kobold.org> 4.7.2-10
|
|
- Added SELinux policies for the game server
|
|
- Don't attempt to create the xpilot user if it already exists
|
|
- Don't ghost the compiled python files anymore
|
|
|
|
* Mon Jul 17 2006 Wart <wart at kobold.org> 4.7.2-9
|
|
- Use the new xpilot user in the init.d script
|
|
- Add info on firewall configuration in the sysconfig script
|
|
- Explicitly disable reporting to the meta server (BZ #199164)
|
|
- Don't restart the server in %%postun unless it was already running.
|
|
|
|
* Tue Jul 11 2006 Wart <wart at kobold.org> 4.7.2-8
|
|
- Fix Requires: for the -server subpackage
|
|
|
|
* Wed Mar 1 2006 Wart <wart at kobold.org> 4.7.2-7
|
|
- Create an xpilot user for running the server daemon
|
|
- Fix typo in logrotate configuration file.
|
|
|
|
* Tue Feb 28 2006 Wart <wart at kobold.org> 4.7.2-6
|
|
- Added sysconfig and initrd files for starting xpilot server at boot time
|
|
- Add copies of customizable configuration files to /etc/xpilot
|
|
- More readable spacing in changelog
|
|
- Add missing ; in desktop file
|
|
- Added RPM_OPT_FLAGS to compile line
|
|
|
|
* Thu Feb 16 2006 Wart <wart at kobold.org> 4.7.2-5
|
|
- Rebuild for FC-5
|
|
|
|
* Mon Feb 6 2006 Wart <wart at kobold.org> 4.7.2-4
|
|
- Don't make duplicates of the doc files for the subpackage.
|
|
- Use version macro is source path
|
|
- Preserve timestamps when installing icons.
|
|
|
|
* Fri Feb 3 2006 Wart <wart at kobold.org> 4.7.2-3
|
|
- Add readme and license files to the server subpackage
|
|
- Set default file attributes for the server subpackage
|
|
|
|
* Fri Feb 3 2006 Wart <wart at kobold.org> 4.7.2-2
|
|
- Allow both packages to 0wn datadir/xpilot-ng
|
|
- Clean up non-utf8 man pages
|
|
|
|
* Thu Feb 2 2006 Wart <wart at kobold.org> 4.7.2-1
|
|
- Initial submission to Fedora Extras
|