%global debug_package %{nil} Name: ntfy Version: 2.37.2 Release: 1%{?dist} Summary: Send push notifications to your phone or desktop using PUT/POST License: Apache-2.0 OR GPL-2.0-only URL: https://github.com/binwiederhier/ntfy Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: golang >= 1.26 BuildRequires: gcc BuildRequires: nodejs >= 22.12 BuildRequires: npm BuildRequires: python3 BuildRequires: python3-pip BuildRequires: systemd-rpm-macros Requires(pre): shadow-utils %{?systemd_requires} %description ntfy is an HTTP-based publish/subscribe service: a message sent with PUT or POST is delivered to subscribers on phones, desktops and the command line. The single ntfy binary contains the server and the client, with the web app and the documentation built into it. %prep %autosetup -n %{name}-%{version} %build # The web app and the documentation are embedded into the server binary, so # they are built first, into the directories the Go sources embed from. pushd web npm ci npm run build mv build/index.html build/app.html rm -rf ../server/site mv build ../server/site rm ../server/site/config.js popd python3 -m venv venv venv/bin/pip install -r requirements.txt venv/bin/python -m mkdocs build export CGO_ENABLED=1 export GOMODCACHE=$PWD/.gomodcache export GOCACHE=$PWD/.gocache go build \ -tags sqlite_omit_load_extension,osusergo,netgo \ -ldflags "-s -w -X main.version=%{version}" \ -o ntfy . %install install -Dpm 0755 ntfy %{buildroot}%{_bindir}/ntfy install -Dpm 0644 server/ntfy.service %{buildroot}%{_unitdir}/ntfy.service install -Dpm 0644 server/server.yml %{buildroot}%{_sysconfdir}/ntfy/server.yml %check %{buildroot}%{_bindir}/ntfy --version %pre getent group ntfy >/dev/null || groupadd -r ntfy getent passwd ntfy >/dev/null || \ useradd -r -g ntfy -d /var/lib/ntfy -s /sbin/nologin -c "ntfy server" ntfy exit 0 %post %systemd_post ntfy.service %preun %systemd_preun ntfy.service %postun %systemd_postun_with_restart ntfy.service %files %license LICENSE LICENSE.GPLv2 %doc README.md %{_bindir}/ntfy %{_unitdir}/ntfy.service %config(noreplace) %{_sysconfdir}/ntfy/server.yml %changelog * Tue Nov 10 2026 sachesi - 2.37.2-1 - Initial package for Copr.