v4.0.0-rc

This commit is contained in:
2024-10-02 17:30:43 -04:00
parent 9f14fd745c
commit ee51ce5ed5
23 changed files with 380 additions and 433 deletions

View File

@@ -53,16 +53,35 @@ int die_config();
/**************************************************************************************************************/
/*
* load_setting_from_config
* load_all_from_config
* DESCRIPTION: Initialize all settings from glacier.cfg.
* PARAMETERS:
* None.
* RETURN VALUES:
* 0 on success, 1 on file does not exist, 2 on library error
* CAVEATS:
* None.
* EXAMPLE:
* load_all_from_config();
*/
int load_all_from_config();
/**************************************************************************************************************/
/*
* load_setting_from_config
* DESCRIPTION: Initialize a specified from glacier.cfg.
* PARAMETERS:
* char SETTING[] -> The setting to initialize
* RETURN VALUES:
* 0 on success, 1 on setting not found, 2 on file does not exist, 3 on library error
* CAVEATS:
* None.
* EXAMPLE:
* load_setting_from_config();
*/
void load_setting_from_config();
int load_setting_from_config(char SETTING[]);
#endif

View File

@@ -19,54 +19,54 @@
#define GLACIERPKGOPS_H_
/*
* parse_pkg_file
* mkworkspace
*
* DESCRIPTION: Parse_pkg_file parses a Glacier-compatible package.
* DESCRIPTION: Mkworkspace prepares /tmp/glacier-workspace for an operation
* PARAMETERS:
* char fname[] -> The package file to parse
* None.
* RETURN VAUES:
* 0 on success, 2 on library error
* CAVEATS:
* None.
* EXAMPLE:
* mkworkspace();
*/
int mkworkspace();
/*
* prepare_pkg
*
* DESCRIPTION: Prepare_pkg copies a package archive from the localdb, and untars it
* PARAMETERS:
* char PACKAGE[] -> The package file to prepare
* RETURN VAUES:
* 0 on success, 1 on package does not exist, or error untarring
* CAVEATS:
* The example presented is bad. You should be calling the system profile variable
* rather than manually specifying one.
* EXAMPLE:
* prepare_pkg("/glacier/localdb/epkgs-x86_64-musl/foo.tar");
*/
int prepare_pkg(char PACKAGE[]);
/*
* run_make_task
*
* DESCRIPTION: Run_make_task runs a specified make task in a package's current working directory
* PARAMETERS:
* char TASK[] -> The make task to run
* RETURN VAUES:
* 0 on success, 1 on failure
* CAVEATS:
* None.
* MUST be run after prepare_pkg(), or else errors will occur
* Same caveat as above. Do not manually specify the system profile, use its variable.
* EXAMPLE:
* init_config();
* prepare_pkg("/glacier/localdb/epkgs-x86_64-musl/foo.tar");
* run_make_task("installpkg");
*/
int parse_pkg_file();
/*
* download_package_sources
*
* DESCRIPTION: Download_package_sources downloads the source code for a package.
* PARAMETERS:
* char PACKAGE[] -> The package name to download
* RETURN VALUES:
* 0 on success, 1 on failure
* CAVEATS:
* The URL for the package repository will autofill.
* EXAMPLE:
* download_package_sources("vim");
*/
int download_package_source();
/*
* run_build_task
*
* DESCRIPTION: Execute the package's pkgops file with parameter 'build'.
* PARAMETERS:
* None.
* RETURN VALUES:
* 0 on success, 1 on failure
* CAVEATS:
* Can only work on one package at a time. Implement in a loop for multiple.
* EXAMPLE:
* run_build_task();
*/
int run_build_task();
int run_make_task(char TASK[]);
#endif