libglacier/include/glacier_pkgops.h
2024-07-21 22:35:38 -04:00

73 lines
1.8 KiB
C

/*
* 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_
/*
* parse_pkg_file
*
* DESCRIPTION: Parse_pkg_file parses a Glacier-compatible package.
* PARAMETERS:
* char fname[] -> The package file to parse
* RETURN VAUES:
* 0 on success, 1 on failure
* CAVEATS:
* None.
* EXAMPLE:
* init_config();
*/
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();
#endif