github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/renderers/deb/control.go (about) 1 package deb 2 3 import ( 4 _ "embed" 5 "path/filepath" 6 7 "github.com/pojntfx/hydrapp/hydrapp/pkg/renderers" 8 "github.com/pojntfx/hydrapp/hydrapp/pkg/renderers/rpm" 9 ) 10 11 //go:embed control 12 var controlTemplate string 13 14 type controlData struct { 15 AppID string 16 AppDescription string 17 AppSummary string 18 AppURL string 19 AppGit string 20 AppReleases []renderers.Release 21 ExtraPackages []rpm.Package 22 } 23 24 func NewControlRenderer( 25 appID string, 26 appDescription string, 27 appSummary string, 28 appURL string, 29 appGit string, 30 appReleases []renderers.Release, 31 extraPackages []rpm.Package, 32 ) renderers.Renderer { 33 return renderers.NewRenderer( 34 filepath.Join("debian", "control"), 35 controlTemplate, 36 controlData{appID, appDescription, appSummary, appURL, appGit, appReleases, extraPackages}, 37 ) 38 }