Skip to content

Commit 4501003

Browse files
committed
New upstream version 0.0~git20190811.3953808
1 parent e2f461e commit 4501003

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

main.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ var (
1313
)
1414

1515
func usage() {
16-
fmt.Fprintf(os.Stderr, "Usage: %s [globalflags] <command> [flags] <args>\n", os.Args[0])
16+
fmt.Fprintf(os.Stderr, "%s is a tool that converts Go packages into Debian package source.\n", os.Args[0])
17+
fmt.Fprintf(os.Stderr, "\n")
18+
fmt.Fprintf(os.Stderr, "Usage:\n\t%s [globalflags] <command> [flags] <args>\n", os.Args[0])
1719
fmt.Fprintf(os.Stderr, "\n")
1820
fmt.Fprintf(os.Stderr, "%s commands:\n", os.Args[0])
1921
fmt.Fprintf(os.Stderr, "\tmake\t\t\tcreate a Debian package\n")
2022
fmt.Fprintf(os.Stderr, "\tsearch\t\t\tsearch Debian for already-existing packages\n")
2123
fmt.Fprintf(os.Stderr, "\testimate\t\testimate the amount of work for a package\n")
2224
fmt.Fprintf(os.Stderr, "\tcreate-salsa-project\tcreate a project for hosting Debian packaging\n")
2325
fmt.Fprintf(os.Stderr, "\n")
24-
fmt.Fprintf(os.Stderr, "For backwards compatibility, when no command is specified, the make command is executed.\n")
25-
fmt.Fprintf(os.Stderr, "To learn more about a command, run %s <command> -help, e.g. %s make -help\n", os.Args[0], os.Args[0])
26+
fmt.Fprintf(os.Stderr, "For backwards compatibility, when no command is specified,\nthe make command is executed.\n")
27+
fmt.Fprintf(os.Stderr, "\n")
28+
fmt.Fprintf(os.Stderr, "To learn more about a command, run \"%s <command> -help\",\ne.g. \"%s make -help\"\n", os.Args[0], os.Args[0])
29+
fmt.Fprintf(os.Stderr, "\n")
2630
}
2731

2832
func main() {

make.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ func writeTemplates(dir, gopkg, debsrc, debbin, debversion, pkgType string, depe
481481
}
482482
defer f.Close()
483483
fmt.Fprintf(f, "Source: %s\n", debsrc)
484+
fmt.Fprintf(f, "Maintainer: Debian Go Packaging Team <[email protected]>\n")
485+
fmt.Fprintf(f, "Uploaders:\n %s <%s>,\n", getDebianName(), getDebianEmail())
484486
// TODO: change this once we have a “golang” section.
485487
fmt.Fprintf(f, "Section: devel\n")
488+
fmt.Fprintf(f, "Testsuite: autopkgtest-pkg-go\n")
486489
fmt.Fprintf(f, "Priority: optional\n")
487-
fmt.Fprintf(f, "Maintainer: Debian Go Packaging Team <[email protected]>\n")
488-
fmt.Fprintf(f, "Uploaders:\n %s <%s>,\n", getDebianName(), getDebianEmail())
489-
fmt.Fprintf(f, "Rules-Requires-Root: no\n")
490490
builddeps := []string{"debhelper-compat (= 12)", "dh-golang"}
491491
builddeps_bytype := append([]string{"golang-any"}, dependencies...)
492492
sort.Strings(builddeps_bytype)
@@ -496,25 +496,27 @@ func writeTemplates(dir, gopkg, debsrc, debbin, debversion, pkgType string, depe
496496
builddeps_deptype = "Arch"
497497
}
498498
fmt.Fprintf(f, "Build-Depends-%s:\n %s,\n", builddeps_deptype, strings.Join(builddeps_bytype, ",\n "))
499-
fmt.Fprintf(f, "Standards-Version: 4.3.0\n")
500-
fmt.Fprintf(f, "Homepage: %s\n", getHomepageForGopkg(gopkg))
499+
fmt.Fprintf(f, "Standards-Version: 4.4.0\n")
501500
fmt.Fprintf(f, "Vcs-Browser: https://salsa.debian.org/go-team/packages/%s\n", debsrc)
502501
fmt.Fprintf(f, "Vcs-Git: https://salsa.debian.org/go-team/packages/%s.git\n", debsrc)
502+
fmt.Fprintf(f, "Homepage: %s\n", getHomepageForGopkg(gopkg))
503+
fmt.Fprintf(f, "Rules-Requires-Root: no\n")
503504
fmt.Fprintf(f, "XS-Go-Import-Path: %s\n", gopkg)
504-
fmt.Fprintf(f, "Testsuite: autopkgtest-pkg-go\n")
505505
fmt.Fprintf(f, "\n")
506506
fmt.Fprintf(f, "Package: %s\n", debbin)
507507
deps := []string{"${misc:Depends}"}
508508
if pkgType == "program" {
509509
fmt.Fprintf(f, "Architecture: any\n")
510-
fmt.Fprintf(f, "Built-Using: ${misc:Built-Using}\n")
511510
deps = append(deps, "${shlibs:Depends}")
512511
} else {
513512
fmt.Fprintf(f, "Architecture: all\n")
514513
deps = append(deps, dependencies...)
515514
}
516515
sort.Strings(deps)
517516
fmt.Fprintf(f, "Depends:\n %s,\n", strings.Join(deps, ",\n "))
517+
if pkgType == "program" {
518+
fmt.Fprintf(f, "Built-Using: ${misc:Built-Using}\n")
519+
}
518520
description, err := getDescriptionForGopkg(gopkg)
519521
if err != nil {
520522
log.Printf("Could not determine description for %q: %v\n", gopkg, err)
@@ -699,8 +701,7 @@ func execMake(args []string, usage func()) {
699701
fmt.Fprintf(os.Stderr, "Usage: %s [make] <go-package-importpath>\n", os.Args[0])
700702
fmt.Fprintf(os.Stderr, "Example: %s make golang.org/x/oauth2\n", os.Args[0])
701703
fmt.Fprintf(os.Stderr, "\n")
702-
fmt.Fprintf(os.Stderr, "%s will create new files and directories in the current working directory.\n", os.Args[0])
703-
fmt.Fprintf(os.Stderr, "%s will connect to the internet to download the specified Go package.\n", os.Args[0])
704+
fmt.Fprintf(os.Stderr, "\"%s make\" downloads the specified Go package from the Internet,\nand creates new files and directories in the current working directory.\n", os.Args[0])
704705
fmt.Fprintf(os.Stderr, "\n")
705706
fmt.Fprintf(os.Stderr, "Flags:\n")
706707
fs.PrintDefaults()
@@ -711,13 +712,13 @@ func execMake(args []string, usage func()) {
711712
fs.StringVar(&gitRevision,
712713
"git_revision",
713714
"",
714-
"git revision (see gitrevisions(7)) of the specified Go package to check out, defaulting to the default behavior of git clone. Useful in case you do not want to package e.g. current HEAD.")
715+
"git revision (see gitrevisions(7)) of the specified Go package\nto check out, defaulting to the default behavior of git clone.\nUseful in case you do not want to package e.g. current HEAD.")
715716

716717
var allowUnknownHoster bool
717718
fs.BoolVar(&allowUnknownHoster,
718719
"allow_unknown_hoster",
719720
false,
720-
"The pkg-go naming conventions (see https://go-team.pages.debian.net/packaging.html) use a canonical identifier for the hostname, and the mapping is hardcoded into dh-make-golang. In case you want to package a Go package living on an unknown hoster, you may set this flag to true and double-check that the resulting package name is sane. Contact pkg-go if unsure.")
721+
"The pkg-go naming conventions use a canonical identifier for\nthe hostname (see https://go-team.pages.debian.net/packaging.html),\nand the mapping is hardcoded into dh-make-golang.\nIn case you want to package a Go package living on an unknown hoster,\nyou may set this flag to true and double-check that the resulting\npackage name is sane. Contact pkg-go if unsure.")
721722

722723
var pkgType string
723724
fs.StringVar(&pkgType,

0 commit comments

Comments
 (0)