diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ea127d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zswap-cli-*.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 3b7495b..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# zswap-cli - -The zswap-cli package \ No newline at end of file diff --git a/changelog b/changelog new file mode 100644 index 0000000..a0ca62a --- /dev/null +++ b/changelog @@ -0,0 +1,2 @@ +* Sat Jul 20 2024 Fedora Release Engineering - 0.9.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources new file mode 100644 index 0000000..3f488c0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zswap-cli-1.2.0.tar.gz) = 18b747005c96c79551cf797f55b4b2f66c14a6e6c2e2dbd1ca1ca3b4628735f25570a8f311a7673e28a1af7f777aca1055e0ca53aa0f2783cd75701f508996ea diff --git a/zswap-cli.spec b/zswap-cli.spec new file mode 100644 index 0000000..344c6c9 --- /dev/null +++ b/zswap-cli.spec @@ -0,0 +1,79 @@ +Name: zswap-cli +Version: 1.2.0 +Release: %autorelease + +License: MIT +Summary: Command-line tool to control the zswap options +URL: https://github.com/xvitaly/%{name} +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +%if 0%{?fedora} && 0%{?fedora} >= 42 +ExcludeArch: %{ix86} +%endif + +BuildRequires: boost-devel +BuildRequires: glibc-headers +BuildRequires: kernel-headers + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: libappstream-glib +BuildRequires: ninja-build +BuildRequires: pandoc +BuildRequires: systemd + +%{?systemd_requires} + +%description +Zswap-cli is a command-line tool to control the zswap kernel module +options. + +Zswap is a compressed cache for swap pages. It takes pages that are in the +process of being swapped out to disk and tries to compress them into a +RAM-based memory pool with dynamic allocation. + +It trades CPU cycles for a significant performance boost since reading from +a compressed cache is much faster than reading from a swap device. + +%prep +%autosetup -p1 + +%build +%cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_DOCS:BOOL=OFF \ + -DBUILD_MANPAGE:BOOL=ON \ + -DBUILD_METAINFO:BOOL=ON \ + -DBUILD_SHELL_COMPLETION:BOOL=ON \ + -DSYSTEMD_INTEGRATION:BOOL=ON +%cmake_build + +%check +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%install +%cmake_install + +%files +%doc docs/* +%license LICENSE +%{_bindir}/%{name} +%{_unitdir}/%{name}.service +%{_mandir}/man1/%{name}.* +%{_metainfodir}/*.metainfo.xml +%dir %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%{bash_completions_dir}/%{name} + +%changelog +%autochangelog