mkpkgconfig - create pkg-config metadata files
version v2.0.1
mkpkgconfig options
mkpkgconfig creates a pkg-config metadata (.pc) file. pkg-config variables and keywords are defined on the command line, variable dependencies are validated, and the configuration file is output. "Standard" variables (such as $libdir, $datadir) may be automatically created, and only variables which are used are output.
.pc
$libdir
$datadir
pkg-config distinguishes between variables and keywords. Values for both may include interpolated variables, as in Cflags: -I ${include}.
Cflags: -I ${include}
Some commonly used variables have dedicated command line options:
--prefix : base prefix for paths --package : filesystem compatible package name --modversion : package version
(--modversion sets the version variable; the --version flag will output the version of mkpkgconfig).
--modversion
--version
mkpkgconfig
--modversion is required. --prefix and --package may be required if a keyword requires them or --auto is set and auto-generated variables require it.
--prefix
--package
--auto
Common keywords also have dedicated options:
--Name --Conflicts --Description --Requires --Libs --Cflags --URL
The --Name and --Description options are required. The Version keyword is automatically set to ${version}. It is not possible to set it directly from the command line.
--Name
--Description
Version
${version}
Other variables and keywords may be specified via the --var and --kwd options, respectively:
--var
--kwd
--var name=value --kwd name=value
which may be used more than once.
mkpkgconfig can automatically generate a number of "standard" variables, such as bindir, libdir, etc, based upon the prefix variable. Use the "--list-auto" option to output a list of these variables.
Where the configuration file is to be written. It defaults to the standard output stream.
all
requested
needed
Which variables should be output. It defaults to needed.
output all variables, needed or not, including automatically generated ones if --auto was specified;
output only requested variables (via--var variable=value or --auto=variable,...) and keyword dependencies;
-var variable=value
--auto=variable,...
output only those variables actually used by keywords
Set the variable named name to value.
Set the prefix variable.
prefix
Set the package variable
package
Set the version value
version
Generate a set of variables. Use --list-auto to see what is generated.
--list-auto
If passed a list of variable names, those will be output if --usevars is set to requested.
--usevars
Individual variables may be overriden using --var.
Output a list of the automatically generated keywords and exit.
Set the keyword named name to value.
--name
Set the Name keyword. This parameter is required.
--description
Set the Description keyword. This parameter is required.
--Requires
--requires
Set the Requires keyword.
--Conflicts
--conflicts
Set the Conflicts keyword.
--Libs
--libs
Set the Libs keyword.
--Cflags
--cflags
Set the Cflags keyword.
Output the version of mkpkgconfig and exit.
Output a short help message and exit.
Output the manual and exit.
Please report any bugs or feature requests to bug-app-mkpkgconfig@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=App-mkpkgconfig
Source is available at
https://gitlab.com/djerius/app-mkpkgconfig
and may be cloned from
https://gitlab.com/djerius/app-mkpkgconfig.git
Diab Jerius <djerius@cpan.org>
This software is Copyright (c) 2020 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
To install App::mkpkgconfig, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::mkpkgconfig
CPAN shell
perl -MCPAN -e shell install App::mkpkgconfig
For more information on module installation, please visit the detailed CPAN module installation guide.