File tetrinet-server.spec of Package tetrinet-server
#
# spec file for package tetrinet-server (Version 1.13.16)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: tetrinet-server
BuildRequires: libadns-devel
%define realname tetrinetx
%define qirc_version 1.40c
Version: 1.13.16
Release: 246
Autoreqprov: on
Group: Amusements/Games/Logic
License: GPL v2 or later
URL: http://tetrinetx.sourceforge.net/
Summary: The GNU TetriNET server
Source: %{realname}-%{version}+qirc-%{qirc_version}.tar.bz2
Source1: tetrinet-server
Patch2: %{realname}.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Tetrinetx-qirc1.40c with Async DNS support for high productivity
server.
Authors:
--------
Brendan Grieve <brg@cheerful.com>
Roongroj Phoophuangpairoj <drslum@tetrinet.org>
%prep
%setup -n %{realname}-%{version}+qirc-%{qirc_version}
%patch2
%build
%{?suse_update_config:%{suse_update_config -f}}
export CFLAGS="$RPM_OPT_FLAGS"
cd src
sed -e 's@\(^#define [[:alnum:]_]* *"\)\(game\.\)@\1%{_datadir}/%{realname}/\2@' \
config.h >config.h1
mv config.h1 config.h
sed -e 's@\(^pidfile=\)\(game\.pid$\)@\1%{_datadir}/%{realname}/\2@' \
../bin/game.conf >../bin/game.conf1
mv ../bin/game.conf1 ../bin/game.conf
INCLUDE_DIR=$RPM_BUILD_ROOT%{_includedir} \
LIB_DIR=$RPM_BUILD_ROOT%{_libdir} \
./c
%install
rm -rf $RPM_BUILD_ROOT/*
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mv bin/tetrix.linux $RPM_BUILD_ROOT%{_bindir}/%{realname}
ln -sf %{_bindir}/%{realname} $RPM_BUILD_ROOT%{_bindir}/%{name}
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/%{realname}
cp -r bin/* $RPM_BUILD_ROOT%{_datadir}/%{realname}/
#install SuSEfirewall2 sysconfig file; Bug #247357
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/tetrinet-server
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README README.qirc.spectators
%{_bindir}/*
%{_datadir}/%{realname}/
#install SuSEfirewall2 sysconfig file; Bug #247357
/etc/sysconfig/SuSEfirewall2.d/services/tetrinet-server
%changelog
* Mon Aug 06 2007 - lmichnovic@suse.cz
- installing SuSEfirewall2 sysconfig file named tetrinet-server
[#247357]
* Sat Oct 28 2006 - meissner@suse.de
- use RPM_OPT_FLAGS
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Aug 27 2004 - kukuk@suse.de
- Don't include own adns library, use the one from the system
* Thu Jul 31 2003 - mjancar@suse.cz
- use %%run_ldconfig
* Sun Nov 17 2002 - prehak@suse.cz
- fixed %%_libdir
* Thu Nov 14 2002 - prehak@suse.cz
- initial version 1.13.16 of this package