From bc4b1fa7be17028c4232e00aba8dd6779eaa01fa Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Fri, 12 Jun 2015 17:54:41 +0200 Subject: [PATCH] New package: ulatencyd-0.6.0 --- srcpkgs/ulatencyd/files/subtle.lua | 30 +++++++++++ srcpkgs/ulatencyd/files/ulatencyd/run | 3 ++ srcpkgs/ulatencyd/template | 74 +++++++++++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 srcpkgs/ulatencyd/files/subtle.lua create mode 100644 srcpkgs/ulatencyd/files/ulatencyd/run create mode 100644 srcpkgs/ulatencyd/template diff --git a/srcpkgs/ulatencyd/files/subtle.lua b/srcpkgs/ulatencyd/files/subtle.lua new file mode 100644 index 0000000000..70c0120426 --- /dev/null +++ b/srcpkgs/ulatencyd/files/subtle.lua @@ -0,0 +1,30 @@ +--[[ + Copyright 2010,2011,2012 ulatencyd developers + + This file is part of ulatencyd. + + License: GNU General Public License 3 or later +]]-- + +SubtleWM = { + name = "SubtleWM", + re_basename = "subtle", + check = function(self, proc) + local flag = ulatency.new_flag{name="user.ui"} + proc:add_flag(flag) + proc:set_oom_score(-400) + rv = ulatency.filter_rv(ulatency.FILTER_STOP) + return rv + end +} + +AwesomeFix = RunnerFix.new("SubtleWM", {"subtle"}) + +-- on start we have to fix all processes that have descented from kde +local function cleanup_awesome_mess() + cleanup_desktop_mess({"subtle"}) + return false +end + +ulatency.add_timeout(cleanup_awesome_mess, 1000) +ulatency.register_filter(AwesomeUI) diff --git a/srcpkgs/ulatencyd/files/ulatencyd/run b/srcpkgs/ulatencyd/files/ulatencyd/run new file mode 100644 index 0000000000..b33d02d547 --- /dev/null +++ b/srcpkgs/ulatencyd/files/ulatencyd/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check consolekit >/dev/null || exit 1 +exec ulatencyd 2>&1 diff --git a/srcpkgs/ulatencyd/template b/srcpkgs/ulatencyd/template new file mode 100644 index 0000000000..d0684ba3a8 --- /dev/null +++ b/srcpkgs/ulatencyd/template @@ -0,0 +1,74 @@ +# Template file for 'ulatencyd' +pkgname=ulatencyd +version=0.6.0 +revision=1 +_subrelease=alpha.2.1 +wrksrc="${pkgname}-${version}-${_subrelease}" +build_style=cmake +hostmakedepends="cmake pkg-config" +makedepends="procps-ng-devel glib-devel dbus-glib-devel lua51-devel glibc-devel libxcb-devel" +depends="luaposix51 ConsoleKit2" +short_desc="Daemon to minimize latency on a linux system using cgroups" +maintainer="Andrea Brancaleoni " +license="GPL-3" +homepage="https://github.com/poelzi/${pkgname}" +distfiles="${homepage}/archive/${version}-${_subrelease}.tar.gz" +checksum=efaf0cf814ef36b9d63f6a588482a2f1ac435163ff5e9d8d20ce07de58efbf2e + +configure_args="-DCMAKE_EXE_LINKER_FLAGS=-ldl -DDEVELOP_MODE=false -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSYSTEMD_DIR=''" +conf_files=" +/etc/dbus-1/system.d/org.quamquam.ulatencyd.conf +/etc/ulatencyd/simple.conf +/etc/ulatencyd/cgroups.conf +/etc/ulatencyd/scheduler/20-desktop.lua +/etc/ulatencyd/scheduler/30-single-task.lua +/etc/ulatencyd/scheduler/30-game.lua +/etc/ulatencyd/scheduler/50-video_playback.lua +/etc/ulatencyd/scheduler/99-cleanup.lua +/etc/ulatencyd/scheduler/00-common.lua +/etc/ulatencyd/scheduler/20-one-seat-desktop.lua +/etc/ulatencyd/rules/subtle.lua +/etc/ulatencyd/rules/zz_isolate.lua +/etc/ulatencyd/rules/protectors.lua +/etc/ulatencyd/rules/awesome.lua +/etc/ulatencyd/rules/desktop.lua +/etc/ulatencyd/rules/gnome.lua +/etc/ulatencyd/rules/00-fixers.lua +/etc/ulatencyd/rules/lxde.lua +/etc/ulatencyd/rules/zz_fixers.lua +/etc/ulatencyd/rules/system.lua +/etc/ulatencyd/rules/kde.lua +/etc/ulatencyd/rules/scheduler.lua +/etc/ulatencyd/rules/xfce.lua +/etc/ulatencyd/rules/io.lua +/etc/ulatencyd/ulatencyd.conf +/etc/ulatencyd/simple.d/isolate.conf +/etc/ulatencyd/simple.d/games.conf +/etc/ulatencyd/simple.d/lxde.conf +/etc/ulatencyd/simple.d/applications.conf +/etc/ulatencyd/simple.d/audio.conf +/etc/ulatencyd/simple.d/idle.conf +/etc/ulatencyd/simple.d/sessions.conf +/etc/ulatencyd/simple.d/dbus.conf +/etc/ulatencyd/simple.d/xfce.conf +/etc/ulatencyd/simple.d/cinnamon.conf +/etc/ulatencyd/simple.d/screencasters.conf +/etc/ulatencyd/simple.d/ui.conf +/etc/ulatencyd/simple.d/pantheon.conf +/etc/ulatencyd/simple.d/portage.conf +/etc/ulatencyd/simple.d/fixes.conf +/etc/ulatencyd/simple.d/ubuntu.conf +/etc/ulatencyd/simple.d/bittorrent.conf +/etc/ulatencyd/simple.d/video.conf +/etc/ulatencyd/simple.d/unity.conf +/etc/ulatencyd/simple.d/media.conf" + +post_install() { + vsv ulatencyd + + vinstall ${FILESDIR}/subtle.lua 644 etc/ulatencyd/rules + + vmkdir usr/share + mv ${DESTDIR}/usr/man ${DESTDIR}/usr/share + mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin +}