1.\" Copyright (c) 2026 pkgconf authors (see AUTHORS). 2.\" 3.\" Permission to use, copy, modify, and/or distribute this software for any 4.\" purpose with or without fee is hereby granted, provided that the above 5.\" copyright notice and this permission notice appear in all copies. 6.\" 7.\" This software is provided 'as is' and without any warranty, express or 8.\" implied. In no event shall the authors be liable for any damages arising 9.\" from the use of this software. 10.Dd January 22, 2026 11.Dt SPDXTOOL 1 12.Os 13.Sh NAME 14.Nm spdxtool 15.Nd a tool for generating SPDX Lite 3.0.1 profile software bills of material document 16.Sh SYNOPSIS 17.Nm 18.Op Ar options 19.Ar module ... 20.Sh DESCRIPTION 21.Nm 22is a program which generates a JSON-LD formated SPDX Lite 3.0.1 software bill of 23materials (SBOM) for a given set of pkg-config modules. 24The output of this tool can then be translated into other SBOM 25formats as necessary. 26 27More documention about SDPX 3.0.1 can be found from: 28.Lk https://spdx.github.io/spdx-spec/v3.0.1/ 29.Pp 30The 31.Ar options 32are as follows: 33.Bl -tag -width indent 34.It Fl -about 35Print the version number, the Copyright notice, and the license of the 36.Nm 37program to standard output and exit. 38Most other options and all command line arguments are ignored. 39.It Fl -version 40Print the version number of the 41.Nm 42program to standard output and exit. 43Most other options and all command line arguments are ignored. 44.It Fl -agent-name 45Set agent name-property 46in /Core/Agent-class. Default is 'Default' 47.It Fl -creation-time 48Set create-property time in /Core/CreationInfo-class. 49SPDX documentation recomends using ISO 8601-formated time which is: YYYY-MM-DDThh:mm:ssZ. 50Default is document creation time. 51This takes precedence over the 52.Ev SOURCE_DATE_EPOCH 53environment variable. 54.It Fl -creation-id 55Set creation ID in /Core/CreationInfoc-class. 56As ID in creation info mainly have special format and it's 57default is '_:creationinfo_1'. 58.It Fl -define-variable Ns = Ns Ar varname Ns = Ns Ar value 59Define 60.Ar varname 61as 62.Ar value . 63Variables are used in query output, and some modules' results may change based 64on the presence of a variable definition. 65.El 66.Sh ENVIRONMENT 67.Bl -tag -width indent 68.It Ev PKG_CONFIG_DEBUG_SPEW 69If set, print debugging messages to stderr. 70.It Ev PKG_CONFIG_IGNORE_CONFLICTS 71If set, ignore 72.Ic Conflicts 73rules in modules. 74Has the same effect as the 75.Fl -ignore-conflicts 76option in 77.Xr pkgconf 1 78. 79.It Ev PKG_CONFIG_LIBDIR 80A colon-separated list of low-priority directories where 81.Xr pc 5 82files are looked up. 83The module search path is constructed by appending this list to 84.Ev PKG_CONFIG_PATH , 85which enjoys higher priority. 86If 87.Ev PKG_CONFIG_LIBDIR 88is not defined, the default list compiled into the 89.Nm 90program from the 91.Dv PKG_DEFAULT_PATH 92preprocessor macro is appended instead. 93If 94.Ev PKG_CONFIG_LIBDIR 95is defined but empty, nothing is appended. 96.It Ev PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH 97Impose a limit on the allowed depth in the dependency graph. 98.It Ev PKG_CONFIG_PATH 99A colon-separated list of high-priority directories where 100.Xr pc 5 101files are looked up. 102.It Ev PKG_CONFIG_PRELOADED_FILES 103Colon-separated list of 104.Xr pc 5 105files which are loaded before any other pkg-config files. 106These packages are given highest priority over any other 107.Xr pc 5 108files that would otherwise provide a given package. 109.It Ev SOURCE_DATE_EPOCH 110If set, and the 111.Fl -creation-time 112option is not given, the creation time in /Core/CreationInfo-class is derived 113from this UNIX timestamp instead of the current time, allowing for reproducible 114SBOM generation. 115.El 116.Sh EXIT STATUS 117.Ex -std 118.Sh EXAMPLES 119Generating an SBOM for the package named foo: 120.Dl $ spdxtool foo 121.Dl { 122.Dl "@context": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld", 123.Dl "@graph": [ 124.Dl { 125.Dl "type": "Agent", 126.Dl "creationInfo": "_:creationinfo_1", 127.Dl "spdxId": "https://github.com/pkgconf/pkgconf/Agent/default", 128.Dl "name": "Default" 129.Dl }, 130.Dl { 131.Dl "type": "CreationInfo", 132.Dl "@id": "_:creationinfo_1", 133.Dl [...] 134.Sh SEE ALSO 135.Xr pc 5 , 136.Xr pkgconf 1 137