%define _disable_ld_no_undefined 1 %global plugin_name purple-gowhatsapp %bcond_without gitrel %if %{with gitrel} %global commit0 5a1a62d650a2db9c937b78dc643f148c54c3ee9f %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global date 20250406 %define rel 1.%{date}git%{shortcommit0} %define name_rel %{name}-%{commit0} %else %define rel 0.1 %define name_rel %{name}-%{version} %endif Name: %{plugin_name} Version: 1.16.0 Release: %mkrel %{rel} License: GPLv3 Summary: A libpurple/Pidgin plugin for WhatsApp, powered by whatsmeow URL: https://github.com/hoehermann//%{name} %if %{with gitrel} Source0: %{url}/archive/%{commit0}/%{name_rel}.tar.gz %else Source0: %{url}/archive/refs/tags/v%{version}.tar.gz?/%{name_rel}.tar.gz %endif #https://aur.archlinux.org/packages/purple-gowhatsapp Source1: https://github.com/hoehermann/purple-cmake-template/raw/master/purple-config.cmake BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libprotobuf-c) BuildRequires: pkgconfig(purple) BuildRequires: pkgconfig(zlib) BuildRequires: webp-pixbuf-loader pkgconfig(gdk-pixbuf-2.0) pkgconfig(opusfile) jq BuildRequires: gcc go BuildRequires: make cmake Recommends: webp-pixbuf-loader Provides: purple-gowhatsapp = 1:%{version}-%{release} %description This is a re-write of purple-gowhatsapp, switching back-ends from go-whatsapp to whatsmeow. whatsmeow is written by Tulir Asokan. It has multi-device support. Set-Up Create a new account You must enter your phone's internationalized number followed by @s.whatsapp.net. Example: 123456789 from Germany would use 49123456789@s.whatsapp.net. Upon login, a QR code is shown in a Pidgin request window. Using your phone's camera, scan the code within 20 seconds – just like you would do with WhatsApp Web. Note: On headless clients such as Spectrum, the QR code will be wrapped in a message by a fake contact called "Logon QR Code". You may need to temporarily configure your UI to accept messages from unsolicited users for linking purposes. Wait until the connection has been fully set up. Unfortunately, there is no progress indicator while keys are exchanged and old messages are fetched. Usually, a couple of seconds is enough. Some power users with many groups and contacts reported the process can take more than a minute. If the plug-in is not yet ready, outgoing messages may be dropped silently (see issue https://github.com/hoehermann/purple-gowhatsapp/issues/142). %prep %autosetup -n %{name_rel} # fix W: wrong-file-end-of-line-encoding #sed -i -e "s,\r,," README.md cp %{SOURCE1} submodules//purple-cmake %build %cmake %cmake_build %install %cmake_install #chmod 755 %{buildroot}%{_libdir}/purple-2/lib%{plugin_name}.so chmod a+rw -Rf %{_builddir}/%{name_rel} mkdir -p %{buildroot}/%{_docdir}/%{name} cat << EOF > %{buildroot}/%{_docdir}/%{name}/README.urpmi To add your account Please read the Set-Up section on /usr/share/doc/purple-gowhatsapp/README.md EOF %files %{_docdir}/%{name}/README.urpmi %{_libdir}/purple-2/libwhatsmeow.so %{_datadir}/pixmaps/pidgin/protocols/*/whatsapp.png %license LICENSE %doc README.md %changelog * Thu Aug 29 2024 %packager - %{version}-%{release} + New version %{version}