%global forgeurl https://github.com/indigo-dc/oidc-agent Name: oidc-agent Version: 4.5.1 %forgemeta Release: %autorelease Summary: Command-line tool for obtaining OpenID Connect access tokens # The entire source is MIT except: # - src/oidc-gen/qr.c is GPLv2+; it is ussed in oidc-gen, which is in the # main package License: MIT and GPL-2.0-or-later URL: %{forgeurl} Source: %{forgesource} # https://github.com/indigo-dc/oidc-agent/pull/498 Patch0: drop-exec-on-man.patch # Disable the building of oidc-prompt. This allows # us to avoid using the bundled mustache Patch1: no-build-oidc-promt.patch # Use list.h from clibs-list package rather than bundled # Use cJSON.h from cjson-devel package rather than bundled Patch2: oidc-agent-system-cjson-list.patch # https://github.com/indigo-dc/oidc-agent/pull/515 Patch3: oidc-agent-make-mkdir.patch BuildRequires: gcc-c++ BuildRequires: clibs-list-devel BuildRequires: libcurl-devel BuildRequires: libsodium-devel BuildRequires: libmicrohttpd-devel BuildRequires: help2man BuildRequires: libsecret-devel BuildRequires: qrencode-devel BuildRequires: gtk3-devel BuildRequires: webkitgtk4-devel BuildRequires: webkitgtk4-jsc-devel BuildRequires: cjson-devel Requires: liboidc-agent = %{version}-%{release} Requires: jq # A previous non-Fedora package of this package contained # the main package as a meta package to the cli package # This will make the wider world's life easier. Provides: oidc-agent-cli = %{version}-%{release} %description oidc-agent is a set of tools to manage OpenID Connect tokens and make them easily usable from the command-line. These tools follow ssh-agent design, so OIDC tokens can be handled in a similar way as ssh keys. The agent stores multiple configurations and their associated refresh tokens securely. This tool consists of five programs: - oidc-agent that handles communication with the OIDC provider - oidc-gen that generates config files - oidc-add that loads (and unloads) configuration into the agent - oidc-token that can be used to get access token on the command-line - oidc-key-chain that re-uses oidc-agent across logins %package -n liboidc-agent Summary: Libary for oidc-agent %description -n liboidc-agent oidc-agent is a command-line tool for obtaining OpenID Connect Access tokens on the command-line. This package provides a library for easy communication with oidc-agent. Applications can use this library to request access token from oidc-agent. %package -n liboidc-agent-devel Summary: Development files for oidc-agent Requires: liboidc-agent = %{version}-%{release} %description -n liboidc-agent-devel oidc-agent is a command-line tool for obtaining OpenID Connect Access tokens on the command-line. This package provides the development files (static library and headers) required for building applications with liboidc-agent, a library for communicating with oidc-agent. %prep %forgesetup # Remove bundled sources rm -rf lib/cJSON rm -rf lib/list rm -rf src/oidc-prompt/mustache rm -rf src/oidc-prompt/html/static/css/lib/bootstrap.min.css %patch -P 0 -p1 %patch -P 1 -p1 %patch -P 2 -p1 %patch -P 3 -p1 %build #The following is meant to use system version of libs #but due mismatches of bundling non latest version #of libs Patch2 was applied instead. #export USE_CJSON_SO=0 #export USE_LIST_SO=0 %make_build CCFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" %install %make_install install_lib install_lib-dev \ BIN_AFTER_INST_PATH=%{buildroot}%{_prefix}\ BIN_PATH=%{buildroot}%{_prefix}\ MAN_PATH=%{buildroot}%{_mandir}\ CONFIG_PATH=%{buildroot}%{_sysconfdir}\ CONFIG_AFTER_INST_PATH=${_sysconfdir}\ BASH_COMPLETION_PATH=%{buildroot}%{_datarootdir}/bash-completion/completions\ DESKTOP_APPLICATION_PATH=%{buildroot}%{_datarootdir}/applications\ XSESSION_PATH=%{buildroot}%{_sysconfdir}/X11\ PROMPT_MAN_PATH=%{buildroot}%{_mandir}\ PROMPT_BIN_PATH=%{buildroot}%{_prefix}\ LIB_PATH=%{buildroot}%{_libdir}\ LIBDEV_PATH=%{buildroot}%{_libdir}\ INCLUDE_PATH=%{buildroot}%{_includedir} \ CCFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" # Remove deskktop files rm %{buildroot}%{_bindir}/oidc-agent-service rm %{buildroot}%{_datadir}/applications/oidc-gen.desktop rm %{buildroot}%{_sysconfdir}/X11/Xsession.d/91oidc-agent # remove static lib rm %{buildroot}%{_libdir}/liboidc-agent.a %files %doc README.md %{_bindir}/oidc-add %{_bindir}/oidc-agent #%%{_bindir}/oidc-agent-service %{_bindir}/oidc-gen %{_bindir}/oidc-keychain %{_bindir}/oidc-token # Not sure if following is official macro. %{bash_completions_dir}/oidc-add %{bash_completions_dir}/oidc-agent %{bash_completions_dir}/oidc-agent-service %{bash_completions_dir}/oidc-gen %{bash_completions_dir}/oidc-keychain %{bash_completions_dir}/oidc-token %{_mandir}/man1/oidc-agent.1* %{_mandir}/man1/oidc-gen.1* %{_mandir}/man1/oidc-add.1* %{_mandir}/man1/oidc-keychain.1* %{_mandir}/man1/oidc-token.1* %{_mandir}/man1/oidc-agent-service.1* %dir %{_sysconfdir}/oidc-agent %config(noreplace) %{_sysconfdir}/oidc-agent/issuer.config %config(noreplace) %{_sysconfdir}/oidc-agent/oidc-agent-service.options %config(noreplace) %{_sysconfdir}/oidc-agent/pubclients.config %files -n liboidc-agent %doc README.md %license LICENSE %{_libdir}/liboidc-agent.so.4 %{_libdir}/liboidc-agent.so.%{version} %files -n liboidc-agent-devel %{_libdir}/liboidc-agent.so %{_includedir}/oidc-agent %changelog %autochangelog