-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-misc/oidc-agent: new package, add 5.2.2
Signed-off-by: Oliver Freyermuth <[email protected]>
- Loading branch information
Showing
3 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST oidc-agent-5.2.2.tar.gz 1812670 BLAKE2B f17c8ef8d95e509f12ab3cf9a6a3bf4b3550f9f119070843ec40adad1ef959c870caacd74c4a144936b214212671227125eb268d8808261c4cf5f242fa87d036 SHA512 1953c465f0918d005d39ef93a6d792aea1287ac87f337d7d33ce8296920f457a8e420afcdd18343f255c97f504c5e58446a16d683a559952654491e78ed2c5a8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Oliver Freyermuth</name> | ||
</maintainer> | ||
<longdescription> | ||
oidc-agent is a set of tools to manage OpenID Connect tokens and make them | ||
easily usable from the command line. We followed the ssh-agent design, so users | ||
can handle OIDC tokens in a similar way as they do with ssh keys. | ||
oidc-agent is usually started in the beginning of an X-session or a login | ||
session. Through use of environment variables the agent can be located and | ||
used to handle OIDC tokens. | ||
</longdescription> | ||
<upstream> | ||
<remote-id type="github">indigo-dc/oidc-agent</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit tmpfiles xdg-utils | ||
|
||
DESCRIPTION="Agent and tools for managing OpenID Connect tokens on the command line" | ||
HOMEPAGE="https://github.com/indigo-dc/oidc-agent" | ||
SRC_URI="https://github.com/indigo-dc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="MIT" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm64 ~riscv" | ||
IUSE="test" | ||
|
||
DEPEND="app-crypt/libsecret | ||
dev-libs/cJSON:= | ||
dev-libs/libsodium:= | ||
media-gfx/qrencode | ||
net-libs/libmicrohttpd:= | ||
net-libs/webkit-gtk:4.1= | ||
net-misc/curl | ||
elibc_musl? ( sys-libs/argp-standalone )" | ||
RDEPEND="${DEPEND}" | ||
BDEPEND="test? ( dev-libs/check )" | ||
|
||
RESTRICT="!test? ( test )" | ||
|
||
src_prepare() { | ||
xdg_environment_reset | ||
default | ||
sed -i -e 's|^\(\s\+\)@|\1|' Makefile || die "Failed to increase verbosity in Makefile" | ||
} | ||
|
||
oidc_emake() { | ||
local mymakeargs=( | ||
USE_CJSON_SO=1 | ||
USE_LIST_SO=0 | ||
USE_MUSTACHE_SO=0 | ||
USE_ARGP_SO=$(usex elibc_musl 1 0) | ||
CONFIG_AFTER_INST_PATH="${EPREFIX}"/etc | ||
BIN_AFTER_INST_PATH="${EPREFIX}"/usr | ||
) | ||
|
||
emake "${mymakeargs[@]}" $@ | ||
} | ||
|
||
src_compile() { | ||
oidc_emake -j1 create_obj_dir_structure create_picobj_dir_structure # Bug #880157 | ||
oidc_emake | ||
} | ||
|
||
src_install() { | ||
oidc_emake \ | ||
PREFIX="${ED}" \ | ||
BIN_AFTER_INST_PATH="/usr" \ | ||
INCLUDE_PATH="${ED}"/usr/include \ | ||
LIB_PATH="${ED}"/usr/$(get_libdir) \ | ||
install | ||
|
||
# This file is not compatible with Gentoo and in any case, we generally | ||
# let the users load such agents themselves. | ||
rm -f "${ED}"/etc/X11/Xsession.d/91${PN} | ||
} | ||
|
||
pkg_postinst() { | ||
tmpfiles_process ${PN}.conf | ||
|
||
xdg_desktop_database_update | ||
|
||
if [[ -z "${REPLACING_VERSIONS}" ]]; then | ||
elog | ||
elog "You should use oidc-gen to initially generate your account configuration" | ||
elog "before it can be loaded into oidc-agent using oidc-add. For details, please" | ||
elog "consult the man page of oidc-gen, or full documentation at" | ||
elog " https://indigo-dc.gitbooks.io/oidc-agent/" | ||
elog | ||
else | ||
local old_ver | ||
for old_ver in ${REPLACING_VERSIONS}; do | ||
if [[ $(ver_cut 1 ${old_ver}) != 5 ]]; then | ||
ewarn "${PN} 5 is a major release with quite some usability improvements but unfortunately also some breaking changes." | ||
ewarn "Please consult" | ||
ewarn " https://indigo-dc.gitbook.io/oidc-agent/oidc-agent5" | ||
ewarn "for instructions on how to upgrade your configuration to this version" | ||
ewarn | ||
ewarn "Furthermore, please restart any running instances of ${PN}" | ||
ewarn "to make sure they are compatible with the updated clients." | ||
ewarn | ||
break | ||
fi | ||
done | ||
fi | ||
} | ||
|
||
pkg_postrm() { | ||
xdg_desktop_database_update | ||
} |