File sqm-scripts.spec of Package sqm-scripts
#
# spec file for package sqm-scripts
#
# Copyright (c) 2023-2026, Martin Hauke <mardnh@gmx.de>
#
# 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: sqm-scripts
Version: 1.7.1
Release: 0
Summary: Traffic shaper scripts of the CeroWrt project
License: GPL-2.0-only
Group: Productivity/Networking/Other
URL: https://www.bufferbloat.net/projects/cerowrt/wiki/Smart_Queue_Management/
#Git-Clone: https://github.com/tohojo/sqm-scripts.git
Source: https://github.com/tohojo/sqm-scripts/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(systemd)
Requires: iproute2
BuildArch: noarch
%description
"Smart Queue Management", or "SQM" is shorthand for an integrated network
system that performs better per-packet/per flow network scheduling, active
queue length management (AQM), traffic shaping/rate limiting, and QoS
(prioritization).
%prep
%setup -q
%build
%make_build
%install
%make_install
%pre
%service_add_pre sqm@.service
%post
systemd-tmpfiles --create %{_tmpfilesdir}/sqm.conf || true
%service_add_post sqm@.service
%preun
%service_del_preun sqm@.service
%postun
%service_del_postun sqm@.service
%files
%doc README.md
%dir %{_sysconfdir}/sqm
%config(noreplace) %{_sysconfdir}/sqm/default.conf
%config(noreplace) %{_sysconfdir}/sqm/sqm.conf
%{_bindir}/sqm
%{_prefix}/lib/sqm
%{_tmpfilesdir}/sqm.conf
%ghost %{_rundir}/sqm
%{_unitdir}/sqm@.service
%changelog