add GoPath: to .deb files

This commit is contained in:
Jeff Carr 2024-11-21 00:14:12 -06:00
parent 4bf2379357
commit 9ce1554c88
5 changed files with 14 additions and 0 deletions

View File

@ -81,6 +81,10 @@ func (c *controlBox) addRepo(path string) {
c.dirtyL.SetText("false") c.dirtyL.SetText("false")
} }
if c.GoPath.String() == "" {
c.GoPath.SetText(c.status.GoPath())
}
lasttag := c.status.GetLastTagVersion() lasttag := c.status.GetLastTagVersion()
if argv.Release { if argv.Release {
debversion = c.status.DebianReleaseVersion() debversion = c.status.DebianReleaseVersion()

View File

@ -237,6 +237,9 @@ func (c *controlBox) writeDebianControlFile() bool {
fmt.Fprintln(cf, "Maintainer:", c.Maintainer.String()) fmt.Fprintln(cf, "Maintainer:", c.Maintainer.String())
fmt.Fprintln(cf, "Packager:", c.Packager.String()) fmt.Fprintln(cf, "Packager:", c.Packager.String())
if c.GoPath.String() != "" {
fmt.Fprintln(cf, "GoPath:", c.URL.String())
}
if c.URL.String() != "" { if c.URL.String() != "" {
fmt.Fprintln(cf, "URL:", c.URL.String()) fmt.Fprintln(cf, "URL:", c.URL.String())
} }

View File

@ -15,6 +15,7 @@ type controlBox struct {
Version *gadgets.OneLiner Version *gadgets.OneLiner
Maintainer *gadgets.OneLiner Maintainer *gadgets.OneLiner
Packager *gadgets.BasicEntry Packager *gadgets.BasicEntry
GoPath *gadgets.BasicEntry
URL *gadgets.BasicEntry URL *gadgets.BasicEntry
Architecture *gadgets.BasicDropdown Architecture *gadgets.BasicDropdown
InstallPath *gadgets.BasicCombobox InstallPath *gadgets.BasicCombobox
@ -77,6 +78,9 @@ func newControl(parent *gui.Node) *controlBox {
c.Packager = gadgets.NewBasicEntry(c.grid, "Packager") c.Packager = gadgets.NewBasicEntry(c.grid, "Packager")
c.grid.NextRow() c.grid.NextRow()
c.GoPath = gadgets.NewBasicEntry(c.grid, "GoPath")
c.grid.NextRow()
c.URL = gadgets.NewBasicEntry(c.grid, "URL") c.URL = gadgets.NewBasicEntry(c.grid, "URL")
c.grid.NextRow() c.grid.NextRow()

View File

@ -6,6 +6,7 @@ Packager: Jeff Carr <jcarr@wit.com>
Architecture: amd64 Architecture: amd64
Depends: Depends:
URL: github.com/posener/complete URL: github.com/posener/complete
GoPath: github.com/posener/complete
Recommends: golang Recommends: golang
Version: 0.0.1 Version: 0.0.1
Description: gocomplete from posener Description: gocomplete from posener

View File

@ -67,6 +67,8 @@ func (c *controlBox) readControlFile() error {
c.Maintainer.SetText(value) c.Maintainer.SetText(value)
case "Packager": case "Packager":
c.Packager.SetText(value) c.Packager.SetText(value)
case "GoPath":
c.GoPath.SetText(value)
case "URL": case "URL":
c.URL.SetText(value) c.URL.SetText(value)
case "Depends": case "Depends":