%global forgeurl https://github.com/amnezia-vpn/amneziawg-tools %global version 1.0 %global commit 5c6ffd6168f7c69199200a91803fa02e1b8c4152 %global date 20250903 %global source_date_epoch_from_changelog 0 %forgemeta Name: amneziawg-tools Version: %{forgeversion} Release: %{autorelease} Summary: AmneziaWG control tools License: GPL-2.0-or-later URL: %{forgeurl} Source0: %{forgesource} BuildRequires: make BuildRequires: gcc BuildRequires: systemd-rpm-macros Requires: amneziawg-dkms %description AmneziaWG is a VPN solution with traffic obfuscation. It is based on WireGuard and relies on UDP. This package provides the service control tools. %prep %forgesetup %build %set_build_flags %make_build -C src %install %make_install -C src %__install -p -D -m 644 -t %{buildroot}%{_pkgdocdir} README.md %__cp -f -r contrib %{buildroot}%{_pkgdocdir} %post for UNIT in $(systemctl -P Id show awg-quick@\*.service) do %systemd_post ${UNIT} done %preun for UNIT in $(systemctl -P Id show awg-quick@\*.service) do %systemd_preun ${UNIT} done %postun for UNIT in $(systemctl -P Id show awg-quick@\*.service) do %systemd_postun_with_restart ${UNIT} done %files %license COPYING %doc %{_pkgdocdir} %{_sysconfdir}/* %{_unitdir}/* %{_bindir}/* %{_datadir}/bash-completion/completions/* %{_mandir}/man8/*