2023-01-25 13:00:33 +01:00
|
|
|
#ifndef VIETER_PACKAGE_INFO
|
|
|
|
#define VIETER_PACKAGE_INFO
|
|
|
|
|
|
|
|
#define FREE_STRING(sp) if (sp != NULL) free(sp)
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "dynarray.h"
|
|
|
|
|
|
|
|
typedef struct pkg_info {
|
|
|
|
char *name;
|
|
|
|
char *base;
|
|
|
|
char *version;
|
|
|
|
char *description;
|
|
|
|
int64_t size;
|
|
|
|
int64_t csize;
|
|
|
|
char *url;
|
|
|
|
char *arch;
|
|
|
|
int64_t build_date;
|
|
|
|
char *packager;
|
|
|
|
char *pgpsig;
|
|
|
|
int64_t pgpsigsize;
|
|
|
|
|
|
|
|
DynArray *groups;
|
|
|
|
DynArray *licenses;
|
|
|
|
DynArray *replaces;
|
|
|
|
DynArray *depends;
|
|
|
|
DynArray *conflicts;
|
|
|
|
DynArray *provides;
|
|
|
|
DynArray *optdepends;
|
|
|
|
DynArray *makedepends;
|
|
|
|
DynArray *checkdepends;
|
|
|
|
} PkgInfo;
|
|
|
|
|
|
|
|
PkgInfo *package_info_init();
|
2023-01-25 16:22:22 +01:00
|
|
|
void package_info_parse(PkgInfo *pkg_info, char *pkg_info_str);
|
2023-01-25 13:00:33 +01:00
|
|
|
void package_info_free(PkgInfo *pkg_info);
|
|
|
|
|
|
|
|
#endif
|