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

Morten Linderud foxboron at archlinux.org
Sun Jul 5 15:24:25 UTC 2020


    Date: Sunday, July 5, 2020 @ 15:24:24
  Author: foxboron
Revision: 657866

archrelease: copy trunk to community-x86_64

Added:
  go-bindata-assetfs/repos/community-x86_64/38087fe4dafb822e541b3f7955075cc1c30bd294.patch
    (from rev 657865, go-bindata-assetfs/trunk/38087fe4dafb822e541b3f7955075cc1c30bd294.patch)
  go-bindata-assetfs/repos/community-x86_64/PKGBUILD
    (from rev 657865, 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, 153 insertions(+), 148 deletions(-)

Deleted: 38087fe4dafb822e541b3f7955075cc1c30bd294.patch
===================================================================
--- 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	2020-07-05 15:24:15 UTC (rev 657865)
+++ 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	2020-07-05 15:24:24 UTC (rev 657866)
@@ -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 657865, go-bindata-assetfs/trunk/38087fe4dafb822e541b3f7955075cc1c30bd294.patch)
===================================================================
--- 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	                        (rev 0)
+++ 38087fe4dafb822e541b3f7955075cc1c30bd294.patch	2020-07-05 15:24:24 UTC (rev 657866)
@@ -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	2020-07-05 15:24:15 UTC (rev 657865)
+++ PKGBUILD	2020-07-05 15:24:24 UTC (rev 657866)
@@ -1,35 +0,0 @@
-# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
-
-pkgname=go-bindata-assetfs
-pkgver=1.0.0
-pkgrel=4
-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-pie')
-source=(
-  "${pkgname}-${pkgver}.tar.gz::https://github.com/elazarl/go-bindata-assetfs/archive/v${pkgver}.tar.gz"
-  'https://github.com/elazarl/go-bindata-assetfs/commit/38087fe4dafb822e541b3f7955075cc1c30bd294.patch'
-)
-sha512sums=('009111511b10b14e83b166eaf37c36e6fc96097770cd6b1865d034f4e90cc3232930b6f5591ee1a960af46d76a7456a96dcc2ccc112234cb0d382a9f9cc575c2'
-            '9364a53fe6ce05a81429ec96f8fc542484fa8a860c8c011daed61d06db608fd0bc22a3837321119ff2429dc1e1b008be90977fa4bab74a4a90c9b126dc899cea')
-
-prepare() {
-  cd "${pkgname}-${pkgver}"
-  patch -p1 -i ../38087fe4dafb822e541b3f7955075cc1c30bd294.patch #https://github.com/elazarl/go-bindata-assetfs/issues/33
-  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/"
-  GOPATH="${srcdir}" go build -trimpath -ldflags "-extldflags ${LDFLAGS}" -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 657865, go-bindata-assetfs/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-07-05 15:24:24 UTC (rev 657866)
@@ -0,0 +1,40 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+
+pkgname=go-bindata-assetfs
+pkgver=1.0.0
+pkgrel=5
+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"
+  'https://github.com/elazarl/go-bindata-assetfs/commit/38087fe4dafb822e541b3f7955075cc1c30bd294.patch'
+)
+sha512sums=('009111511b10b14e83b166eaf37c36e6fc96097770cd6b1865d034f4e90cc3232930b6f5591ee1a960af46d76a7456a96dcc2ccc112234cb0d382a9f9cc575c2'
+            '9364a53fe6ce05a81429ec96f8fc542484fa8a860c8c011daed61d06db608fd0bc22a3837321119ff2429dc1e1b008be90977fa4bab74a4a90c9b126dc899cea')
+
+prepare() {
+  cd "${pkgname}-${pkgver}"
+  patch -p1 -i ../38087fe4dafb822e541b3f7955075cc1c30bd294.patch #https://github.com/elazarl/go-bindata-assetfs/issues/33
+  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"
+}


More information about the arch-commits mailing list