#ifndef PKGIT_PKG_H #define PKGIT_PKG_H #include "str.h" struct package_t; typedef bool (*package_hook_cb_t)(struct package_t *pkg); typedef str (*package_version_cb_t)(struct package_t *pkg); typedef struct package_t { str name, version, url, src; unsigned int dep_count; bool is_local; package_hook_cb_t setup, build, install, rm, on_update, fetch_sources; package_version_cb_t fetch_latest_version; } package_t; bool setup(package_t *pkg), build(package_t *pkg), install(package_t *pkg), rm(package_t *pkg), on_update(package_t *pkg), fetch_sources(package_t *pkg); str fetch_latest_version(package_t *pkg); #endif