File hexchat.spec of Package hexchat

#
# spec file for package hexchat
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright Andrey Karepin <egdfree@opensuse.org> 
#
# 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:           hexchat
Summary:        A popular and easy to use graphical IRC (chat) client
License:        GPL-2.0+
Group:          Productivity/Networking/IRC
Version:        2.9.6.1
Release:        0
Source:         http://dl.%{name}.net/%{name}/%{name}-%{version}.tar.xz
Url:            http://www.hexchat.org
BuildRequires:  bison >= 1.35
BuildRequires:  dbus-1-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  fdupes
BuildRequires:  gettext-devel
BuildRequires:  glib2-devel >= 2.14.0
BuildRequires:  gtk2-devel >= 2.10.0
BuildRequires:  libnotify-devel
BuildRequires:  libproxy-devel
BuildRequires:  libsexy-devel
BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
BuildRequires:  pciutils-devel
BuildRequires:  perl >= 5.8.0
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
BuildRequires:  xz
BuildRequires:  perl(ExtUtils::Embed)

Recommends:     %{name}-lang

%description
HexChat is an easy to use graphical IRC chat client for the X Window System.
It allows you to join multiple IRC channels (chat rooms) at the same time, 
talk publicly, private one-on-one conversations etc. Even file transfers
are possible.

%package devel
Summary:        Development Files for HexChat
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
This package includes files needed to develop HexChat modules.

%lang_package

%package plugins-perl
Summary:        Plugin for HexChat adds support for Perl scripts
Group:          System/Libraries
%{?libperl_requires}

%description plugins-perl
The HexChat plugin providing the Perl scripting interface.

%package plugins-python
Summary:        Plugin for HexChat adds support for Python scripts
Group:          System/Libraries

%description plugins-python
The HexChat plugin providing the Python scripting interface.

%prep
%setup -q

%build
%configure \
	--enable-python=python2 \
	--enable-spell=libsexy

make %{?_smp_mflags}

%install
%{make_install}

# Get rid of libtool archives
rm -f %{buildroot}%{_libdir}/hexchat/plugins/*.la

# Remove unused schema
rm -f %{buildroot}%{_sysconfdir}/gconf/schemas/apps_hexchat_url_handler.schemas

# Installer does not provide devel files
rm -f %{buildroot}%{_includedir}/hexchat-plugin.h

%suse_update_desktop_file -r hexchat IRCClient Network

%find_lang %{name}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%{_bindir}/hexchat
%doc share/doc/*
%dir %{_libdir}/hexchat
%dir %{_libdir}/hexchat/plugins
%{_libdir}/hexchat/plugins/checksum.so
%{_libdir}/hexchat/plugins/doat.so
%{_libdir}/hexchat/plugins/fishlim.so
%{_libdir}/hexchat/plugins/sysinfo.so
%{_libdir}/pkgconfig/%{name}-plugin.pc
%{_datadir}/applications/hexchat.desktop
%{_datadir}/icons/hicolor/*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/*.xml
%{_datadir}/dbus-1/services/org.hexchat.service.service
%{_mandir}/man1/hexchat.1.gz

%files lang -f %{name}.lang
%defattr(-,root,root)

%files plugins-perl
%defattr(-,root,root)
%{_libdir}/hexchat/plugins/perl.so

%files plugins-python
%defattr(-,root,root)
%{_libdir}/hexchat/plugins/python.so

%changelog