[arch-commits] Commit in go-bindata-assetfs/repos/community-x86_64 (4 files)

Christian Rebischke shibumi at archlinux.org
Sat Apr 10 23:14:14 UTC 2021


    Date: Saturday, April 10, 2021 @ 23:14:13
  Author: shibumi
Revision: 915704

archrelease: copy trunk to community-x86_64

Added:
  go-bindata-assetfs/repos/community-x86_64/38087fe4dafb822e541b3f7955075cc1c30bd294.patch
    (from rev 915703, go-bindata-assetfs/trunk/38087fe4dafb822e541b3f7955075cc1c30bd294.patch)
  go-bindata-assetfs/repos/community-x86_64/PKGBUILD
    (from rev 915703, go-bindata-assetfs/trunk/PKGBUILD)
Deleted:
  go-bindata-assetfs/repos/community-x86_64/38087fe4dafb822e541b3f7955075cc1c30bd294.patch
  go-bindata-assetfs/repos/community-x86_64/PKGBUILD

------------------------------------------------+
 38087fe4dafb822e541b3f7955075cc1c30bd294.patch |  226 +++++++++++------------
 PKGBUILD                                       |   75 +++----
 2 files changed, 151 insertions(+), 150 deletions(-)

Deleted: 38087fe4dafb822e541b3f7955075cc1c30bd294.patch
===================================================================
--- 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	2021-04-10 23:14:06 UTC (rev 915703)
+++ 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	2021-04-10 23:14:13 UTC (rev 915704)
@@ -1,113 +0,0 @@
-From b1a95d801a866b44a1c4ec60c2abaeb77ae54a87 Mon Sep 17 00:00:00 2001
-From: Mark Wallsgrove <mw at talis.com>
-Date: Sat, 2 Jan 2016 13:33:47 +0000
-Subject: [PATCH] Parse the output location for bindatafile
-
----
- go-bindata-assetfs/main.go | 57 ++++++++++++++++++++++++++------------
- 1 file changed, 40 insertions(+), 17 deletions(-)
-
-diff --git a/go-bindata-assetfs/main.go b/go-bindata-assetfs/main.go
-index 2d65094..0c7f42c 100644
---- a/go-bindata-assetfs/main.go
-+++ b/go-bindata-assetfs/main.go
-@@ -5,13 +5,12 @@ import (
- 	"bytes"
- 	"flag"
- 	"fmt"
-+	"io/ioutil"
- 	"os"
- 	"os/exec"
- 	"strings"
- )
- 
--const bindatafile = "bindata.go"
--
- func isDebug(args []string) bool {
- 	flagset := flag.NewFlagSet("", flag.ContinueOnError)
- 	debug := flagset.Bool("debug", false, "")
-@@ -28,29 +27,53 @@ func isDebug(args []string) bool {
- 	return *debug
- }
- 
-+func getBinDataFile() (*os.File, *os.File, []string, error) {
-+	bindataArgs := make([]string, 0)
-+	outputLoc := "bindata.go"
-+
-+	for i := 1; i < len(os.Args); i++ {
-+		if os.Args[i] == "-o" {
-+			outputLoc = os.Args[i+1]
-+			i++
-+		} else {
-+			bindataArgs = append(bindataArgs, os.Args[i])
-+		}
-+	}
-+
-+	tempFile, err := ioutil.TempFile(os.TempDir(), "")
-+	if err != nil {
-+		return &os.File{}, &os.File{}, nil, err
-+	}
-+
-+	outputFile, err := os.Create(outputLoc)
-+	if err != nil {
-+		return &os.File{}, &os.File{}, nil, err
-+	}
-+
-+	bindataArgs = append([]string{"-o", tempFile.Name()}, bindataArgs...)
-+	return outputFile, tempFile, bindataArgs, nil
-+}
-+
- func main() {
--	if _, err := exec.LookPath("go-bindata"); err != nil {
-+	path, err := exec.LookPath("go-bindata")
-+	if err != nil {
- 		fmt.Println("Cannot find go-bindata executable in path")
- 		fmt.Println("Maybe you need: go get github.com/elazarl/go-bindata-assetfs/...")
- 		os.Exit(1)
- 	}
--	cmd := exec.Command("go-bindata", os.Args[1:]...)
-+	out, in, args, err := getBinDataFile()
-+	if err != nil {
-+		fmt.Fprintln(os.Stderr, "Error: cannot create temporary file", err)
-+		os.Exit(1)
-+	}
-+	cmd := exec.Command(path, args...)
- 	cmd.Stdin = os.Stdin
- 	cmd.Stdout = os.Stdout
- 	cmd.Stderr = os.Stderr
- 	if err := cmd.Run(); err != nil {
-+		fmt.Fprintln(os.Stderr, "Error: go-bindata: ", err)
- 		os.Exit(1)
- 	}
--	in, err := os.Open(bindatafile)
--	if err != nil {
--		fmt.Fprintln(os.Stderr, "Cannot read", bindatafile, err)
--		return
--	}
--	out, err := os.Create("bindata_assetfs.go")
--	if err != nil {
--		fmt.Fprintln(os.Stderr, "Cannot write 'bindata_assetfs.go'", err)
--		return
--	}
- 	debug := isDebug(os.Args[1:])
- 	r := bufio.NewReader(in)
- 	done := false
-@@ -59,7 +82,7 @@ func main() {
- 			line = append(line, '\n')
- 		}
- 		if _, err := out.Write(line); err != nil {
--			fmt.Fprintln(os.Stderr, "Cannot write to 'bindata_assetfs.go'", err)
-+			fmt.Fprintln(os.Stderr, "Cannot write to ", out.Name(), err)
- 			return
- 		}
- 		if !done && !isPrefix && bytes.HasPrefix(line, []byte("import (")) {
-@@ -91,7 +114,7 @@ func assetFS() *assetfs.AssetFS {
- 	// Close files BEFORE remove calls (don't use defer).
- 	in.Close()
- 	out.Close()
--	if err := os.Remove(bindatafile); err != nil {
--		fmt.Fprintln(os.Stderr, "Cannot remove", bindatafile, err)
-+	if err := os.Remove(in.Name()); err != nil {
-+		fmt.Fprintln(os.Stderr, "Cannot remove", in.Name(), err)
- 	}
- }

Copied: go-bindata-assetfs/repos/community-x86_64/38087fe4dafb822e541b3f7955075cc1c30bd294.patch (from rev 915703, go-bindata-assetfs/trunk/38087fe4dafb822e541b3f7955075cc1c30bd294.patch)
===================================================================
--- 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	                        (rev 0)
+++ 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	2021-04-10 23:14:13 UTC (rev 915704)
@@ -0,0 +1,113 @@
+From b1a95d801a866b44a1c4ec60c2abaeb77ae54a87 Mon Sep 17 00:00:00 2001
+From: Mark Wallsgrove <mw at talis.com>
+Date: Sat, 2 Jan 2016 13:33:47 +0000
+Subject: [PATCH] Parse the output location for bindatafile
+
+---
+ go-bindata-assetfs/main.go | 57 ++++++++++++++++++++++++++------------
+ 1 file changed, 40 insertions(+), 17 deletions(-)
+
+diff --git a/go-bindata-assetfs/main.go b/go-bindata-assetfs/main.go
+index 2d65094..0c7f42c 100644
+--- a/go-bindata-assetfs/main.go
++++ b/go-bindata-assetfs/main.go
+@@ -5,13 +5,12 @@ import (
+ 	"bytes"
+ 	"flag"
+ 	"fmt"
++	"io/ioutil"
+ 	"os"
+ 	"os/exec"
+ 	"strings"
+ )
+ 
+-const bindatafile = "bindata.go"
+-
+ func isDebug(args []string) bool {
+ 	flagset := flag.NewFlagSet("", flag.ContinueOnError)
+ 	debug := flagset.Bool("debug", false, "")
+@@ -28,29 +27,53 @@ func isDebug(args []string) bool {
+ 	return *debug
+ }
+ 
++func getBinDataFile() (*os.File, *os.File, []string, error) {
++	bindataArgs := make([]string, 0)
++	outputLoc := "bindata.go"
++
++	for i := 1; i < len(os.Args); i++ {
++		if os.Args[i] == "-o" {
++			outputLoc = os.Args[i+1]
++			i++
++		} else {
++			bindataArgs = append(bindataArgs, os.Args[i])
++		}
++	}
++
++	tempFile, err := ioutil.TempFile(os.TempDir(), "")
++	if err != nil {
++		return &os.File{}, &os.File{}, nil, err
++	}
++
++	outputFile, err := os.Create(outputLoc)
++	if err != nil {
++		return &os.File{}, &os.File{}, nil, err
++	}
++
++	bindataArgs = append([]string{"-o", tempFile.Name()}, bindataArgs...)
++	return outputFile, tempFile, bindataArgs, nil
++}
++
+ func main() {
+-	if _, err := exec.LookPath("go-bindata"); err != nil {
++	path, err := exec.LookPath("go-bindata")
++	if err != nil {
+ 		fmt.Println("Cannot find go-bindata executable in path")
+ 		fmt.Println("Maybe you need: go get github.com/elazarl/go-bindata-assetfs/...")
+ 		os.Exit(1)
+ 	}
+-	cmd := exec.Command("go-bindata", os.Args[1:]...)
++	out, in, args, err := getBinDataFile()
++	if err != nil {
++		fmt.Fprintln(os.Stderr, "Error: cannot create temporary file", err)
++		os.Exit(1)
++	}
++	cmd := exec.Command(path, args...)
+ 	cmd.Stdin = os.Stdin
+ 	cmd.Stdout = os.Stdout
+ 	cmd.Stderr = os.Stderr
+ 	if err := cmd.Run(); err != nil {
++		fmt.Fprintln(os.Stderr, "Error: go-bindata: ", err)
+ 		os.Exit(1)
+ 	}
+-	in, err := os.Open(bindatafile)
+-	if err != nil {
+-		fmt.Fprintln(os.Stderr, "Cannot read", bindatafile, err)
+-		return
+-	}
+-	out, err := os.Create("bindata_assetfs.go")
+-	if err != nil {
+-		fmt.Fprintln(os.Stderr, "Cannot write 'bindata_assetfs.go'", err)
+-		return
+-	}
+ 	debug := isDebug(os.Args[1:])
+ 	r := bufio.NewReader(in)
+ 	done := false
+@@ -59,7 +82,7 @@ func main() {
+ 			line = append(line, '\n')
+ 		}
+ 		if _, err := out.Write(line); err != nil {
+-			fmt.Fprintln(os.Stderr, "Cannot write to 'bindata_assetfs.go'", err)
++			fmt.Fprintln(os.Stderr, "Cannot write to ", out.Name(), err)
+ 			return
+ 		}
+ 		if !done && !isPrefix && bytes.HasPrefix(line, []byte("import (")) {
+@@ -91,7 +114,7 @@ func assetFS() *assetfs.AssetFS {
+ 	// Close files BEFORE remove calls (don't use defer).
+ 	in.Close()
+ 	out.Close()
+-	if err := os.Remove(bindatafile); err != nil {
+-		fmt.Fprintln(os.Stderr, "Cannot remove", bindatafile, err)
++	if err := os.Remove(in.Name()); err != nil {
++		fmt.Fprintln(os.Stderr, "Cannot remove", in.Name(), err)
+ 	}
+ }

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-10 23:14:06 UTC (rev 915703)
+++ PKGBUILD	2021-04-10 23:14:13 UTC (rev 915704)
@@ -1,37 +0,0 @@
-# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
-
-pkgname=go-bindata-assetfs
-pkgver=1.0.1
-pkgrel=1
-pkgdesc="Serves embedded files from jteeuwen/go-bindata with net/http"
-arch=('x86_64')
-url="https://github.com/elazarl/go-bindata-assetfs"
-license=('BSD')
-depends=('glibc')
-makedepends=('go')
-source=(
-  "${pkgname}-${pkgver}.tar.gz::https://github.com/elazarl/go-bindata-assetfs/archive/v${pkgver}.tar.gz"
-)
-sha512sums=('fde5cd06393c82a8a1f9da5cc3054c1cc389328b5a232c5595a32755b2d613a83dc7777070152ad31ccbbbfbcf2419ad44bef89f88ceef4c6b7e5df8715309cf')
-
-prepare() {
-  cd "${pkgname}-${pkgver}"
-  mkdir -p "${srcdir}/src/github.com/elazarl/"
-  mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/github.com/elazarl/go-bindata-assetfs"
-}
-
-build() {
-  cd "${srcdir}/src/github.com/elazarl/go-bindata-assetfs/"
-  export CGO_CPPFLAGS="${CPPFLAGS}"
-  export CGO_CFLAGS="${CFLAGS}"
-  export CGO_CXXFLAGS="${CXXFLAGS}"
-  export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
-  GOPATH="${srcdir}" go build -o go-bindata-assetfs ./go-bindata-assetfs/
-}
-
-package() {
-  cd "${srcdir}/src/github.com/elazarl/go-bindata-assetfs/"
-  install -Dm755 "go-bindata-assetfs/go-bindata-assetfs" "${pkgdir}/usr/bin/go-bindata-assetfs"
-  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}

Copied: go-bindata-assetfs/repos/community-x86_64/PKGBUILD (from rev 915703, go-bindata-assetfs/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-04-10 23:14:13 UTC (rev 915704)
@@ -0,0 +1,38 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+
+pkgname=go-bindata-assetfs
+pkgver=1.0.1
+pkgrel=2
+pkgdesc="Serves embedded files from jteeuwen/go-bindata with net/http"
+arch=('x86_64')
+url="https://github.com/elazarl/go-bindata-assetfs"
+license=('BSD')
+depends=('glibc')
+makedepends=('go')
+source=(
+  "${pkgname}-${pkgver}.tar.gz::https://github.com/elazarl/go-bindata-assetfs/archive/v${pkgver}.tar.gz"
+)
+sha512sums=('fde5cd06393c82a8a1f9da5cc3054c1cc389328b5a232c5595a32755b2d613a83dc7777070152ad31ccbbbfbcf2419ad44bef89f88ceef4c6b7e5df8715309cf')
+
+prepare() {
+  cd "${pkgname}-${pkgver}"
+  mkdir -p "${srcdir}/src/github.com/elazarl/"
+  mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/github.com/elazarl/go-bindata-assetfs"
+}
+
+build() {
+  export GO111MODULE=off
+  cd "${srcdir}/src/github.com/elazarl/go-bindata-assetfs/"
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+  GOPATH="${srcdir}" go build -o go-bindata-assetfs ./go-bindata-assetfs/
+}
+
+package() {
+  cd "${srcdir}/src/github.com/elazarl/go-bindata-assetfs/"
+  install -Dm755 "go-bindata-assetfs/go-bindata-assetfs" "${pkgdir}/usr/bin/go-bindata-assetfs"
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}



More information about the arch-commits mailing list