2010-11-09 00:33:01 +01:00
#
2012-06-04 09:31:40 +02:00
# spec file for package weechat
2010-11-09 00:33:01 +01:00
#
2012-06-04 09:31:40 +02:00
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
2010-11-09 00:33:01 +01:00
#
# 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/
#
2007-06-09 00:40:41 +02:00
2012-06-04 11:41:05 +02:00
%if 0%{?suse_version} > 1140
2012-06-04 10:57:36 +02:00
%define guile_ver 2.0
2012-06-04 11:41:05 +02:00
%endif
2007-06-09 00:48:34 +02:00
2010-11-09 00:33:01 +01:00
Name : weechat
2012-06-04 09:31:40 +02:00
Version : 0.3.8
2011-01-16 16:23:34 +01:00
Release : 0
2010-11-09 00:33:01 +01:00
Summary : Portable, Fast, Light and Extensible Chat Client
2012-06-04 09:31:40 +02:00
License : GPL-3.0+
Group : Productivity/Networking/IRC
2010-11-09 00:33:01 +01:00
Source : http://www.weechat.org/files/src/weechat-%{version} .tar.bz2
Source1 : weechat.desktop
2012-06-04 10:57:36 +02:00
# PATCH-FIX-UPSTREAM weechat-fix-cmake-guile.patch https://savannah.nongnu.org/patch/index.php?7790 gber@opensuse.org -- Fixes the include dir for guile no being passed to the guild script plugin cmake file
Patch0 : weechat-fix-cmake-guile.patch
2012-06-04 09:31:40 +02:00
Url : http://www.weechat.org
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2012-01-08 16:47:19 +01:00
BuildRequires : cmake
2012-02-26 16:20:25 +01:00
BuildRequires : curl-devel
2012-06-04 09:31:40 +02:00
BuildRequires : gcc-c++
BuildRequires : libtool
2012-01-08 16:47:19 +01:00
BuildRequires : ncurses-devel
BuildRequires : perl
2012-06-04 09:31:40 +02:00
BuildRequires : pkg-config
2012-01-08 16:47:19 +01:00
BuildRequires : python-devel
%if 0%{?suse_version} > 1210
BuildRequires : lua51-devel
%else
BuildRequires : lua-devel
%endif
BuildRequires : ruby-devel
2012-05-21 14:47:16 +02:00
%if 0%{?suse_version} > 1210
BuildRequires : libgnutls-devel
%else
2012-01-08 16:47:19 +01:00
BuildRequires : gnutls-devel
2012-05-21 14:47:16 +02:00
%endif
2012-01-08 16:47:19 +01:00
BuildRequires : aspell-devel
2012-06-04 10:57:36 +02:00
BuildRequires : guile-devel
2012-06-04 09:31:40 +02:00
BuildRequires : libgcrypt-devel
BuildRequires : libgpg-error-devel
BuildRequires : lzo-devel
2012-01-08 16:47:19 +01:00
BuildRequires : ruby-devel
2009-09-14 19:11:57 +02:00
BuildRequires : tcl-devel
2007-06-09 00:48:34 +02:00
%if 0%{?suse_version:1}
2010-11-09 00:33:01 +01:00
BuildRequires : update-desktop-files
2009-11-07 02:46:55 +01:00
%endif
2007-06-09 00:40:41 +02:00
%description
2010-11-09 00:33:01 +01:00
WeeChat (Wee Enhanced Environment for Chat) is a fast and light cross-platform
chat environment. It can be entirely controlled with the keyboard, has a
plugin-based architecture and is customizable and extensible with scripts in
several scripting languages.
2010-12-20 16:53:49 +01:00
%lang_package
2011-01-16 16:23:34 +01:00
2009-09-14 16:00:40 +02:00
%package devel
2010-11-09 00:33:01 +01:00
Summary : Development Environment for %{name} Plugins
Group : Development/Libraries/C and C++
Requires : %{name} = %{version} -%{release}
2009-09-14 16:00:40 +02:00
%description devel
Development environment for authoring %{name} plugins.
2012-06-04 10:57:36 +02:00
%package guile
Summary : Guile Scripting Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
%description guile
Support for %{name} scripts written in the Guile language.
2007-06-09 00:40:41 +02:00
%package lua
2010-11-09 00:33:01 +01:00
Summary : Lua Scripting Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
2007-06-09 00:40:41 +02:00
%description lua
2009-11-07 01:32:08 +01:00
Support for %{name} scripts written in the Lua language.
2007-06-09 00:40:41 +02:00
%package perl
2010-11-09 00:33:01 +01:00
Summary : Perl Scripting Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
2007-06-09 00:40:41 +02:00
%description perl
2009-11-07 01:32:08 +01:00
Support for %{name} scripts written in the Perl language.
2007-06-09 00:40:41 +02:00
%package python
2010-11-09 00:33:01 +01:00
Summary : Python Scripting Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
2007-06-09 00:40:41 +02:00
%description python
2009-11-07 01:32:08 +01:00
Support for %{name} scripts written in the Python language.
2007-06-09 00:40:41 +02:00
2009-09-14 16:00:40 +02:00
%package tcl
2010-11-09 00:33:01 +01:00
Summary : Tcl Scripting Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
2009-09-14 16:00:40 +02:00
%description tcl
2009-11-07 01:32:08 +01:00
Support for %{name} scripts written in the Tcl language.
2009-09-14 16:00:40 +02:00
2007-06-09 00:40:41 +02:00
%package ruby
2010-11-09 00:33:01 +01:00
Summary : Ruby Scripting Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
2007-06-09 00:40:41 +02:00
%description ruby
2009-11-07 01:32:08 +01:00
Support for %{name} scripts written in the Ruby language.
2007-06-09 00:40:41 +02:00
%package aspell
2010-11-09 00:33:01 +01:00
Summary : Aspell Spell-Checking Support for %{name}
Group : Productivity/Networking/IRC
Requires : %{name} = %{version} -%{release}
2007-06-09 00:40:41 +02:00
%description aspell
2009-11-07 01:32:08 +01:00
Spell-checking support for %{name} , using the aspell library.
2007-06-09 00:40:41 +02:00
%prep
%setup -q
2012-06-04 10:57:36 +02:00
%patch0 -p1
2011-10-23 10:32:56 +02:00
modified=" $ ( s e d - n ' / ^ - - - - / n ; s / - . * $ / / ; p ; q ' " %{_sourcedir} /%{name} .changes" ) "
DATE=" \" $ ( d a t e - d " ${modified}" " +%%b %%e %%Y" ) \" "
TIME=" \" $ ( d a t e - d " ${modified}" " +%%R" ) \" "
find . -name '*.[ch]' |\
xargs sed -i " s / _ _ D A T E _ _ / $ { D A T E } / g ; s / _ _ T I M E _ _ / $ { T I M E } / g "
2007-06-09 00:40:41 +02:00
2009-09-14 16:00:40 +02:00
%build
2010-11-09 00:33:01 +01:00
export CFLAGS=" %{optflags} "
2009-09-14 16:00:40 +02:00
%__mkdir build
pushd build
2010-11-09 00:33:01 +01:00
cmake \
-DCMAKE_INSTALL_PREFIX=" %{_prefix} " \
-DLIBDIR=" %{_libdir} " \
2012-06-04 11:41:05 +02:00
%if 0%{?suse_version} > 1140
2012-06-04 10:57:36 +02:00
-DGUILE_INCLUDE_DIR=" %{_includedir} / g u i l e / 2 . 0 " \
-DGUILE_LIBRARY=" %{_libdir} / l i b g u i l e - %{guile_ver} . s o " \
2012-06-04 11:41:05 +02:00
%endif
2012-06-04 10:57:36 +02:00
-DPYTHON_LIBRARY=" %{_libdir} / l i b p y t h o n %{py_ver} . s o " \
..
2010-11-09 00:33:01 +01:00
%__make %{?_smp_flags} VERBOSE=1
2009-09-14 16:00:40 +02:00
popd #build
2007-06-09 00:40:41 +02:00
%install
2009-09-14 16:00:40 +02:00
pushd build
2007-06-09 00:40:41 +02:00
%makeinstall
2009-09-14 16:00:40 +02:00
popd #build
2007-06-09 00:40:41 +02:00
%__install -D -m 0644 " %{SOURCE1} " " %{buildroot} %{_datadir} / a p p l i c a t i o n s / %{name} . d e s k t o p "
%__install -D -m 0644 weechat_icon_32.png " %{buildroot} %{_datadir} / p i x m a p s / %{name} . p n g "
2009-09-14 16:00:40 +02:00
%if 0%{?suse_version}
2007-06-09 00:40:41 +02:00
%suse_update_desktop_file -r " %{name} " Network IRCClient
%endif
%find_lang " %{name} "
%clean
2011-01-16 16:23:34 +01:00
%{?buildroot:%__rm -rf " %{buildroot} " }
2007-06-09 00:40:41 +02:00
2011-03-24 00:55:34 +01:00
%if 0%{?suse_version} >= 1140
%post
%desktop_database_post
%postun
%desktop_database_postun
%endif
2010-11-09 00:33:01 +01:00
%files
2007-06-09 00:40:41 +02:00
%defattr (-,root,root)
2009-09-14 16:00:40 +02:00
%doc AUTHORS ChangeLog COPYING NEWS README
2007-06-09 00:40:41 +02:00
%{_bindir} /weechat-curses
%dir %{_libdir} /weechat
%dir %{_libdir} /weechat/plugins
2009-09-14 16:00:40 +02:00
%{_libdir} /weechat/plugins/alias.so
%{_libdir} /weechat/plugins/charset.so
%{_libdir} /weechat/plugins/fifo.so
%{_libdir} /weechat/plugins/irc.so
%{_libdir} /weechat/plugins/logger.so
2011-01-16 16:23:34 +01:00
%{_libdir} /weechat/plugins/relay.so
%{_libdir} /weechat/plugins/rmodifier.so
2009-09-14 16:00:40 +02:00
%{_libdir} /weechat/plugins/xfer.so
2007-06-09 00:40:41 +02:00
%doc %{_mandir} /man1/weechat-curses.1*
%{_datadir} /applications/%{name} .desktop
%{_datadir} /pixmaps/%{name} .png
2010-11-09 00:33:01 +01:00
%files -f "%{name}.lang" lang
2009-09-14 16:00:40 +02:00
%files devel
%defattr (-,root,root)
%{_includedir} /weechat
%{_libdir} /pkgconfig/weechat.pc
2012-06-04 10:57:36 +02:00
%files guile
%defattr (-,root,root)
%{_libdir} /weechat/plugins/guile.so
2007-06-09 00:40:41 +02:00
%files lua
%defattr (-,root,root)
%{_libdir} /weechat/plugins/lua.so
%files perl
%defattr (-,root,root)
%{_libdir} /weechat/plugins/perl.so
%files python
%defattr (-,root,root)
%{_libdir} /weechat/plugins/python.so
2009-09-14 16:00:40 +02:00
%files tcl
%defattr (-,root,root)
%{_libdir} /weechat/plugins/tcl.so
2007-06-09 00:40:41 +02:00
%files ruby
%defattr (-,root,root)
%{_libdir} /weechat/plugins/ruby.so
%files aspell
%defattr (-,root,root)
%{_libdir} /weechat/plugins/aspell.so
%changelog