speedtest-rs-rpm/speedtest-rs.spec

55 lines
1.6 KiB
RPMSpec
Raw Normal View History

2022-10-15 18:48:56 +02:00
%define debug_package %{nil}
%define repo https://cloud.silique.fr/gitea/Silique/speedtest-rs
Name: speedtest-rs
2023-01-10 21:51:48 +01:00
Version: 1.1.0
2022-10-15 18:48:56 +02:00
Release: 1%{?dist}
Summary: Unofficial Librespeed compatible server written in Rust
License: LGPL-3.0-only
URL: %{repo}
Source0: %{repo}/archive/%{version}.tar.gz
Source1: speedtest-rs.service
Source2: speedtest-rs.sysusers
2022-10-16 14:33:30 +02:00
Source3: config.env
2022-10-15 18:48:56 +02:00
BuildRequires: pkgconfig(openssl)
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
BuildRequires: rust-packaging
%description
A Librespeed server API implementation written in Rust compatible with upstream Librespeed clients.
%prep
%setup -qn speedtest-rs
%build
cargo build --release
%install
install -d %{buildroot}%{_sysconfdir}/%{name}
2022-10-16 14:33:30 +02:00
install -Dpm 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}
2022-10-15 18:48:56 +02:00
install -Dpm 755 target/release/speedtest-rs %{buildroot}%{_bindir}/speedtest-rs
2022-10-16 17:21:02 +02:00
install -d %{buildroot}%{_datadir}/%{name}
install -Dpm 644 assets/* %{buildroot}%{_datadir}/%{name}
ln -s example-singleServer-full.html %{buildroot}%{_datadir}/%{name}/index.html
2022-10-15 18:48:56 +02:00
install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/speedtest-rs.service
install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/speedtest-rs.conf
%files
%license LICENSE
%{_sysconfdir}/%{name}
%{_bindir}/speedtest-rs
2022-10-16 17:21:02 +02:00
%{_datadir}/%{name}
2022-10-15 18:48:56 +02:00
%{_unitdir}/speedtest-rs.service
%{_sysusersdir}/speedtest-rs.conf
%pre
%sysusers_create_compat %{SOURCE2}
%changelog
* Sat Oct 15 2022 Emmanuel Garette <egarette@silique.fr> 1.0.0
- Initial rpm : version 1.0.0
2023-01-10 21:51:48 +01:00
* Thu Jan 10 2023 Emmanuel Garette <egarette@silique.fr> 1.1.0
- can desactive ipinfo client