diff --git a/weechat-2.7.1.tar.xz b/weechat-2.7.1.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..5d6f60f619aeb61b3c1608bb19dbb95e0a8c6845 Binary files /dev/null and b/weechat-2.7.1.tar.xz differ diff --git a/weechat.spec b/weechat.spec new file mode 100644 index 0000000000000000000000000000000000000000..b7923114df7bac1067348d33b1a9132fdf89e52e --- /dev/null +++ b/weechat.spec @@ -0,0 +1,144 @@ +%global _hardened_build 1 +%global __provides_exclude_from ^%{_libdir}/weechat/plugins/.*$ + +%if %{?_pkgdocdir:1}0 +%if 0%{?rhel} +%global _doc %{name}-%{version} +%else +%global _doc %{name} +%endif +%else +%global _doc %{name}-%{version} +%global _pkgdocdir %{_docdir}/%{_doc} +%endif + +Name: weechat +Version: 2.7.1 +Release: 1 +Summary: Portable, fast, light and extensible IRC client +URL: http://weechat.org +License: GPLv3 +Source: http://weechat.org/files/src/%{name}-%{version}.tar.xz + +BuildRequires: gcc +BuildRequires: asciidoctor >= 1.5.4 +BuildRequires: ca-certificates +BuildRequires: cmake +BuildRequires: docbook-style-xsl +BuildRequires: enchant-devel +BuildRequires: gettext +BuildRequires: gnutls-devel +BuildRequires: guile-devel +BuildRequires: libcurl-devel +BuildRequires: libgcrypt-devel +BuildRequires: lua-devel +BuildRequires: ncurses-devel +BuildRequires: perl-ExtUtils-Embed +BuildRequires: perl-devel +BuildRequires: pkgconfig +BuildRequires: python3-devel +BuildRequires: ruby +BuildRequires: ruby-devel +BuildRequires: source-highlight +BuildRequires: tcl-devel + +%if 0%{?rhel} +BuildRequires: v8-devel +%endif +BuildRequires: zlib-devel +%if 0%{?rhel} +BuildRequires: cmake3 +%endif + +Requires: hicolor-icon-theme + +%description +WeeChat (Wee Enhanced Environment for Chat) is a portable, fast, light and +extensible IRC client. Everything can be done with a keyboard. +It is customizable and extensible with scripts. + +%package devel +Summary: Development files for weechat +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +WeeChat (Wee Enhanced Environment for Chat) is a portable, fast, light and +extensible IRC client. Everything can be done with a keyboard. +It is customizable and extensible with scripts. + +This package contains include files and pc file for weechat. + + +%prep +%autosetup -p1 -n %{name}-%{version} +find doc/ -type f -name 'CMakeLists.txt' \ + -exec sed -i -e 's#${PROJECT_NAME}#%{_doc}#g' '{}' \; + +sed -i 's/NAMES python3.7/NAMES python%{python3_version}m python%{python3_version}/' cmake/FindPython.cmake + + +%build +mkdir build +pushd build +%cmake3 \ + -DPREFIX=%{_prefix} \ + -DLIBDIR=%{_libdir} \ + -DENABLE_ENCHANT=ON \ + -DENABLE_PYTHON3=ON \ + -DENABLE_PHP=OFF \ + -DENABLE_DOC=ON \ + -DENABLE_MAN=ON \ + -DENABLE_JAVASCRIPT=OFF \ + -DCA_FILE=/etc/pki/tls/certs/ca-bundle.crt \ + .. +%make_build VERBOSE=1 +popd + + +%install +rm -rf $RPM_BUILD_ROOT +pushd build +%make_install +popd + +%find_lang %name + + +%files -f %{name}.lang +%doc AUTHORS.adoc ChangeLog.adoc Contributing.adoc +%doc README.adoc ReleaseNotes.adoc +%license COPYING +%{_bindir}/%{name}-curses +%{_bindir}/%{name} +%{_bindir}/%{name}-headless +%{_libdir}/%{name} +%{_datadir}/icons/hicolor/32x32/apps/%{name}.png +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/128x128/apps/%{name}.png +%{_datadir}/icons/hicolor/16x16/apps/%{name}.png +%{_datadir}/icons/hicolor/256x256/apps/%{name}.png +%{_datadir}/icons/hicolor/512x512/apps/%{name}.png +%{_datadir}/icons/hicolor/64x64/apps/%{name}.png +%{_pkgdocdir}/weechat_*.html + +%{_mandir}/man1/weechat.1* +%{_mandir}/cs/man1/weechat.1* +%{_mandir}/de/man1/weechat.1* +%{_mandir}/fr/man1/weechat.1* +%{_mandir}/it/man1/weechat.1* +%{_mandir}/ja/man1/weechat.1* +%{_mandir}/pl/man1/weechat.1* +%{_mandir}/ru/man1/weechat.1* +%{_mandir}/man1/%{name}-headless.1* +%{_mandir}/*/man1/%{name}-headless.1* + +%files devel +%dir %{_includedir}/%{name} +%{_includedir}/%{name}/weechat-plugin.h +%{_libdir}/pkgconfig/*.pc + + +%changelog +* Mon Mar 6 2023 chaozhangm - 2.7.1-1 +- Initial package