The packages_cpm.txt
file is used to indicate the libraries that user will install or to indicate the dependent libraries of the installation library.
The command needs to split by ,
and end by ;
.
A string up to the first comma is a command or library name. And the character string after that is
exapmle:
<command or libName>, [arg1], [arg2], ...;
Comments rules of //
and /* ~ */
are available.
exapmle:
// comments
/*
comments
*/
ARCHITECTURE - set an architecture of installation libraries
ARCHITECTURE, <architecture>;
ARCHITECTURE is a initialization command to set architecture name. Architecture name is used to identifying architecture, for example in the packages directory, in the cache file name, archive directory, archive file, and so on.
The scope of the ARCHITECTURE definition is valid until it is overwritten. The definition is also valid exceeds the packages_cpm.txt
file and the dependent packages_cpm.txt
file is affected.
NOTE: ARCHITECTURE should be defined at the beginning of the packages_cpm.txt
file in order to seek the package directory.
ARCHITECTURE, amd64;
―――.
BUILD_ENV - set an environment for build source file or extracting archive file
BUILD_ENV, <CPM_ENV|DOCKER_ENV|SYSTEM_ENV>, [directory-path-to-the-dependent-files];
- CPM_ENV (Default setting)
Libraries and compilers undercpm_env/local
are used because of the environment value is set tocpm_env/local
- DOCKER_ENV
Docker environment defined by the argument is used. The user must set the directory PATH to the dependent files ofdocker_base_path.txt
,docker_build.sh
anddocker_run.sh
in the 1st argument. - SYSTEM_ENV
System defined libraries and compilers are used. (The environment value is not changed).
The scope of the BUILD_ENV definition is valid until it is overwritten. The definition is Not exceeds the packages_cpm.txt
file and the dependent packages_cpm.txt
file is Not affected.
- set CPM_ENV
BUILD_ENV, CPM_ENV;
- set DOCKER_ENV
BUILD_ENV, DOCKER_ENV, cpm/build_env/docker/ubuntu18.04_for_build_gcc;
- set SYSTEM_ENV
BUILD_ENV, SYSTEM_ENV;
―――.
IMPORT - set a URL of the user defined downloading script to download user defined installation script.
IMPORT, <libName-using-in-the-packages_cpm.txt>, <lib-version>, <URL-to-the-downloading-script>;
IMPORT command is downloading user defined library which is not defined by CPM package directory.
1st argument defines library name using in the packages_cpm.txt
. 2nd argument defines a URL to the downloading script to download installation scripts.
CPM downloads scripts using wget command and the URL must be public. While the IMPORT command is convenient to supply user defined libraries, library user needs to check the safety of installation scripts and packages at their own risk.
IMPORT, CPM_libExample_to_IMPORT, 0.1.0, "https://github.com/admiswalker/CPM_libExample_to_IMPORT/raw/main/cpm_import/script/0.1.0/download_installation_scripts.sh";
―――.
INSTALL_MODE - set installation source.
INSTALL_MODE, <archive|auto|source>;
- archive
uses archive file (built binary) to install. - auto (Default setting)
tries to usearchive
at first, and ifarchive
is not found, use source file at second. tries to usearchive
at first. Ifarchive
is not found, use the source file second. - source
uses source file to install and build on the system. Build environment is defined byBUILD_ENV
command.
The scope of the INSTALL_MODE definition is valid until it is overwritten. And the definition is Not exceeds the packages_cpm.txt
file and the dependent packages_cpm.txt
file is Not affected.
- archive
INSTALL_MODE, archive;
- auto
INSTALL_MODE, auto;
- source
INSTALL_MODE, source;
―――.
<lib-name> - indicates the installation library to CPM.
<lib-name>, [inequality-sign1][version1], [inequality-sign2][version2], ...;
Unreserved names as commands are considered lib-name.
- lib-name
A library name of undercpm/packages
orIMPORT
-ed library name can use. - inequality-sign
Inequality signs of==
,!=
,>=
and<=
are available. - version
Version comparison specifications
gcc, ==12.1.0;
gcc, ==12.1.*; // wild card can use.
gcc, ==12.1.?; // wild card can use.
gcc, ==7.5.0, ==8.4.0, ==9.4.0, ==10.3.0, ==11.2.0, ==12.1.0;
gcc, >=8.4.0, <=10.3.0, !=12.1.0;
―――.
CPM prioritizes library-dependent order and attempts to install libraries according to the order of packages_cpm.txt
.