Yeet those builds out!
at main 36 lines 1.3 kB view raw
1package pkgmeta 2 3type Package struct { 4 Name string `json:"name"` 5 Version string `json:"version"` 6 Description string `json:"description"` 7 Homepage string `json:"homepage"` 8 Group string `json:"group"` 9 License string `json:"license"` 10 Platform string `json:"platform"` // if not set, default to linux 11 Goarch string `json:"goarch"` 12 Replaces []string `json:"replaces"` 13 Depends []string `json:"depends"` 14 Recommends []string `json:"recommends"` 15 16 EmptyDirs []string `json:"emptyDirs"` // rpm destination path 17 ConfigFiles map[string]string `json:"configFiles"` // pwd-relative source path, rpm destination path 18 Documentation map[string]string `json:"documentation"` // pwd-relative source path, file in /usr/share/doc/$Name 19 Files map[string]string `json:"files"` // pwd-relative source path, rpm destination path 20 21 Build func(BuildInput) `json:"build"` 22 Filename func(Package) string `json:"mkFilename"` 23} 24 25type BuildInput struct { 26 Output string `json:"out"` 27 Bin string `json:"bin"` 28 Doc string `json:"doc"` 29 Etc string `json:"etc"` 30 Man string `json:"man"` 31 Systemd string `json:"systemd"` 32} 33 34func (b BuildInput) String() string { 35 return b.Output 36}