File nextcloud-notify-push.spec of Package nextcloud-notify-push
#
# spec file for package nextcloud-notify-push
#
# Copyright (c) 2021-2026 SUSE LLC
# Copyright (c) 2021-2026 Matthias Fehring <buschmann23@opensuse.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: nextcloud-notify-push
Version: 1.3.1
Release: 0
Summary: Nextcloud Notify Push Server
Group: Productivity/Networking/Web/Servers
License: AGPL-3.0-or-later
URL: https://github.com/nextcloud/notify_push
Source0: https://github.com/nextcloud/notify_push/archive/refs/tags/v%{version}.tar.gz#/notify_push-%{version}.tar.gz
# created with cargo vendor
Source1: vendor.tar.zst
Source3: instance.conf.example
Source4: nextcloud-notify-push@.service
Source5: nextcloud-notify-push.target
Source6: README.SUSE
BuildRequires: cargo-packaging
BuildRequires: rust >= 1.88.0
BuildRequires: systemd-rpm-macros
%description
This app attempts to solve the issue where Nextcloud clients have to
periodically check the server if any files have been changed. In order
to keep sync snappy, clients wants to check for updates often, which
increases the load on the server.
This provides the server part only, not the Nextcloud app.
%prep
%setup -q -n notify_push-%{version} -a 1
cp %{SOURCE6} .
%build
%{cargo_build}
%install
%{cargo_install}
# rename installed binary
mv %{buildroot}%{_bindir}/notify_push %{buildroot}%{_bindir}/nextcloud-notify-push
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/nextcloud-notify-push/instance.conf.example
install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}@.service
install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.target
%pre
%service_add_pre %{name}.target %{name}@.service
%post
%service_add_post %{name}.target %{name}@.service
%preun
%service_del_preun %{name}.target %{name}@.service
%postun
%service_del_postun %{name}.target %{name}@.service
%files
%license LICENSE
%doc README.md README.SUSE
%{_bindir}/nextcloud-notify-push
%dir %{_sysconfdir}/nextcloud-notify-push
%config %{_sysconfdir}/nextcloud-notify-push
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}.target
%changelog