summaryrefslogtreecommitdiff
path: root/sys-apps/deswappify-auto/deswappify-auto-20210509.ebuild
blob: 91b14e3890d319619237e91fd18b3d1c2b0c05a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
PYTHON_COMPAT=( python3_{5..12} )
inherit python-r1 systemd

ID="edd256a886cdfcf04bab08559ba9e45464a59a20"
DESCRIPTION="Automatically fetch swapped pages to physical memory when enough memory is available"
HOMEPAGE="https://github.com/wiedemannc/deswappify-auto"
SRC_URI="https://github.com/wiedemannc/deswappify-auto/archive/$ID.zip -> ${P}.zip"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

DEPEND="${PYTHON_DEPS}
	dev-python/python-systemd[${PYTHON_USEDEP}]
	dev-python/psutil[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"
BDEPEND=""

src_prepare() {
	default
	sed -i 's|/usr/local/bin/|| ; /^#/d' deswappify.service
}

src_install() {
	default
	python_foreach_impl python_doscript deswappify_auto.py
	systemd_dounit deswappify.service
}

S="${WORKDIR}/${PN}-${ID}"