File xsys.spec of Package xsys

#
# spec file for package xsys
#
# Copyright (c) 2017 Packman Team <packman@links2linux.de>
# Copyright (c) 2009-2013 detlef@links2linux.de
#
# 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.links2linux.org/
#


%if 0%{?suse_version} > 1320 || (0%{?sle_version} == 120200 && 0%{?is_opensuse})
%define prj he
%endif
Name:           xsys
Version:        2.2.0
Release:        0
Summary:        X-Sys system information plugin for X-Chat
License:        GPL-2.0+
Group:          Productivity/Networking/IRC
Url:            http://dev.gentoo.org/~chainsaw/xsys
Source0:        http://dev.gentoo.org/~chainsaw/xsys/download/%{name}-%{version}.tar.bz2
#PATCH-FIX-OPENSUSE xsys-fix-bufferoverflowstrncat-error.patch malcolmlewis@opensuse.org -- Fix Statement might be overflowing a buffer errors.
Patch0:         xsys-fix-bufferoverflowstrncat-error.patch
BuildRequires:  audacious-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  glib2-devel
BuildRequires:  libaudclient-devel
BuildRequires:  pciutils-devel
BuildRequires:  pkgconfig
BuildRequires:  xchat
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
X-Sys is a system information plugin for X-Chat, originally created by
Michael Shoup. It gathers various information about your computer, which
it can display for you privately, or for others to see in an IRC channel
or private conversation.

The plugin can display the following information:

    * Number of CPU's and their specifications
    * Operating system information
    * Video card type
    * Sound card type
    * Memory and swap usage
    * Disk usage
    * Ethernet card type
    * Network traffic, both current and total
    * Currently playing song in XMMS or Audacious

%prep
%setup -q
%patch -P 0 -p1

%build
make %{?_smp_mflags}

%install
install -Dm0644 {./,%{buildroot}/%{_libdir}/%{?prj}xchat/plugins/}%{name}-%{version}.so

%files
%defattr(-, root, root)
%doc ChangeLog README
%{_libdir}/*xchat

%changelog