add group and summary fields

This commit is contained in:
2025-04-20 08:41:36 +03:00
parent b46dd41ada
commit c51d1d9202
10 changed files with 179 additions and 55 deletions

View File

@ -304,6 +304,7 @@ func buildPkgMetadata(
Provides: append(vars.Provides, vars.Name),
Depends: deps,
}
pkgInfo.Section = vars.Group
pkgFormat := input.PkgFormat()
info := input.OSRelease()
@ -315,6 +316,17 @@ func buildPkgMetadata(
})
}
if pkgFormat == "rpm" {
pkgInfo.RPM.Group = vars.Group
if vars.Summary != "" {
pkgInfo.RPM.Summary = vars.Summary
} else {
lines := strings.SplitN(vars.Description, "\n", 2)
pkgInfo.RPM.Summary = lines[0]
}
}
if vars.Epoch != 0 {
pkgInfo.Epoch = strconv.FormatUint(uint64(vars.Epoch), 10)
}