libglacier/include/glacier_pkgops.h

73 lines
2.1 KiB
C
Raw Normal View History

2024-07-21 22:35:38 -04:00
/*
* glacier_pkgops.h - Package-related function declarations for libglacier
*
* This file is part of Glacier.
*
* Glacier is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* Glacier is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Glacier. If
* not, see <https://www.gnu.org/licenses/>.
*/
#ifndef GLACIERPKGOPS_H_
#define GLACIERPKGOPS_H_
/*
2024-10-02 17:30:43 -04:00
* mkworkspace
2024-07-21 22:35:38 -04:00
*
2024-10-02 17:30:43 -04:00
* DESCRIPTION: Mkworkspace prepares /tmp/glacier-workspace for an operation
2024-07-21 22:35:38 -04:00
* PARAMETERS:
2024-10-02 17:30:43 -04:00
* None.
2024-07-21 22:35:38 -04:00
* RETURN VAUES:
2024-10-02 17:30:43 -04:00
* 0 on success, 2 on library error
2024-07-21 22:35:38 -04:00
* CAVEATS:
* None.
* EXAMPLE:
2024-10-02 17:30:43 -04:00
* mkworkspace();
2024-07-21 22:35:38 -04:00
*/
2024-10-02 17:30:43 -04:00
int mkworkspace();
2024-07-21 22:35:38 -04:00
/*
2024-10-02 17:30:43 -04:00
* prepare_pkg
2024-07-21 22:35:38 -04:00
*
2024-10-02 17:30:43 -04:00
* DESCRIPTION: Prepare_pkg copies a package archive from the localdb, and untars it
2024-07-21 22:35:38 -04:00
* PARAMETERS:
2024-10-02 17:30:43 -04:00
* char PACKAGE[] -> The package file to prepare
* RETURN VAUES:
* 0 on success, 1 on package does not exist, or error untarring
2024-07-21 22:35:38 -04:00
* CAVEATS:
2024-10-02 17:30:43 -04:00
* The example presented is bad. You should be calling the system profile variable
* rather than manually specifying one.
2024-07-21 22:35:38 -04:00
* EXAMPLE:
2024-10-02 17:30:43 -04:00
* prepare_pkg("/glacier/localdb/epkgs-x86_64-musl/foo.tar");
2024-07-21 22:35:38 -04:00
*/
2024-10-02 17:30:43 -04:00
int prepare_pkg(char PACKAGE[]);
2024-07-21 22:35:38 -04:00
/*
2024-10-02 17:30:43 -04:00
* run_make_task
2024-07-21 22:35:38 -04:00
*
2024-10-02 17:30:43 -04:00
* DESCRIPTION: Run_make_task runs a specified make task in a package's current working directory
2024-07-21 22:35:38 -04:00
* PARAMETERS:
2024-10-02 17:30:43 -04:00
* char TASK[] -> The make task to run
* RETURN VAUES:
2024-07-21 22:35:38 -04:00
* 0 on success, 1 on failure
* CAVEATS:
2024-10-02 17:30:43 -04:00
* 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.
2024-07-21 22:35:38 -04:00
* EXAMPLE:
2024-10-02 17:30:43 -04:00
* prepare_pkg("/glacier/localdb/epkgs-x86_64-musl/foo.tar");
* run_make_task("installpkg");
2024-07-21 22:35:38 -04:00
*/
2024-10-02 17:30:43 -04:00
int run_make_task(char TASK[]);
2024-07-21 22:35:38 -04:00
#endif