diff --git a/addRepo.go b/addRepo.go index 279892c..f2555f7 100644 --- a/addRepo.go +++ b/addRepo.go @@ -81,6 +81,10 @@ func (c *controlBox) addRepo(path string) { c.dirtyL.SetText("false") } + if c.GoPath.String() == "" { + c.GoPath.SetText(c.status.GoPath()) + } + lasttag := c.status.GetLastTagVersion() if argv.Release { debversion = c.status.DebianReleaseVersion() diff --git a/buildPackage.go b/buildPackage.go index 67a2752..31d7faf 100644 --- a/buildPackage.go +++ b/buildPackage.go @@ -237,6 +237,9 @@ func (c *controlBox) writeDebianControlFile() bool { fmt.Fprintln(cf, "Maintainer:", c.Maintainer.String()) fmt.Fprintln(cf, "Packager:", c.Packager.String()) + if c.GoPath.String() != "" { + fmt.Fprintln(cf, "GoPath:", c.URL.String()) + } if c.URL.String() != "" { fmt.Fprintln(cf, "URL:", c.URL.String()) } diff --git a/controlBox.go b/controlBox.go index 2f9f73f..ce86ad9 100644 --- a/controlBox.go +++ b/controlBox.go @@ -15,6 +15,7 @@ type controlBox struct { Version *gadgets.OneLiner Maintainer *gadgets.OneLiner Packager *gadgets.BasicEntry + GoPath *gadgets.BasicEntry URL *gadgets.BasicEntry Architecture *gadgets.BasicDropdown InstallPath *gadgets.BasicCombobox @@ -77,6 +78,9 @@ func newControl(parent *gui.Node) *controlBox { c.Packager = gadgets.NewBasicEntry(c.grid, "Packager") c.grid.NextRow() + c.GoPath = gadgets.NewBasicEntry(c.grid, "GoPath") + c.grid.NextRow() + c.URL = gadgets.NewBasicEntry(c.grid, "URL") c.grid.NextRow() diff --git a/examples/gocomplete/control b/examples/gocomplete/control index 9f4c4f4..04ccf58 100644 --- a/examples/gocomplete/control +++ b/examples/gocomplete/control @@ -6,6 +6,7 @@ Packager: Jeff Carr Architecture: amd64 Depends: URL: github.com/posener/complete +GoPath: github.com/posener/complete Recommends: golang Version: 0.0.1 Description: gocomplete from posener diff --git a/readControlFile.go b/readControlFile.go index bf55ca9..2dc214c 100644 --- a/readControlFile.go +++ b/readControlFile.go @@ -67,6 +67,8 @@ func (c *controlBox) readControlFile() error { c.Maintainer.SetText(value) case "Packager": c.Packager.SetText(value) + case "GoPath": + c.GoPath.SetText(value) case "URL": c.URL.SetText(value) case "Depends":