A new user interface for you!

File systemd-zram-service.spec of Package systemd-zram-service

# spec file for package systemd-zram-service
# Copyright (c) 2012 Malcolm J Lewis <malcolmlewis@opensuse.org>
# 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 http://bugs.opensuse.org/

Name:           systemd-zram-service
Version:        0.2.1
Release:        0
License:        GPL-2.0
Summary:        Systemd service for zram
Url:            https://code.launchpad.net/~elementary-os/elementaryos/zramswap-enabler
Group:          System/Daemons
Source0:        zramswap-enabler-0.2.1.tar.bz2
#Source0:       bzr branch lp:~elementary-os/elementaryos/zramswap-enabler
Source1:        zramswapon
Source2:        zramswapoff
Source3:        zramswap.service
BuildRequires:  systemd
Requires:       systemd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

A successor to compcache, zram, has been already integrated in the
Linux kernel for a while now. This means that no additional compilation
nor tweaking is required to benefit from compressing memory on the fly
and massively reduced swapping.

%setup -q -n zramswap-enabler-%{version}

# No building required, just a placehoder.

mkdir -p %{buildroot}%{_sbindir}
install -m 0755 %{S:1} %{S:2} %{buildroot}%{_sbindir}/
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{S:3} %{buildroot}%{_unitdir}/

%service_add_pre zramswap.service

%service_add_post zramswap.service

%service_del_preun zramswap.service

%service_del_postun zramswap.service

%doc debian/copyright debian/changelog