]> git.pld-linux.org Git - packages/weechat.git/blobdiff - weechat.spec
- release 2 (by relup.sh)
[packages/weechat.git] / weechat.spec
index 43de539b9fdad2a234f5a4cf92eae840ef5e381e..df523b23ed743fb46cfe81e04f2ae9096eed5c8f 100644 (file)
@@ -1,53 +1,67 @@
 # TODO:
 # - consider doing subpackages for all those plugins (which one should be in main package ?)
+# - desktop file (icon exists, but no desktop file?)
 #
 # Conditional build:
 # Features
 %bcond_without aspell  # don't build aspell support
-%bcond_without gnutls  # don't build gnutls support
 %bcond_without doc     # don't build docs
 # Bindings
 %bcond_without guile   # don't enable Scheme (guile) scripting language
 %bcond_without lua     # don't enable Lua scripting language
 %bcond_without perl    # don't enable Perl scripting language
+%bcond_with    php     # don't enable PHP scripting language
 %bcond_without python  # don't enable Python scripting language
 %bcond_without ruby    # don't enable Ruby scripting language
 %bcond_without tcl     # don't enable Tcl scripting language
+%bcond_without js      # don't enable JavaScript scripting language (V8 engine)
+
+%ifnarch %{ix86} %{x8664} arm mips
+%undefine      with_js
+%endif
+
+%define                php_name        php%{?php_suffix}
 
 Summary:       WeeChat - fast and light chat environment
 Summary(pl.UTF-8):     WeeChat - szybkie i lekkie środowisko do rozmów
 Name:          weechat
-Version:       0.4.2
-Release:       1
+Version:       3.0.1
+Release:       2
 License:       GPL v3+
 Group:         Applications/Communications
-Source0:       http://www.weechat.org/files/src/%{name}-%{version}.tar.gz
-# Source0-md5: fd584c258aace2aa898f40e1fcf06084
-Patch1:                %{name}-plugins_header.patch
-Patch2:                %{name}-curses.patch
-Patch5:                weechat-0.4.0-ruby-version.patch
+Source0:       https://www.weechat.org/files/src/%{name}-%{version}.tar.xz
+# Source0-md5: 56cc7312aea9cb5cccab39211106316f
+Patch0:                headless-man.patch
 URL:           http://www.weechat.org/
 %{?with_aspell:BuildRequires:  aspell-devel}
-BuildRequires: cmake
+BuildRequires: cmake >= 3.0
 BuildRequires: curl-devel
-BuildRequires: gettext-devel
-%{?with_gnutls:BuildRequires:  gnutls-devel}
+BuildRequires: gettext-tools
+BuildRequires: gnutls-devel
 %{?with_guile:BuildRequires:   guile-devel}
-BuildRequires: libatomic_ops
 BuildRequires: libgcrypt-devel
-%{?with_lua:BuildRequires:     lua51-devel}
+%{?with_lua:BuildRequires:     lua-devel}
 BuildRequires: ncurses-devel
 %{?with_perl:BuildRequires:    perl-devel}
+%{?with_php:BuildRequires:     %{php_name}-devel >= 4:7}
 BuildRequires: pkgconfig
-BuildRequires: sed >= 4.0
 %if %{with python}
-BuildRequires: python-devel
-BuildRequires: python-modules
+BuildRequires: python3-devel
+BuildRequires: python3-modules
 %endif
-BuildRequires: rpmbuild(macros) >= 1.129
-%{?with_ruby:BuildRequires:    ruby-devel}
-BuildRequires: tcl-devel
-Requires:      %{name}-common = %{version}-%{release}
+BuildRequires: rpmbuild(macros) >= 1.752
+%{?with_doc:BuildRequires:     ruby-asciidoctor}
+%{?with_ruby:BuildRequires:    ruby-devel >= 1:1.9}
+BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
+%{?with_tcl:BuildRequires:     tcl-devel}
+%{?with_js:BuildRequires:      v8-devel}
+BuildRequires: xz
+BuildRequires: zlib-devel
+Requires(post,postun): desktop-file-utils
+Requires(post,postun): gtk-update-icon-cache
+Suggests:      %{name}-plugin-irc
+Obsoletes:     weechat-common
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                skip_post_check_so      ruby.so.0.0.0
@@ -63,28 +77,106 @@ WeeChat (Wee Ehanced Environment for Chat) to szybkie i lekkie
 zrobić przy pomocy klawiatury. Jest konfigurowalne i rozszerzalne za
 pomocą skryptów.
 
-%package common
-Summary:       WeeChat common files
-Group:         Applications/Communications
-
-%description common
-WeeChat common files for Curses and GTK UI.
-
 %package doc
 Summary:       Manual for weechat
 Group:         Documentation
+%{?noarchpackage}
 
 %description doc
 HTML documentation for weechat.
 
+%package plugin-guile
+Summary:       Guile scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-guile
+Guile scripting plugin for weechat.
+
+%package plugin-irc
+Summary:       IRC chat protocol plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-irc
+IRC chat protocol plugin for weechat.
+
+%package plugin-javascript
+Summary:       JavaScript scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-javascript
+JavaScript scripting plugin for weechat.
+
+%package plugin-lua
+Summary:       Lua scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-lua
+Lua scripting plugin for weechat.
+
+%package plugin-perl
+Summary:       Perl scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-perl
+Perl scripting plugin for weechat.
+
+%package plugin-python
+Summary:       Python scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-python
+Python scripting plugin for weechat.
+
+%package plugin-relay
+Summary:       Relay data via network plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-relay
+Relay data via network plugin for weechat used by alternative
+frontends.
+
+%package plugin-ruby
+Summary:       Ruby scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-ruby
+Ruby scripting plugin for weechat.
+
+%package plugin-spell
+Summary:       Spell checking plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-spell
+Spell checking plugin for weechat.
+
+%package plugin-tcl
+Summary:       Tcl scripting plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-tcl
+Tcl scripting plugin for weechat.
+
+%package plugin-xfer
+Summary:       File transfer and direct chat plugin for weechat
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-xfer
+File transfer and direct chat plugin for weechat.
+
 %prep
 %setup -q
-%patch1 -p1
-%patch2 -p0
-%patch5 -p1
-
-%{__sed} -i -e 's#PYTHON_LIB=.*#PYTHON_LIB=%{_libdir}#g' configure.ac
-%{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
+%patch0 -p1
 
 %build
 install -d build
@@ -92,18 +184,19 @@ cd build
 %cmake \
        -DPREFIX=%{_prefix} \
        -DLIBDIR=%{_libdir} \
+       -DENABLE_HEADLESS=OFF \
        -DENABLE_NCURSES=ON \
-       -DENABLE_ASPELL=%{?with_aspell:ON}%{!?with_aspell:OFF} \
-       -DENABLE_GNUTLS=%{?with_gnutls:ON}%{!?with_gnutls:OFF} \
-       -DENABLE_DOC=%{?with_doc:ON}%{!?with_doc:OFF} \
-       -DENABLE_PERL=%{?with_perl:ON}%{!?with_perl:OFF} \
-       -DENABLE_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \
-       -DENABLE_RUBY=%{?with_ruby:ON}%{!?with_ruby:OFF} \
-       -DENABLE_LUA=%{?with_lua:ON}%{!?with_lua:OFF} \
-       -DENABLE_GUILE=%{?with_guile:ON}%{!?with_guile:OFF} \
-       -DENABLE_TCL=%{?with_tcl:ON}%{!?with_tcl:OFF} \
-       -DENABLE_MAN=ON \
-       -DENABLE_DOC=ON \
+       %{cmake_on_off aspell ENABLE_SPELL} \
+       %{cmake_on_off doc ENABLE_DOC} \
+       %{cmake_on_off perl ENABLE_PERL} \
+       %{cmake_on_off php ENABLE_PHP} \
+       %{cmake_on_off python ENABLE_PYTHON} \
+       %{cmake_on_off ruby ENABLE_RUBY} \
+       %{cmake_on_off lua ENABLE_LUA} \
+       %{cmake_on_off guile ENABLE_GUILE} \
+       %{cmake_on_off tcl ENABLE_TCL} \
+       %{cmake_on_off doc ENABLE_MAN} \
+       %{cmake_on_off js ENABLE_JAVASCRIPT} \
        ..
 
 %{__make} VERBOSE=1
@@ -113,6 +206,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# symlink to "weechat"
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/weechat-curses
+
 # no -devel, drop
 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/%{name}
 %{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
@@ -122,45 +218,50 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%post
+%update_desktop_database
+%update_icon_cache hicolor
+%update_mime_database
+
+%postun
+%update_desktop_database_postun
+%update_icon_cache hicolor
+%update_mime_database
+
+%files -f %{name}.lang
 %defattr(644,root,root,755)
+%doc AUTHORS.adoc ChangeLog.adoc README.adoc ReleaseNotes.adoc
 %attr(755,root,root) %{_bindir}/weechat
+%if %{with doc}
 %{_mandir}/man1/weechat.1*
-%{_mandir}/de/man1/weechat.1*
-%{_mandir}/fr/man1/weechat.1*
-%{_mandir}/it/man1/weechat.1*
-%{_mandir}/ja/man1/weechat.1*
+%lang(cs) %{_mandir}/cs/man1/weechat.1*
+%lang(de) %{_mandir}/de/man1/weechat.1*
+%lang(fr) %{_mandir}/fr/man1/weechat.1*
+%lang(it) %{_mandir}/it/man1/weechat.1*
+%lang(ja) %{_mandir}/ja/man1/weechat.1*
+%lang(pl) %{_mandir}/pl/man1/weechat.1*
+%lang(ru) %{_mandir}/ru/man1/weechat.1*
+%endif
+%{_iconsdir}/hicolor/*/apps/weechat.png
+%{_desktopdir}/%{name}.desktop
 
-%files common -f %{name}.lang
-%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README
-%dir %{_libdir}/weechat
-%dir %{_libdir}/weechat/plugins
-%attr(755,root,root) %{_libdir}/weechat/plugins/alias.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/charset.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/fifo.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/irc.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/logger.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/relay.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/rmodifier.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/script.so*
-%attr(755,root,root) %{_libdir}/weechat/plugins/xfer.so*
-
-# addons
-%{?with_aspell:%attr(755,root,root) %{_libdir}/weechat/plugins/aspell.so*}
-
-# language bindings
-%{?with_guile:%attr(755,root,root) %{_libdir}/weechat/plugins/guile.so*}
-%{?with_lua:%attr(755,root,root) %{_libdir}/weechat/plugins/lua.so*}
-%{?with_perl:%attr(755,root,root) %{_libdir}/weechat/plugins/perl.so*}
-%{?with_python:%attr(755,root,root) %{_libdir}/weechat/plugins/python.so*}
-%{?with_ruby:%attr(755,root,root) %{_libdir}/weechat/plugins/ruby.so*}
-%{?with_tcl:%attr(755,root,root) %{_libdir}/weechat/plugins/tcl.so*}
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/plugins
+%attr(755,root,root) %{_libdir}/%{name}/plugins/alias.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/buflist.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/charset.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/exec.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/fifo.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/fset.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/logger.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/script.so
+%attr(755,root,root) %{_libdir}/%{name}/plugins/trigger.so
 
 %if %{with doc}
 %files doc
 %defattr(644,root,root,755)
 %dir %{_docdir}/%{name}
+%lang(cs) %{_docdir}/%{name}/*.cs.html
 %lang(de) %{_docdir}/%{name}/*.de.html
 %lang(en) %{_docdir}/%{name}/*.en.html
 %lang(es) %{_docdir}/%{name}/*.es.html
@@ -170,3 +271,63 @@ rm -rf $RPM_BUILD_ROOT
 %lang(pl) %{_docdir}/%{name}/*.pl.html
 %lang(ru) %{_docdir}/%{name}/*.ru.html
 %endif
+
+%if %{with guile}
+%files plugin-guile
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/guile.so
+%endif
+
+%files plugin-irc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/irc.so
+
+%if %{with js}
+%files plugin-javascript
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/javascript.so
+%endif
+
+%if %{with lua}
+%files plugin-lua
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/lua.so
+%endif
+
+%if %{with perl}
+%files plugin-perl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/perl.so
+%endif
+
+%if %{with python}
+%files plugin-python
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/python.so
+%endif
+
+%files plugin-relay
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/relay.so
+
+%if %{with ruby}
+%files plugin-ruby
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/ruby.so
+%endif
+
+%if %{with aspell}
+%files plugin-spell
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/spell.so
+%endif
+
+%if %{with tcl}
+%files plugin-tcl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/tcl.so
+%endif
+
+%files plugin-xfer
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/%{name}/plugins/xfer.so
This page took 0.050354 seconds and 4 git commands to generate.