40 lines
723 B
C
40 lines
723 B
C
#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();
|
|
void package_info_parse(PkgInfo *pkg_info, char *pkg_info_str);
|
|
void package_info_free(PkgInfo *pkg_info);
|
|
|
|
#endif
|