Name: systemd-swap Summary: Creating hybrid swap space from zram swaps, swap files and swap partitions Version: 3.3.0 Release: 1%{?dist} License: GPLv3+ URL: https://github.com/Nefelim4ag/systemd-swap Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # Not schred swapfc file on ext4 Patch0: %{url}/commit/9f843c41a185b8972470e8ce828cadffea936b59.patch BuildArch: noarch BuildRequires: systemd-units Requires(post): systemd-sysv Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units Requires: systemd # support for zram Requires: util-linux Requires: kmod # need Linux kernel version 2.6.37.1 or better to use zram Requires: kernel >= 2.6.37.1 %description Manage swap on: zswap - Enable/Configure zram - Autoconfigurating files - (sparse files for saving space, support btrfs) block devices - auto find and do swapon It is configurable in /etc/systemd/swap.conf %prep %autosetup -n%{name}-%{version} # preserve timestamps sed -i -r 's:install -:\0p -:' Makefile %build # nothing %install make install PREFIX=%{buildroot} install -d %{buildroot}%{_unitdir} find %{buildroot} -name '*.service' -print -exec mv '{}' %{buildroot}%{_unitdir} \; %post %systemd_post mkzram.service %preun %systemd_preun mkzram.service %postun %systemd_postun_with_restart mkzram.service %files %license LICENSE %doc README.md %config(noreplace) %{_sysconfdir}/systemd/swap.conf %{_unitdir}/*.service %{_bindir}/systemd-swap %changelog * Tue Jul 11 2017 Raphael Groner - 3.0.0-1 - initial