summaryrefslogtreecommitdiff
path: root/builder.h
blob: 11308f7ed2ad2898b48c367d3f64179351ba0d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * pkg - Package builder/installer
 * https://rawnix.org
 *
 * Copyright (c) 2025 zorz@gmx.com
 * SPDX-License-Identifier: BSD-2-Clause
 */

#ifndef BUILDER_H
#define BUILDER_H

#include "pkg.h"
#include "repo.h"

/* Check if package is already built */
bool pkg_is_built(port_t *port);

/* Build a package (run mkpkg in port directory) */
int pkg_build(port_t *port);

/* Install a package (run addpkg) */
int pkg_install(port_t *port, bool upgrade, const char *root);


/* Remove a package (run delpkg) */
int pkg_remove(const char *name, const char *root);

/* Fetch binaries via the `bulk` tool; one invocation, all names.
 * Returns 0 on success, non-zero on any bulk error. */
int pkg_bulk_fetch(strarray_t *names);

#endif /* BUILDER_H */