File roger.spec of Package roger
#
# spec file for package roger
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2017 Jan-Michael Brummer <jan.brummer@tabos.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: roger
Version: 2.4.2
Release: 0
Summary: Journal, Fax-Software and Call-Monitor for AVM FRITZ!Box or compatible
License: GPL-2.0-only
Group: Productivity/Telephony/Clients
URL: https://tabos.gitlab.io/
Source: https://gitlab.com/tabos/rogerrouter/-/archive/%{version}/rogerrouter-%{version}.tar.gz
Source90: README.SUSE
###Patch2: %%{name}-website_fix.patch
Patch3: 0001-Trivial-port-to-Soup-3.0.patch
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gettext-runtime >= 0.19.7
BuildRequires: ghostscript-devel
BuildRequires: intltool >= 0.51.0
BuildRequires: libtool
BuildRequires: meson
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(alsa)
%if 0%{?suse_version} > 1500
BuildRequires: pkgconfig(appindicator3-0.1)
%else
BuildRequires: pkgconfig(appindicator3-0.1)
BuildRequires: pkgconfig(ayatana-appindicator3-0.1)
BuildRequires: pkgconfig(ayatana-indicator3-0.4)
%endif
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.20
BuildRequires: pkgconfig(libebook-1.2)
BuildRequires: pkgconfig(libgdata)
BuildRequires: pkgconfig(libhandy-1)
BuildRequires: pkgconfig(libical-glib)
BuildRequires: pkgconfig(libpjproject)
BuildRequires: pkgconfig(librm) >= 2.2.3
BuildRequires: pkgconfig(libsoup-3.0)
BuildRequires: pkgconfig(libsrtp)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(speexdsp)
BuildRequires: pkgconfig(uuid)
# upstream use ghostscript-devel >= 9.53.3
BuildRequires: ghostscript-devel >= 9.52
Requires: libcapi20-3 >= 3.2
# libcapi20-3 >= 2011.8.29 is require to use libcapi20-3 >= 3.2 and not the old/other packages >= 2011.8.29.
# New and old packages provides the same name and version. Old version is greater than new version!!!!
###Requires: libcapi20-3 < 2011.8.29
# Is require libcapi20-3 from suse or libcapi and spandsp from tabos.org?
#Requires: libcapi >= 3.2.2
#Requires: spandsp >= 0.0.6pre21
Requires(post): %{_sbindir}/lpadmin
Requires(postun): %{_sbindir}/lpadmin
Provides: rogerrouter = %{version}
Obsoletes: rogerrouter < %{version}
%description
Roger Router is a clean solution for controlling the FRITZ!Box
or compatible router with Linux. It offers a rich feature list,
including caller monitor and fax support.
Note:
If you want to use the incoming notification in Roger Router
you must enable this feature within your fritzbox with #96*5*.
If you want to use the fax function in Roger Router you must
enable capi-over-tcp within your fritzbox with #96*3* and the
user must be a member of the group fax.
When you want to use telephonie over Fritz!Box you musst disable
"Ausführung bestimmter Einstellungen und Funktionen zusätzlich bestätigen"
under -> System -> Fritz!Box-Benutzer -> Anmeldung im Heimnetz
%prep
%autosetup -p1 -n %{name}router-%{version}
install -m644 %{SOURCE90} .
%build
%meson
%meson_build
%install
%meson_install
# printer
###mkdir -p %%{buildroot}%%{_prefix}/lib/cups/backend
###mv ./share/roger-cups %%{buildroot}%%{_prefix}/lib/cups/backend/
###chmod +x %%{buildroot}%%{_prefix}/lib/cups/backend/roger-cups
###mkdir -p %%{buildroot}/%%{_datadir}/cups/model
###cp ./share/roger-fax.ppd %%{buildroot}/%%{_datadir}/cups/model/
#
%find_lang %{name}
%fdupes %{buildroot}%{_datadir}/icons/hicolor
%check
%meson_test
%post
/sbin/ldconfig
# printer
if [ "$1" -eq "1" ]; then
groupadd -f fax
mkdir -p %{_localstatedir}/spool/roger
chown lp:fax %{_localstatedir}/spool/roger
chmod 2770 %{_localstatedir}/spool/roger/
lpadmin -p Roger-Router-Fax -E -v roger-cups:/ -P %{_datadir}/cups/model/roger-fax.ppd -o PageSize=A4 || :
# upstream wrote on webpage:
# lpadmin -p Roger-Router-Fax -m drv:///sample.drv/generic.ppd -v socket://localhost:9100/ -E -o PageSize=A4
fi
#
%if 0%{?suse_version} < 1500
%desktop_database_post
%endif
%postun
/sbin/ldconfig
# printer
if [ "$1" -eq "0" ]; then
lpadmin -x Roger-Router-Fax -E || :
rm -rf %{_localstatedir}/spool/roger/
fi
#
%if 0%{?suse_version} < 1500
%desktop_database_postun
%endif
%files -f %{name}.lang
%license COPYING
%doc README.md README.SUSE
%{_bindir}/roger
%dir %{_libdir}/roger
###%%dir %%{_prefix}/lib/cups
###%%dir %%{_prefix}/lib/cups/backend
###%%dir %%{_datadir}/cups
###%%dir %%{_datadir}/cups/model
%{_libdir}/roger/*
%{_datadir}/appdata/org.tabos.roger.appdata.xml
%{_datadir}/applications/org.tabos.roger.desktop
%{_datadir}/glib-2.0/schemas/*
%{_datadir}/icons/hicolor/*
###%%{_datadir}/cups/model/roger-fax.ppd
###%%{_prefix}/lib/cups/backend/roger-cups
%changelog