sys-process/uksmd: new package
authorJoonas Niilola <juippis@gentoo.org>
Thu, 8 Aug 2019 14:35:41 +0000 (17:35 +0300)
committerJoonas Niilola <juippis@gentoo.org>
Thu, 8 Aug 2019 14:36:35 +0000 (17:36 +0300)
- Userspace KSM helper daemon, to be run with pf-sources and
  CONFIG_KSM.

Package-Manager: Portage-2.3.71, Repoman-2.3.16
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
sys-process/uksmd/Manifest [new file with mode: 0644]
sys-process/uksmd/files/uksmd-0_p20190726-respect-cflags-ldflags.patch [new file with mode: 0644]
sys-process/uksmd/files/uksmd.init [new file with mode: 0644]
sys-process/uksmd/metadata.xml [new file with mode: 0644]
sys-process/uksmd/uksmd-0_pre20190726.ebuild [new file with mode: 0644]

diff --git a/sys-process/uksmd/Manifest b/sys-process/uksmd/Manifest
new file mode 100644 (file)
index 0000000..62b393a
--- /dev/null
@@ -0,0 +1 @@
+DIST uksmd-0_pre20190726.tar.bz2 13445 BLAKE2B 4d16b9e7dff80269561c61cf8ea4177e6ceaa2540a3ee5bb3a36684e8364d0a4abdfb494fd0dbb3e6d5d2c074601a0c39f9f0570448e3d5769e50184c8ef7975 SHA512 812217a067c2fe70a17a321b507071f369efa38ca12d566cde66b1fc6e2e3ffa7e4d3fd3904f2f3cf409e313d03ab06829cef23fffadd785282cb602dbd5f06e
diff --git a/sys-process/uksmd/files/uksmd-0_p20190726-respect-cflags-ldflags.patch b/sys-process/uksmd/files/uksmd-0_p20190726-respect-cflags-ldflags.patch
new file mode 100644 (file)
index 0000000..7e92204
--- /dev/null
@@ -0,0 +1,15 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2019-05-19 16:36:31.000000000 +0300
++++ b/Makefile 2019-07-24 18:12:29.444896030 +0300
+@@ -1,8 +1,8 @@
+ PROG = uksmd
+ OBJS = uksmd.o
+-PREFIX ?= /usr/local
+-CFLAGS = -O3 -Wall -Wextra -pedantic -pipe -fstack-protector-strong -fno-plt
+-LDFLAGS = -lprocps
++PREFIX ?= /usr
++CFLAGS += -Wextra -pedantic -fstack-protector-strong -fno-plt
++LDFLAGS += -lprocps
+ all: build
diff --git a/sys-process/uksmd/files/uksmd.init b/sys-process/uksmd/files/uksmd.init
new file mode 100644 (file)
index 0000000..637666b
--- /dev/null
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Userspace KSM helper daemon"
+command=/usr/bin/uksmd
+pidfile="/var/run/uksmd.pid"
diff --git a/sys-process/uksmd/metadata.xml b/sys-process/uksmd/metadata.xml
new file mode 100644 (file)
index 0000000..6b0a0fb
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>juippis@gentoo.org</email>
+    <name>Joonas Niilola</name>
+  </maintainer>
+</pkgmetadata>
diff --git a/sys-process/uksmd/uksmd-0_pre20190726.ebuild b/sys-process/uksmd/uksmd-0_pre20190726.ebuild
new file mode 100644 (file)
index 0000000..d0007f9
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info systemd
+
+MY_COMMIT="42f4ff8eb09011bf1a199938aa2afe23040d7faf"
+MY_P="${PN}-${MY_COMMIT}"
+
+DESCRIPTION="Userspace KSM helper daemon"
+HOMEPAGE="https://gitlab.com/post-factum/uksmd"
+SRC_URI="https://gitlab.com/post-factum/uksmd/-/archive/${MY_COMMIT}/${MY_P}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="sys-kernel/pf-sources:*
+       sys-process/procps"
+
+CONFIG_CHECK="KSM"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${P}-respect-cflags-ldflags.patch" )
+
+src_install() {
+       default
+       einstalldocs
+
+       newinitd "${FILESDIR}/uksmd.init" uksmd
+       systemd_dounit distro/uksmd.service
+}