pakfire_package_set_uuid(*pkg, uuid);
free(uuid);
+ // Assign more attributes
+ const struct attribute {
+ const char* name;
+ void(*func)(PakfirePackage pkg, const char* value);
+ } attributes[] = {
+ { "summary", pakfire_package_set_summary, },
+ { "description", pakfire_package_set_description, },
+ { "license", pakfire_package_set_license, },
+ { "url", pakfire_package_set_url, },
+ { "groups", pakfire_package_set_groups, },
+ { "vendor", pakfire_package_set_vendor, },
+ { "maintainer", pakfire_package_set_maintainer, },
+ { NULL },
+ };
+
+ for (const struct attribute* a = attributes; a->name; a++) {
+ char* value = pakfire_parser_get(parser, namespace, a->name);
+ if (!value)
+ continue;
+
+ a->func(*pkg, value);
+ free(value);
+ }
+
// All okay
r = 0;