Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sys-auth/polkit/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST polkit-0.120.tar.gz 1626659 SHA512 db072769439d5e17d0eed681e7b94251b77828c1474b40fe40b94293903a64333e7fa17515a3270648691f04a1374d8b404405ead6abf292a8eb8483164adc46
DIST polkit-126-d627b0d.tar.gz 456234 BLAKE2B ad2ee24409b585b8ac03d2c11ac41d570651498a8c5faac763c2ea65b0118c18ee7c3813e020e723fabd32a371a10844cceb13bdb0858b5ab4a3613740773883 SHA512 8d1a5976b339dd891d6bb6ac9827d3113f7dbb01918c09c3de13cbfa83e6829b7f44a5688ebefcca876cf2054a7dfc9db6af97c1768996c63dbdbd17145112c5
DIST polkit-127-9e4894c.tar.gz 473001 BLAKE2B e665388986c4d68d606b3b09079abca4b68eaf2f70e68e788dcdd4e529648cd57b6caced64ee6dc0e80e00f0efd84aa9812546a8760b065c903ab2e8029b30a5 SHA512 68b842d822ebdb71377694bc9f71ee31049d57b81bba26ae3423e09730ba177144b70f59fbecbbb4fd6ccebb8c37bfe8c7f3331eaad94995e0faa525a5c49da4
110 changes: 110 additions & 0 deletions sys-auth/polkit/polkit-127.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Distributed under the terms of the GNU General Public License v2
# Autogen by MARK Devkit

EAPI=7
inherit meson pam pax-utils systemd user xdg-utils

DESCRIPTION="polkit (formerly PolicyKit) is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes."
HOMEPAGE="https://github.com/polkit-org/polkit"
SRC_URI="https://api.github.com/repos/polkit-org/polkit/tarball/refs/tags/127 -> polkit-127-9e4894c.tar.gz"
LICENSE="LGPL2+"
SLOT="0"
KEYWORDS="*"
PATCHES=(
"${FILESDIR}/polkit-126-dbusmock.patch"
"${FILESDIR}/polkit-126-elogind.patch"
)
DOCS=(
docs/TODO
HACKING.md
NEWS.md
README.md
)
IUSE="+elogind examples gtk +introspection kde pam"
BDEPEND="app-text/docbook-xml-dtd:4.1.2
app-text/docbook-xsl-stylesheets
dev-libs/gobject-introspection-common
dev-libs/libxslt
sys-devel/gettext
virtual/pkgconfig
introspection? ( dev-libs/gobject-introspection )

"
RDEPEND="dev-lang/duktape
dev-libs/glib:2
dev-libs/expat
elogind? ( sys-auth/elogind )
!elogind? ( sys-apps/systemd )
pam? (
sys-auth/pambase
sys-libs/pam
)

"
DEPEND="${RDEPEND}
"
PDEPEND="gtk? ( || (
gnome-extra/polkit-gnome
lxde-base/lxsession
) )
kde? ( kde-plasma/polkit-kde-agent )

"

post_src_unpack() {
mv polkit-org-polkit-* ${S}
}


pkg_setup() {
local u=polkitd
local g=polkitd
local h=/var/lib/polkit-1
enewgroup ${g}
enewuser ${u} -1 -1 ${h} ${g}
esethome ${u} ${h}
}
src_prepare() {
default
sed -i -e 's|unix-group:@PRIVILEGED_GROUP@|unix-user:@PRIVILEGED_GROUP@|' src/polkitbackend/*-default.rules.in || die
}
src_configure() {
xdg_environment_reset
local emesonargs=(
--localstatedir="${EPREFIX}"/var
-Dauthfw="$(usex pam pam shadow)"
-Dexamples=false
-Dgtk_doc=false
-Dman=true
-Dtests=false
-Dsession_tracking="$(usex elogind 'elogind' 'logind')"
-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
$(meson_use introspection)
$(usex pam "-Dpam_module_dir=$(getpam_mod_dir)" '')
)
meson_src_configure
}
src_compile() {
meson_src_compile
# Required for polkitd on hardened/PaX due to spidermonkey's JIT
pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest
}
src_install() {
meson_src_install
if use examples ; then
docinto examples
dodoc src/examples/{*.c,*.policy*}
fi
diropts -m 0700 -o polkitd
keepdir /usr/share/polkit-1/rules.d
fperms u+s /usr/bin/pkexec
fperms u+s /usr/lib/polkit-1/polkit-agent-helper-1
}
pkg_postinst() {
chmod 0700 "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
chown polkitd "${EROOT}"/{etc,usr/share}/polkit-1/rules.d
}



# vim: filetype=ebuild