summaryrefslogtreecommitdiff
path: root/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild')
-rw-r--r--sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild b/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild
new file mode 100644
index 000000000000..f2f58f3974aa
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-2 prefix systemd unpacker
+
+FAKE_OS="ubuntu-22.04"
+DESCRIPTION="Microsoft Authentication Broker to access a corporate environment"
+HOMEPAGE="https://learn.microsoft.com/mem/intune/"
+SRC_URI="https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/${PN:0:1}/${PN}/${PN}_${PV}_amd64.deb"
+S="${WORKDIR}"
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+RESTRICT="bindist mirror"
+
+RDEPEND="
+ acct-user/microsoft-identity-broker
+ acct-group/microsoft-identity-broker
+ sys-apps/bubblewrap
+ sys-apps/dbus
+ virtual/jre:11
+"
+
+src_unpack() {
+ unpack_deb ${A}
+}
+
+src_configure() {
+ sed -i -r "s:^Exec(Start)?=.*/([^/]+):Exec\1=${EPREFIX}/usr/bin/\2:" \
+ usr/lib/systemd/*/*.service usr/share/dbus-1/*/*.service || die
+}
+
+src_install() {
+ newbin $(prefixify_ro "${FILESDIR}"/wrapper) microsoft-identity-broker
+ dosym microsoft-identity-broker /usr/bin/microsoft-identity-device-broker
+
+ java-pkg_dojar opt/microsoft/identity-broker/lib/*.jar
+
+ java-pkg_dolauncher microsoft-identity-broker \
+ --main com.microsoft.identity.broker.service.IdentityBrokerService \
+ --java_args '${MICROSOFT_IDENTITY_BROKER_OPTS}' \
+ -into /usr/share/${PN}
+
+ java-pkg_dolauncher microsoft-identity-device-broker \
+ --main com.microsoft.identity.broker.service.DeviceBrokerService \
+ --java_args '${MICROSOFT_IDENTITY_DEVICE_BROKER_OPTS}' \
+ -into /usr/share/${PN}
+
+ insinto /etc/microsoft-identity-broker
+ newins "${FILESDIR}/lsb-release-${FAKE_OS}" lsb-release
+ newins "${FILESDIR}/os-release-${FAKE_OS}" os-release
+
+ insinto /usr/share
+ doins -r usr/share/dbus-1
+
+ systemd_dounit usr/lib/systemd/system/*
+ systemd_douserunit usr/lib/systemd/user/*
+}