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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Wed Jun 27 10:26:23 2012 UTC (2 years ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
old

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

1 tetromino 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.4 # $Header: /var/cvsroot/gentoo-x86/sys-auth/polkit/polkit-0.106-r3.ebuild,v 1.3 2012/06/27 10:02:14 ssuominen Exp $
4 tetromino 1.1
5     EAPI=4
6 ssuominen 1.2 inherit eutils multilib pam pax-utils systemd user
7 tetromino 1.1
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     pam? (
39     systemd? ( sys-auth/pambase[systemd] )
40     !systemd? ( sys-auth/pambase[consolekit] )
41     )
42     !systemd? ( >=sys-auth/consolekit-0.4.5_p2012[policykit] )"
43    
44     pkg_setup() {
45     local u=polkitd
46     local g=polkitd
47     local h=/var/lib/polkit-1
48    
49     enewgroup ${g}
50     enewuser ${u} -1 -1 ${h} ${g}
51     esethome ${u} ${h}
52     }
53    
54     src_prepare() {
55     sed -i -e '/unix-group/s:wheel:adm:' src/polkitbackend/*-default.rules || die #401513
56    
57     has_version ">=dev-lang/spidermonkey-1.8.7" && { sed -i -e '/mozjs/s:185:187:g' configure || die; }
58     }
59    
60     src_configure() {
61     local myconf="--with-authfw=shadow"
62     use pam && \
63     myconf="--with-authfw=pam --with-pam-module-dir=$(getpam_mod_dir) --with-pam-include=system-local-login"
64    
65     econf \
66     --localstatedir="${EPREFIX}"/var \
67     --disable-static \
68     $(use_enable debug verbose-mode) \
69     --enable-man-pages \
70     --disable-gtk-doc \
71     $(use_enable systemd libsystemd-login) \
72     $(use_enable introspection) \
73     --disable-examples \
74     $(use_enable nls) \
75     --with-os-type=gentoo \
76     "$(systemd_with_unitdir)" \
77     ${myconf}
78     }
79    
80     src_install() {
81 ssuominen 1.2 emake \
82     DESTDIR="${D}" \
83     libprivdir="${EPREFIX}"/usr/$(get_libdir)/polkit-1 \
84     install
85 ssuominen 1.3
86 ssuominen 1.2 dodoc docs/TODO HACKING NEWS README
87 tetromino 1.1
88     fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d
89    
90     prune_libtool_files
91    
92     diropts -m0700 -o polkitd -g polkitd
93     keepdir /var/lib/polkit-1
94    
95     if use examples; then
96     insinto /usr/share/doc/${PF}/examples
97     doins src/examples/{*.c,*.policy*}
98     fi
99    
100     # Required for polkitd on hardened/PaX due to spidermonkey's JIT
101 ssuominen 1.2 pax-mark mr "${ED}"/usr/$(get_libdir)/polkit-1/polkitd
102 tetromino 1.1 }
103    
104     pkg_postinst() {
105     chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
106     chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1
107    
108     echo
109     ewarn "The default administrator unix-group was changed from \"wheel\" to"
110     ewarn "\"adm\", see *-default.rules in /etc/polkit-1/rules.d"
111     ewarn "Users of unix-group \"adm\" can run, for example, \"pkexec /bin/sh\""
112     ewarn "to gain root shell without root password."
113     ewarn "For more information, see http://bugs.gentoo.org/401513"
114     }

  ViewVC Help
Powered by ViewVC 1.1.20