179 lines
5.3 KiB
RPMSpec
179 lines
5.3 KiB
RPMSpec
Name: liquidwar
|
|
Version: 5.6.3
|
|
Release: 2%{?dist}
|
|
Summary: Multiplayer wargame with liquid armies
|
|
Group: Amusements/Games
|
|
License: GPL
|
|
URL: http://www.ufoot.org/liquidwar/v5
|
|
Source0: http://download.savannah.nongnu.org/releases/%{name}/%{name}-%{version}.tar.gz
|
|
Source1: liquidwar.init
|
|
Source2: liquidwar.sysconfig
|
|
Source3: liquidwar.logrotate
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
BuildRequires: allegro-devel allegro-tools tetex-latex python texinfo
|
|
Requires(post): /sbin/install-info
|
|
Requires(preun): /sbin/install-info
|
|
|
|
%description
|
|
Liquid War is a unique multiplayer wargame. You control an army of liquid
|
|
and have to try and eat your opponents. A single player mode is available,
|
|
but the game is definitely designed to be multiplayer, and has network
|
|
support.
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for the LiquidWar game in additional formats
|
|
Group: Documentation
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description doc
|
|
This package contains the documentation of LiquidWar in html, pdf, ps and txt
|
|
format.
|
|
|
|
|
|
%package server
|
|
Summary: Network game server for the LiquidWar game
|
|
Group: Amusements/Games
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires(pre): /usr/sbin/useradd
|
|
Requires(post): /sbin/chkconfig
|
|
Requires(preun): /sbin/chkconfig /sbin/service
|
|
Requires(postun): /sbin/service
|
|
|
|
%description server
|
|
This package contains the server for hosting network LiquidWar games.
|
|
|
|
|
|
%prep
|
|
%setup -q
|
|
# don't strip the binaries please
|
|
sed -i 's/install -s/install/g' Makefile.in
|
|
# fix manpage doc reference
|
|
sed -i \
|
|
-e 's:^\.B /usr/share/doc/liquidwar $:\.B %{_docdir}/%{name}-doc-%{version}:' \
|
|
-e 's:^or $:directory (from :' \
|
|
-e 's:^\.B /usr/local/share/doc/liquidwar$:the %{name}-doc :' \
|
|
-e 's:^directories, :package), :' \
|
|
doc/man/begin.man.in
|
|
# fix metaserer url
|
|
sed -i 's#http://www.ufoot.org/liquidwar/metaserver.php3#http://www.ufoot.org/liquidwar/v5/metaserver#g' \
|
|
doc/xml/*.xml
|
|
|
|
|
|
%build
|
|
%configure \
|
|
%ifnarch %{ix86}
|
|
--disable-asm
|
|
%endif
|
|
|
|
make %{?_smp_mflags} GAMEDIR=%{_bindir} DATADIR=%{_datadir}/%{name}
|
|
|
|
# make docs utf-8
|
|
iconv -f ISO-8859-1 -t UTF8 doc/man/%{name}.6 | gzip > doc/man/%{name}.6.gz
|
|
gzip -cd doc/info/%{name}.info.gz | \
|
|
iconv -f ISO-8859-1 -t UTF8 > doc/info/%{name}.info
|
|
gzip -f doc/info/%{name}.info
|
|
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
make install_nolink DESTDIR=$RPM_BUILD_ROOT GAMEDIR=%{_bindir} \
|
|
DATADIR=%{_datadir}/%{name}
|
|
mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name} liquidwardocs
|
|
rm $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.xpm
|
|
|
|
# below is the desktop file and icon stuff.
|
|
desktop-file-install --delete-original --vendor fedora \
|
|
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
|
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{32x32,48x48}/apps
|
|
install -p -m 644 misc/%{name}_32x32.xpm \
|
|
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm
|
|
install -p -m 644 misc/%{name}.xpm \
|
|
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.xpm
|
|
|
|
install -p -D -m 755 %{SOURCE1} \
|
|
$RPM_BUILD_ROOT/%{_initrddir}/%{name}-server
|
|
install -p -D -m 644 %{SOURCE2} \
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/%{name}-server
|
|
install -p -D -m 644 %{SOURCE3} \
|
|
$RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{name}-server
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%post
|
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
touch --no-create %{_datadir}/icons/hicolor || :
|
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 = 0 ]; then
|
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
fi
|
|
|
|
%postun
|
|
touch --no-create %{_datadir}/icons/hicolor || :
|
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
fi
|
|
|
|
|
|
%pre server
|
|
user_uid=`id -u %{name} 2>/dev/null`
|
|
if [ x"$user_uid" = x ] ; then
|
|
/usr/sbin/useradd -r -s /sbin/nologin -d %{_datadir}/%{name} -M \
|
|
-c 'LiquidWar Server' \
|
|
%{name} >/dev/null || :
|
|
fi
|
|
|
|
%post server
|
|
/sbin/chkconfig --add %{name}-server
|
|
|
|
%preun server
|
|
if [ "$1" -le "0" ]; then
|
|
/sbin/service %{name}-server stop > /dev/null 2>&1
|
|
/sbin/chkconfig --del %{name}-server
|
|
fi
|
|
|
|
%postun server
|
|
if [ "$1" -ge "1" ]; then
|
|
/sbin/service %{name}-server condrestart > /dev/null 2>&1
|
|
fi
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc COPYING README
|
|
%{_bindir}/%{name}
|
|
%{_bindir}/%{name}-mapgen
|
|
%{_datadir}/%{name}
|
|
%{_infodir}/%{name}.*
|
|
%{_mandir}/man6/%{name}.6.gz
|
|
%{_mandir}/man6/%{name}-mapgen.6.gz
|
|
%{_datadir}/applications/fedora-%{name}.desktop
|
|
%{_datadir}/icons/hicolor/*/apps/%{name}.xpm
|
|
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%doc liquidwardocs/*
|
|
|
|
%files server
|
|
%{_bindir}/%{name}-server
|
|
%{_mandir}/man6/%{name}-server.6.gz
|
|
%{_initrddir}/%{name}-server
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-server
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-server
|
|
|
|
|
|
%changelog
|
|
* Thu Nov 23 2006 Wart <wart@kobold.org> 5.6.3-2
|
|
- Added init.d startup and logrotate scripts for the game server
|
|
- Put the game server in its own subpackage
|
|
|
|
* Sun Nov 19 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 5.6.3-1
|
|
- Initial Fedora Extras package
|