File xchat.spec of Package xchat
#
# spec file for package xchat
#
# Copyright (c) 2012 SUSE LINUX Products 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: xchat
Version: 2.8.8
Release: 0
Summary: An IRC Client
License: GPL-2.0+
Group: Productivity/Networking/IRC
Url: http://xchat.org
Source0: http://xchat.org/files/source/2.8/%{name}-%{version}.tar.bz2
# Sources for hicolor icons of required sizes (upstream bug sf#3428147)
Source1: xchat-24.png
Source2: xchat-32.png
Source3: xchat-48.png
Source4: xchat-64.png
Source5: xchat-128.png
Source6: xchat-256.png
Source7: xchat-scalable.svg
Patch0: %{name}-gettext.diff
Patch1: %{name}-tabs_outgoing_msg.patch
Patch2: %{name}-automake-foreign.diff
Patch3: %{name}-susefont.diff
Patch4: %{name}-ssl.patch
Patch5: browser.patch
Patch6: xchat-no-versionscript.patch
Patch7: xchat-desktop-launch.patch
Patch8: fixme.diff
Patch9: xchat-2.8.6-not-stupid-149670.patch
Patch10: %{name}-2.8.6-string-literal.patch
# PATCH-FIX-UPSTREAM xchat-2.8.8-libnotify07.patch zaitor@opensuse.org -- Fix to work with libnotify 0.7, http://sourceforge.net/tracker/index.php?func=detail&aid=3109838&group_id=239&atid=100239
Patch11: xchat-2.8.8-libnotify07.patch
# PATCH-FIX-UPSTREAM xchat-link-against-libnotify.patch zaitor@opensuse.org -- Directly link to libnotify, http://sourceforge.net/tracker/?func=detail&aid=3280223&group_id=239&atid=100239
Patch12: xchat-link-against-libnotify.patch
# PATCH-FIX-UPSTREAM xchat-glib-2.31.patch sf#3446968 dimstar@opensuse.org -- Fix build with glib 2.31.
Patch13: xchat-glib-2.31.patch
BuildRequires: fdupes
BuildRequires: gnome-patch-translation
# BuildRequires for installing hicolor icons
BuildRequires: hicolor-icon-theme
BuildRequires: libsexy-devel
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: python-devel
BuildRequires: tcl-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
# BuildRequires because of patch12 -- xchat-link-against-libnotify.patch
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libxml-2.0)
Requires: /usr/bin/notify-send
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
%description
X-Chat is yet another IRC client for the X Window System. It uses the
Gtk+ toolkit. It is easy to use compared to the other Gtk+ IRC clients
and it has a nicely designed interface.
%package perl
Summary: An IRC Client - Support for perl plugins
Group: Productivity/Networking/IRC
Requires: %{name} = %{version}
Requires: perl = %{perl_version}
Supplements: packageand(%{name}:perl)
%description perl
X-Chat is yet another IRC client for the X Window System. It uses the
Gtk+ toolkit. It is easy to use compared to the other Gtk+ IRC clients
and it has a nicely designed interface.
This package contains the files necessary to support perl plugins.
%package python
Summary: An IRC Client - Support for python plugins
Group: Productivity/Networking/IRC
Requires: %{name} = %{version}
Supplements: packageand(%{name}:python)
%description python
X-Chat is yet another IRC client for the X Window System. It uses the
Gtk+ toolkit. It is easy to use compared to the other Gtk+ IRC clients
and it has a nicely designed interface.
This package contains the files necessary to support python plugins.
%package tcl
Summary: An IRC Client - Support for tcl plugins
Group: Productivity/Networking/IRC
Requires: %{name} = %{version}
Supplements: packageand(%{name}:tcl)
%description tcl
X-Chat is yet another IRC client for the X Window System. It uses the
Gtk+ toolkit. It is easy to use compared to the other Gtk+ IRC clients
and it has a nicely designed interface.
This package contains the files necessary to support tcl plugins.
%lang_package
%prep
%setup -q
gnome-patch-translation-prepare
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
%patch6 -p1
%patch7
%patch8 -p1
%patch9 -p1
%patch10
%patch11 -p1
%patch12 -p1
%patch13 -p1
gnome-patch-translation-update
%build
gettextize -f
autoreconf -f -i
test -f po/Makevars || mv po/Makevars.template po/Makevars
%configure\
--libexecdir=%{_prefix}/lib/%{name}\
--disable-panel\
--enable-python\
--enable-perl\
--enable-tcl=%{_libdir}\
--enable-openssl\
--enable-japanese-conv\
--enable-ipv6\
--enable-zvt\
--enable-gnome
make %{?_smp_mflags}
%install
%make_install
# Install hi-res icons in the hicolor icons directory
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/xchat.png
install -D -m 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/xchat.png
install -D -m 644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/xchat.png
install -D -m 644 %{SOURCE4} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/xchat.png
install -D -m 644 %{SOURCE5} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/xchat.png
install -D -m 644 %{SOURCE6} %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/xchat.png
install -D -m 644 %{SOURCE7} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/xchat.svg
# Remove the old single-size icon from /usr/share/pixmaps
rm %{buildroot}%{_datadir}/pixmaps/xchat.png
%suse_update_desktop_file -N "XChat" -G "IRC Client" -C "" %{name} IRCClient
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
rm %{buildroot}%{_libdir}/*/*/*.*a
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%post
%if 0%{?suse_version} > 1130
%desktop_database_post
%icon_theme_cache_post
%else
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
%endif
%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%icon_theme_cache_postun
%else
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
%endif
%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc README* COPYING ChangeLog faq.html INSTALL
%{_bindir}/*
%dir %{_libdir}/xchat
%dir %{_libdir}/xchat/plugins
%{_datadir}/applications/xchat.desktop
%{_datadir}/icons/hicolor/*/apps/xchat.*
%{_datadir}/dbus-1/services/org.xchat.service.service
%files perl
%defattr(-,root,root)
%{_libdir}/xchat/plugins/perl.so
%files python
%defattr(-,root,root)
%{_libdir}/xchat/plugins/python.so
%files tcl
%defattr(-,root,root)
%{_libdir}/xchat/plugins/tcl.so
%files lang -f %{name}.lang
%changelog