File steamcmd.spec of Package steamcmd

#
# spec file for package steamcmd
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           steamcmd
Version:        0.20160905
Release:        0
Summary:        Command-line version of the Steam client
License:        SUSE-Freeware
Group:          Amusements/Games/Other
Url:            https://developer.valvesoftware.com/wiki/SteamCMD
Source0:        https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
Source1:        https://anonscm.debian.org/cgit/pkg-games/steamcmd.git/plain/debian/steamcmd.6
Source2:        https://anonscm.debian.org/cgit/pkg-games/steamcmd.git/plain/debian/steamcmdcommands.txt
Source3:        https://anonscm.debian.org/cgit/pkg-games/steamcmd.git/plain/debian/steam_install_agreement.txt

%description
The Steam Console Client or SteamCMD is a command-line version of the Steam client.
Its primary use is to install and update various dedicated servers available on
Steam using a command-line interface. It works with games that use the SteamPipe
content system.

%prep
%setup -q -c %{name}-%{version}

%build

%install
install -Dm0755 steam.sh %{buildroot}%{_libexecdir}/steamcmd/steam.sh
install -Dm0755 steamcmd.sh %{buildroot}%{_libexecdir}/steamcmd/steamcmd.sh
install -Dm0755 linux32/steamcmd %{buildroot}%{_libexecdir}/steamcmd/linux32/steamcmd

mkdir -p %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/steamcmd << EOF
#!/bin/sh
exec %{_libexecdir}/steamcmd/steamcmd.sh "\$@"
EOF
chmod +x %{buildroot}%{_bindir}/steamcmd

install -Dm0644 %{SOURCE1} %{buildroot}%{_mandir}/man6/steamcmd.6
install -Dm0644 %{SOURCE2} %{buildroot}%{_docdir}/steamcmd/steamcmdcommands.txt
install -Dm0644 %{SOURCE2} %{buildroot}%{_docdir}/steamcmd/steam_install_agreement.txt

%files
%defattr(-,root,root)
%{_bindir}/steamcmd
%{_libexecdir}/steamcmd
%{_mandir}/man6/steamcmd.6.*
%{_docdir}/steamcmd/

%changelog
openSUSE Build Service is sponsored by