%global gdate 20221230 %define rel 1 %define major 13 %define libname %mklibname jami %{major} %define devname %mklibname jami -d %bcond_with system_pj %define pjver 5e478bbf8692f43059de9c6ad654b377359baaa0 %bcond_with portaudio Name: jami-daemon Version: 13.7.0 Release: %mkrel %{?gdate:0.git%gdate.}%{rel} Summary: Jami is a software for secure communications with distributed architecture Group: System/Libraries License: GPLv3+ Url: https://jami.net/ %if 0%{?gdate:1} # please use included Source2 script to retrieve and build the jami-daemon archive tarball Source0: jami-daemon-%{gdate}.tar.xz %else Source0: https://git.jami.net/savoirfairelinux/jami-daemon/archive/%{version}/jami-daemon-%{version}.tar.gz %endif Source1: https://github.com/savoirfairelinux/pjproject/archive/%{pjver}/pjproject-%{pjver}.tar.gz #https://github.com/pjsip/pjproject/archive/%{pjver}/pjproject-%{pjver}.tar.gz Source2: jami-daemon-source-download.sh Patch2: ring-daemon-ffmpeg-5.0.patch BuildRequires: meson BuildRequires: asio-devel BuildRequires: ffmpeg-devel BuildRequires: gsm-devel BuildRequires: libnatpmp-devel #BuildRequires: restbed-devel #BuildRequires: swig #BuildRequires: gyp BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(dbus-c++-1) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(jsoncpp) BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(libargon2) BuildRequires: pkgconfig(libgit2) BuildRequires: pkgconfig(libilbc) BuildRequires: pkgconfig(libpcre) %if %{with system_pj} BuildRequires: pkgconfig(libpjproject) %else BuildConflicts: pkgconfig(libpjproject) %endif BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libsecp256k1) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libupnp) BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(msgpack) BuildRequires: pkgconfig(nettle) BuildRequires: pkgconfig(opendht) >= 2.3.0 BuildRequires: pkgconfig(opus) %if %{with portaudio} BuildRequires: pkgconfig(portaudio-2.0) %endif BuildRequires: pkgconfig(samplerate) BuildRequires: pkgconfig(sndfile) BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(speexdsp) BuildRequires: pkgconfig(yaml-cpp) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(webrtc-audio-processing) Obsoletes: ring-daemon < 9.6.0 Provides: ring-daemon = %{version}-%{release} %if %{without system_pj} Provides: bundled(libpjproject) = 2.12.1 %endif %if %{without system_pj} %global __requires_exclude pkgconfig\\(libpjproject\\) %endif %description Jami is a free and open source software, which allows to make encrypted audio or video calls and to send files and messages around the world. Jami is an official GNU package, that uses fully distributed architecture and independent from any centralized service. Additional support for SIP communications is provided. #------------------------------------------------ %package -n %{libname} Summary: Shared libraries for %{name} Group: System/Libraries Requires: %{name} >= %{version}-%{release} %description -n %{libname} Shared libraries for %{name}. #------------------------------------------------ %package -n %{devname} Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: ring-daemon-devel = %{version}-%{release} Obsoletes: %{_lib}ring-devel < 9.6.0 %description -n %{devname} The development libraries and header files for %{name}. #------------------------------------------------ %prep %setup -qn jami-daemon-%{?gdate}%{?!gdate:%version} %if ! %{with system_pj} # for bundled pjproject cp -a %{SOURCE1} contrib/tarballs mkdir -p contrib/native %endif %build export CXXFLAGS="%{optflags} -std=gnu++17" %if ! %{with system_pj} # bundled pjproject pushd contrib/native %set_build_flags ../bootstrap \ --disable-downloads \ --disable-all \ --enable-pjproject %make_build \ DISABLE_CONTRIB_CHECKSUMS=TRUE \ PJPROJECT_VERSION=%{pjver} \ DEPS_pjproject= %ifnarch %{arm} export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:./contrib/%{_host_cpu}-%{_real_vendor}-%{_host_os}/lib/pkgconfig %else export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:./contrib/%{_host_cpu}-%{_real_vendor}-%{_host_os}%{?_gnu}/lib/pkgconfig %endif popd %endif %meson \ -Dportaudio=%{?with_portaudio:auto}%{!?with_portaudio:disabled} \ -Dopensl=disabled \ -Dinterfaces=dbus,library %meson_build %install %meson_install %files %{_libdir}/jamid %{_mandir}/man?/jamid.?* %{_datadir}/dbus-1/interfaces/cx.ring.Ring.*.xml %{_datadir}/dbus-1/services/cx.ring.Ring.service %{_datadir}/jami/ %{_metainfodir}/net.jami.daemon.metainfo.xml %files -n %{libname} %{_libdir}/libjami.so.%{major}{,.*} %files -n %{devname} %{_includedir}/jami/ %{_libdir}/libjami.so %{_libdir}/pkgconfig/jami.pc