Accepting request 262467 from home:scarabeus_iv:branches:server:irc

- Remove sle11 support as now I don't need it anymore
- Use %cmake macro properly
- Document that there are tests that need extra pkg
- Split documentation into -doc subpackage

OBS-URL: https://build.opensuse.org/request/show/262467
OBS-URL: https://build.opensuse.org/package/show/server:irc/weechat?expand=0&rev=59
This commit is contained in:
Guido Berhoerster 2014-11-20 17:10:06 +00:00 committed by Git OBS Bridge
parent 8d0ff85a79
commit bee8bf58a1
2 changed files with 42 additions and 57 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Nov 20 14:46:54 UTC 2014 - tchvatal@suse.com
- Remove sle11 support as now I don't need it anymore
- Use %cmake macro properly
- Document that there are tests that need extra pkg
- Split documentation into -doc subpackage
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 10 06:02:10 UTC 2014 - gber@opensuse.org Fri Oct 10 06:02:10 UTC 2014 - gber@opensuse.org

View File

@ -27,8 +27,11 @@ Source: http://www.weechat.org/files/src/weechat-%{version}.tar.bz2
Source1: weechat.desktop Source1: weechat.desktop
# PATCH-FIX-UPSTREAM weechat-capath.patch https://savannah.nongnu.org/patch/index.php?8153 lnussel@suse.de -- use system's default certificate store # PATCH-FIX-UPSTREAM weechat-capath.patch https://savannah.nongnu.org/patch/index.php?8153 lnussel@suse.de -- use system's default certificate store
Patch0: weechat-capath.patch Patch0: weechat-capath.patch
BuildRequires: asciidoc
BuildRequires: cmake BuildRequires: cmake
BuildRequires: curl-devel BuildRequires: curl-devel
BuildRequires: docbook5-xsl-stylesheets
BuildRequires: enchant-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: grep BuildRequires: grep
BuildRequires: guile-devel BuildRequires: guile-devel
@ -37,30 +40,20 @@ BuildRequires: libgcrypt-devel
BuildRequires: libgnutls-devel BuildRequires: libgnutls-devel
BuildRequires: libgpg-error-devel BuildRequires: libgpg-error-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: libxslt-tools
BuildRequires: lua51-devel
BuildRequires: lzo-devel BuildRequires: lzo-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: perl BuildRequires: perl
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: ruby-devel BuildRequires: ruby-devel
BuildRequires: source-highlight
BuildRequires: tcl-devel BuildRequires: tcl-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
Suggests: %{name}-doc
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1220
BuildRequires: enchant-devel
%endif
%if 0%{?suse_version} > 1220
BuildRequires: lua51-devel
%else
BuildRequires: lua-devel
%endif
%if 0%{?suse_version} > 1220
BuildRequires: asciidoc
BuildRequires: docbook5-xsl-stylesheets
BuildRequires: libxslt-tools
BuildRequires: source-highlight
%endif
%description %description
WeeChat (Wee Enhanced Environment for Chat) is a fast and light cross-platform WeeChat (Wee Enhanced Environment for Chat) is a fast and light cross-platform
@ -70,29 +63,34 @@ several scripting languages.
%lang_package %lang_package
%package doc
Summary: Documentation for %{name}
Group: Documentation/HTML
Requires: %{name} = %{version}
%description doc
Various documentation files for %{name}.
%package devel %package devel
Summary: Development Environment for %{name} Plugins Summary: Development Environment for %{name} Plugins
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description devel %description devel
Development environment for authoring %{name} plugins. Development environment for authoring %{name} plugins.
%if 0%{?suse_version} > 1220
%package guile %package guile
Summary: Guile Scripting Support for %{name} Summary: Guile Scripting Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description guile %description guile
Support for %{name} scripts written in the Guile language. Support for %{name} scripts written in the Guile language.
%endif
%package lua %package lua
Summary: Lua Scripting Support for %{name} Summary: Lua Scripting Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description lua %description lua
Support for %{name} scripts written in the Lua language. Support for %{name} scripts written in the Lua language.
@ -100,7 +98,7 @@ Support for %{name} scripts written in the Lua language.
%package perl %package perl
Summary: Perl Scripting Support for %{name} Summary: Perl Scripting Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%{?libperl_requires} %{?libperl_requires}
%description perl %description perl
@ -109,7 +107,7 @@ Support for %{name} scripts written in the Perl language.
%package python %package python
Summary: Python Scripting Support for %{name} Summary: Python Scripting Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description python %description python
Support for %{name} scripts written in the Python language. Support for %{name} scripts written in the Python language.
@ -117,7 +115,7 @@ Support for %{name} scripts written in the Python language.
%package tcl %package tcl
Summary: Tcl Scripting Support for %{name} Summary: Tcl Scripting Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description tcl %description tcl
Support for %{name} scripts written in the Tcl language. Support for %{name} scripts written in the Tcl language.
@ -125,21 +123,18 @@ Support for %{name} scripts written in the Tcl language.
%package ruby %package ruby
Summary: Ruby Scripting Support for %{name} Summary: Ruby Scripting Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description ruby %description ruby
Support for %{name} scripts written in the Ruby language. Support for %{name} scripts written in the Ruby language.
%if 0%{?suse_version} > 1220
%package aspell %package aspell
Summary: Aspell Spell-Checking Support for %{name} Summary: Aspell Spell-Checking Support for %{name}
Group: Productivity/Networking/IRC Group: Productivity/Networking/IRC
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description aspell %description aspell
Spell-checking support for %{name}, using the aspell library. Spell-checking support for %{name}, using the aspell library.
%endif
%prep %prep
%setup -q %setup -q
@ -152,41 +147,31 @@ find . -name '*.[ch]' |\
%build %build
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
mkdir build # Tests require cpputest package
pushd build # no-undefined for perl seem not to work as desired
cmake \ %cmake \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DCMAKE_EXE_LINKER_FLAGS=-Wl,--as-needed -DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed -DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed \
-DLIBDIR="%{_libdir}" \ -DLIBDIR="%{_libdir}" \
-DPYTHON_LIBRARY="%{_libdir}/libpython%{py_ver}.so" \ -DPYTHON_LIBRARY="%{_libdir}/libpython%{py_ver}.so" \
-DENABLE_ENCHANT=ON \ -DENABLE_ENCHANT=ON \
-DENABLE_DOC=ON \ -DENABLE_DOC=ON \
-DENABLE_MAN=ON \ -DENABLE_MAN=ON
.. make %{?_smp_mflags}
make %{?_smp_flags} VERBOSE=1
popd #build
%install %install
pushd build %cmake_install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
popd #build
# due to an unknown race condition cmake does not always create a compatibility # due to an unknown race condition cmake does not always create a compatibility
# symlink # symlink
ln -sf %{_bindir}/weechat %{buildroot}%{_bindir}/weechat-curses ln -sf %{_bindir}/weechat %{buildroot}%{_bindir}/weechat-curses
install -D -m 0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop" install -D -m 0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
%if 0%{?suse_version}
%suse_update_desktop_file -r "%{name}" Network IRCClient %suse_update_desktop_file -r "%{name}" Network IRCClient
%endif
%if 0%{?suse_version} > 1220
mv "%{buildroot}%{_datadir}/doc/weechat" html mv "%{buildroot}%{_datadir}/doc/weechat" html
%endif
%find_lang "%{name}" --with-man %find_lang "%{name}" --with-man
%if 0%{?suse_version} > 1220
%post %post
%desktop_database_post %desktop_database_post
%icon_theme_cache_post %icon_theme_cache_post
@ -194,15 +179,15 @@ mv "%{buildroot}%{_datadir}/doc/weechat" html
%postun %postun
%desktop_database_postun %desktop_database_postun
%icon_theme_cache_postun %icon_theme_cache_postun
%endif
%files doc
%defattr(-,root,root)
%doc html/
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS.asciidoc ChangeLog.asciidoc Contributing.asciidoc COPYING %doc AUTHORS.asciidoc ChangeLog.asciidoc Contributing.asciidoc COPYING
%doc README.asciidoc ReleaseNotes.asciidoc %doc README.asciidoc ReleaseNotes.asciidoc
%if 0%{?suse_version} > 1220
%doc html/
%endif
%{_bindir}/weechat-curses %{_bindir}/weechat-curses
%{_bindir}/weechat %{_bindir}/weechat
%dir %{_libdir}/weechat %dir %{_libdir}/weechat
@ -217,9 +202,7 @@ mv "%{buildroot}%{_datadir}/doc/weechat" html
%{_libdir}/weechat/plugins/script.so %{_libdir}/weechat/plugins/script.so
%{_libdir}/weechat/plugins/trigger.so %{_libdir}/weechat/plugins/trigger.so
%{_libdir}/weechat/plugins/xfer.so %{_libdir}/weechat/plugins/xfer.so
%if 0%{?suse_version} > 1220
%{_mandir}/man1/weechat.1* %{_mandir}/man1/weechat.1*
%endif
%{_datadir}/applications/weechat.desktop %{_datadir}/applications/weechat.desktop
%{_datadir}/icons/hicolor/*/apps/weechat.png %{_datadir}/icons/hicolor/*/apps/weechat.png
@ -231,12 +214,9 @@ mv "%{buildroot}%{_datadir}/doc/weechat" html
%{_includedir}/weechat %{_includedir}/weechat
%{_libdir}/pkgconfig/weechat.pc %{_libdir}/pkgconfig/weechat.pc
%if 0%{?suse_version} > 1220
%files guile %files guile
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/weechat/plugins/guile.so %{_libdir}/weechat/plugins/guile.so
%endif
%files lua %files lua
%defattr(-,root,root) %defattr(-,root,root)
@ -258,11 +238,8 @@ mv "%{buildroot}%{_datadir}/doc/weechat" html
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/weechat/plugins/ruby.so %{_libdir}/weechat/plugins/ruby.so
%if 0%{?suse_version} > 1220
%files aspell %files aspell
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/weechat/plugins/aspell.so %{_libdir}/weechat/plugins/aspell.so
%endif
%changelog %changelog