Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-misc/i3status: i3status-2.4.ebuild ChangeLog i3status-2.3.ebuild
Date: Tue, 27 Dec 2011 14:17:12
Message-Id: 20111227141701.AB5D62004B@flycatcher.gentoo.org
1 xarthisius 11/12/27 14:17:01
2
3 Modified: ChangeLog
4 Added: i3status-2.4.ebuild
5 Removed: i3status-2.3.ebuild
6 Log:
7 Version bump, drop old
8
9 (Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.3 x11-misc/i3status/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/i3status/ChangeLog?rev=1.3&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/i3status/ChangeLog?rev=1.3&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/i3status/ChangeLog?r1=1.2&r2=1.3
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/x11-misc/i3status/ChangeLog,v
21 retrieving revision 1.2
22 retrieving revision 1.3
23 diff -u -r1.2 -r1.3
24 --- ChangeLog 18 Nov 2011 09:32:09 -0000 1.2
25 +++ ChangeLog 27 Dec 2011 14:17:01 -0000 1.3
26 @@ -1,6 +1,12 @@
27 # ChangeLog for x11-misc/i3status
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/i3status/ChangeLog,v 1.2 2011/11/18 09:32:09 tetromino Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/x11-misc/i3status/ChangeLog,v 1.3 2011/12/27 14:17:01 xarthisius Exp $
31 +
32 +*i3status-2.4 (27 Dec 2011)
33 +
34 + 27 Dec 2011; Kacper Kowalik <xarthisius@g.o> +i3status-2.4.ebuild,
35 + -i3status-2.3.ebuild:
36 + Version bump, drop old
37
38 18 Nov 2011; Alexandre Rostovtsev <tetromino@g.o> i3status-2.3.ebuild:
39 Update fcaps() error message for recent kernels (bug #390903). Acked by
40
41
42
43 1.1 x11-misc/i3status/i3status-2.4.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/i3status/i3status-2.4.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/i3status/i3status-2.4.ebuild?rev=1.1&content-type=text/plain
47
48 Index: i3status-2.4.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/x11-misc/i3status/i3status-2.4.ebuild,v 1.1 2011/12/27 14:17:01 xarthisius Exp $
53
54 EAPI=4
55
56 inherit toolchain-funcs versionator
57
58 DESCRIPTION="generates a status bar for dzen2, xmobar or similar"
59 HOMEPAGE="http://i3wm.org/i3status/"
60 SRC_URI="http://i3wm.org/${PN}/${P}.tar.bz2"
61
62 LICENSE="BSD"
63 SLOT="0"
64 KEYWORDS="~amd64 ~x86"
65 IUSE="+caps"
66
67 RDEPEND="dev-libs/confuse
68 media-libs/alsa-lib
69 net-wireless/wireless-tools"
70 DEPEND="${RDEPEND}
71 caps? ( sys-libs/libcap )"
72
73 # borrowed from GSoC2010_Gentoo_Capabilities by constanze and flameyeys
74 # @FUNCTION: fcaps
75 # @USAGE: fcaps {uid:gid} {file-mode} {cap1[,cap2,...]} {file}
76 # @RETURN: 0 if all okay; non-zero if failure and fallback
77 # @DESCRIPTION:
78 # fcaps sets the specified capabilities in the effective and permitted set of
79 # the given file. In case of failure fcaps sets the given file-mode.
80 # Requires versionator.eclass
81 fcaps() {
82 local uid_gid=$1
83 local perms=$2
84 local capset=$3
85 local path=$4
86 local res
87
88 chmod $perms $path && \
89 chown $uid_gid $path
90 res=$?
91
92 use caps || return $res
93
94 #set the capability
95 setcap "$capset=ep" "$path" &> /dev/null
96 #check if the capabilitiy got set correctly
97 setcap -v "$capset=ep" "$path" &> /dev/null
98 res=$?
99
100 if [ $res -ne 0 ]; then
101 ewarn "Failed to set capabilities. Probable reason is missing kernel support."
102 ewarn "Your kernel must have <FS>_FS_SECURITY enabled (e.g. EXT4_FS_SECURITY)"
103 ewarn "where <FS> is the filesystem to store ${path}"
104 if ! version_is_at_least 2.6.33 "$(uname -r)"; then
105 ewarn "For kernel 2.6.32 or older, you will also need to enable"
106 ewarn "SECURITY_FILE_CAPABILITIES."
107 fi
108 ewarn
109 ewarn "Falling back to suid now..."
110 chmod u+s ${path}
111 fi
112 return $res
113 }
114
115 pkg_setup() {
116 tc-export CC
117 }
118
119 src_prepare() {
120 sed -i -e "/@echo/d" -e "s:@\$(:\$(:g" -e "/setcap/d" Makefile || die
121 }
122
123 pkg_postinst() {
124 fcaps 0:users 550 cap_net_admin "${ROOT}"/usr/bin/${PN}
125 elog "You need to install x11-misc/xmobar or x11-misc/dzen to use ${PN}."
126 elog "Please refer to manual: man ${PN}"
127 }