/[gentoo-x86]/sys-auth/polkit/polkit-0.106-r1.ebuild
Gentoo

Contents of /sys-auth/polkit/polkit-0.106-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Jun 17 13:45:19 2012 UTC (11 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-auth/polkit/polkit-0.106-r1.ebuild,v 1.2 2012/06/17 13:44:23 ssuominen Exp $
4
5 EAPI=4
6 inherit eutils pam systemd user
7
8 DESCRIPTION="Policy framework for controlling privileges for system-wide services"
9 HOMEPAGE="http://www.freedesktop.org/wiki/Software/polkit"
10 SRC_URI="http://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz"
11
12 LICENSE="LGPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
15 IUSE="debug examples gtk +introspection kde nls pam systemd"
16
17 RDEPEND=">=dev-lang/spidermonkey-1.8.5
18 >=dev-libs/glib-2.32
19 >=dev-libs/expat-2
20 introspection? ( >=dev-libs/gobject-introspection-1 )
21 pam? (
22 sys-auth/pambase
23 virtual/pam
24 )
25 systemd? ( sys-apps/systemd )"
26 DEPEND="${RDEPEND}
27 app-text/docbook-xml-dtd:4.1.2
28 app-text/docbook-xsl-stylesheets
29 dev-libs/libxslt
30 dev-util/intltool
31 virtual/pkgconfig"
32 PDEPEND="
33 gtk? ( || (
34 >=gnome-extra/polkit-gnome-0.105
35 lxde-base/lxpolkit
36 ) )
37 kde? ( sys-auth/polkit-kde-agent )
38 !systemd? (
39 >=sys-auth/consolekit-0.4.5_p2012[policykit]
40 pam? ( sys-auth/pambase[consolekit] )
41 )"
42
43 DOCS="docs/TODO HACKING NEWS README"
44
45 pkg_setup() {
46 enewgroup polkitd
47 enewuser polkitd -1 -1 /var/lib/polkit-1 polkitd
48 }
49
50 src_prepare() {
51 sed -i -e '/unix-group/s:wheel:adm:' src/polkitbackend/*-default.rules || die #401513
52 }
53
54 src_configure() {
55 local myconf="--with-authfw=shadow"
56 use pam && \
57 myconf="--with-authfw=pam --with-pam-module-dir=$(getpam_mod_dir) --with-pam-include=system-local-login"
58
59 econf \
60 --localstatedir="${EPREFIX}"/var \
61 --disable-static \
62 $(use_enable debug verbose-mode) \
63 --enable-man-pages \
64 --disable-gtk-doc \
65 $(use_enable systemd libsystemd-login) \
66 $(use_enable introspection) \
67 --disable-examples \
68 $(use_enable nls) \
69 --with-os-type=gentoo \
70 "$(systemd_with_unitdir)" \
71 ${myconf}
72 }
73
74 src_install() {
75 default
76
77 fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d
78
79 prune_libtool_files
80
81 diropts -m0700 -o polkitd -g polkitd
82 keepdir /var/lib/polkit-1
83
84 if use examples; then
85 insinto /usr/share/doc/${PF}/examples
86 doins src/examples/{*.c,*.policy*}
87 fi
88 }
89
90 pkg_postinst() {
91 chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
92 chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1
93
94 echo
95 ewarn "If home directory of unix-user \"polkitd\" is set to /dev/null, run:"
96 ewarn "# usermod -d /var/lib/polkit-1 polkitd"
97
98 echo
99 ewarn "The default administrator unix-group was changed from \"wheel\" to"
100 ewarn "\"adm\", see *-default.rules in /etc/polkit-1/rules.d"
101 ewarn "Users of unix-group \"adm\" can run, for example, \"pkexec /bin/sh\""
102 ewarn "to gain root shell without root password."
103 ewarn "For more information, see http://bugs.gentoo.org/401513"
104 }

  ViewVC Help
Powered by ViewVC 1.1.13