summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik (Xarthisius) <xarthisius@gentoo.org>2011-07-22 10:06:39 +0200
committerKacper Kowalik (Xarthisius) <xarthisius@gentoo.org>2011-07-22 10:06:39 +0200
commit7705bbccad9b19bc738a77d1b1954ad094d6ce41 (patch)
treef6a3753d360369adf94a8b7bba4d71c72f354d9a
parent[x11-wm/i3] add live ebuild from sunrise (diff)
downloadxarthisius-7705bbccad9b19bc738a77d1b1954ad094d6ce41.tar.gz
xarthisius-7705bbccad9b19bc738a77d1b1954ad094d6ce41.tar.bz2
xarthisius-7705bbccad9b19bc738a77d1b1954ad094d6ce41.zip
[x11-misc/i3status] initial import
-rw-r--r--x11-misc/i3status/Manifest3
-rw-r--r--x11-misc/i3status/i3status-2.3.ebuild74
-rw-r--r--x11-misc/i3status/metadata.xml9
3 files changed, 86 insertions, 0 deletions
diff --git a/x11-misc/i3status/Manifest b/x11-misc/i3status/Manifest
new file mode 100644
index 0000000..b1f1a6e
--- /dev/null
+++ b/x11-misc/i3status/Manifest
@@ -0,0 +1,3 @@
+DIST i3status-2.3.tar.bz2 24814 RMD160 f37cbb61efe274d974bd38686755cd94d45ac230 SHA1 3d02ae2bc46f5a81453b4cab713211e04d466c16 SHA256 552dac4649f4e142c88ad3c42faace1fc372515c1b9dd979ebca58d36fa4bb1a
+EBUILD i3status-2.3.ebuild 1875 RMD160 c45b8898a06e4f10bb88d65966a1e663d89c6ce8 SHA1 2dea9f0151121fe5ff741885644f1d99ac784e41 SHA256 beaffddb1afa4860db54ddc213f2214aa2e398aae7131798d55a22c8a2737c6f
+MISC metadata.xml 264 RMD160 c148e577f07c64c6af50b8f0355923ae3e8b1d00 SHA1 b393cddf5b6235f10ad48ef49f402719f63ac7f8 SHA256 1800c92eae730be86a7957896944698a8e7f33004cf72cac17423708a4921d22
diff --git a/x11-misc/i3status/i3status-2.3.ebuild b/x11-misc/i3status/i3status-2.3.ebuild
new file mode 100644
index 0000000..361069d
--- /dev/null
+++ b/x11-misc/i3status/i3status-2.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="generates a status bar for dzen2, xmobar or similar"
+HOMEPAGE="http://i3wm.org/i3status/"
+SRC_URI="http://i3wm.org/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+caps"
+
+RDEPEND="dev-libs/confuse
+ media-libs/alsa-lib
+ net-wireless/wireless-tools"
+DEPEND="${RDEPEND}
+ caps? ( sys-libs/libcap )"
+
+# borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
+# @FUNCTION: fcaps
+# @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
+# @RETURN: 0 if all okay; non-zero if failure and fallback
+# @DESCRIPTION:
+# fcaps sets the specified capabilities in the effective and permitted set of
+# the given file. In case of failure fcaps sets the given file-mode.
+fcaps() {
+ local uid_gid=$1
+ local perms=$2
+ local capset=$3
+ local path=$4
+ local res
+
+ chmod $perms $path && \
+ chown $uid_gid $path
+ res=$?
+
+ use caps || return $res
+
+ #set the capability
+ setcap "$capset=ep" "$path" &> /dev/null
+ #check if the capabilitiy got set correctly
+ setcap -v "$capset=ep" "$path" &> /dev/null
+ res=$?
+
+ if [ $res -ne 0 ]; then
+ ewarn "Failed to set capabilities. Probable reason is missed kernel support."
+ ewarn "Kernel must have SECURITY_FILE_CAPABILITIES, and <FS>_FS_SECURITY"
+ ewarn "enabled (e.g. EXT3_FS_SECURITY) where <FS> is the filesystem to store"
+ ewarn "${path}"
+ ewarn
+ ewarn "Falling back to suid now..."
+ chmod u+s ${path}
+ fi
+ return $res
+}
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ sed -i -e "/@echo/d" -e "s:@\$(:\$(:g" -e "/setcap/d" Makefile || die
+}
+
+pkg_postinst() {
+ fcaps 0:users 550 cap_net_admin "${ROOT}"/usr/bin/${PN}
+ elog "You need to install x11-misc/xmobar or x11-misc/dzen to use ${PN}."
+ elog "Please refer to manual: man ${PN}"
+}
diff --git a/x11-misc/i3status/metadata.xml b/x11-misc/i3status/metadata.xml
new file mode 100644
index 0000000..b5caab4
--- /dev/null
+++ b/x11-misc/i3status/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>desktop-misc</herd>
+ <maintainer>
+ <email>xarthisius@gentoo.org</email>
+ <name>Kacper Kowalik</name>
+ </maintainer>
+</pkgmetadata>