Package Details: go-swagger 0.25.0-1

Git Clone URL: https://aur.archlinux.org/go-swagger.git (read-only, click to copy)
Package Base: go-swagger
Description: Toolkit for swagger in golang (go-swagger)
Upstream URL: https://goswagger.io
Licenses: Apache
Groups: swagger
Conflicts: swagger
Provides: swagger
Submitter: casualjim
Maintainer: casualjim
Last Packager: casualjim
Votes: 2
Popularity: 0.000002
First Submitted: 2016-10-22 08:29
Last Updated: 2020-07-18 19:33

Dependencies (5)

Required by (0)

Sources (1)

Latest Comments

matthias.lisin commented on 2020-06-18 00:39

Thanks for switching to source build! Wanted to add a few things since there were some changes since my comment.

just a suggestion I recently picked up on the mailing list:

  • you can drop the $pkg.tar.gz::$url format as Github allows to freely choose a filename of the downloaded source tag.

Explained here: github.com/ml-/pkgbuild

I maintained my own PKGBUILD for a short period of time which include all my suggestions: https://github.com/ml-/pkgbuild/blob/master/go-swagger/PKGBUILD

casualjim commented on 2020-06-17 07:35

I wanted to wait until I could do a new release. I've published a -bin package now with the binary version.

Thanks @matthias.lisin for the PKGBUILD it was helpful for providing the source build

matthias.lisin commented on 2020-05-22 11:55

Hi, can you compile the package from source, binary packages should have -bin suffix. Let me know if you need any help with the PKGBUILD.

Edit: Just did one for myself. In case you're interested:

# Maintainer: Ivan Porto Carrero <ivan@flanders.co.nz> (@casualjim)
pkgname=go-swagger
pkgver=0.23.0
pkgrel=2
pkgdesc="Toolkit for swagger in golang (go-swagger)"
arch=('x86_64' 'i686' 'aarch64' 'armv6h' 'armv7h')
groups=('swagger')
provides=('swagger')
conflicts=('swagger')
url="https://goswagger.io"
license=('Apache')
depends=('glibc')
makedepends=('git' 'go' 'gzip')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/go-swagger/go-swagger/archive/v${pkgver}.tar.gz")
sha256sums=('853ff265318249d0bbb4a4df68ade5ea1d8d0202c98f4796deb28ab2ca2fc758')

prepare() {
  cd "${pkgname}-${pkgver}"
  go mod download
}

build() {
  local commit_id
  commit_id=$(zcat ${pkgname}-${pkgver}.tar.gz | git get-tar-commit-id)

  cd "${pkgname}-${pkgver}"
  export CGO_ENABLED=1
  export CGO_LDFLAGS="$LDFLAGS"
  export CGO_CFLAGS="$CFLAGS"
  export CGO_CPPFLAGS="$CPPFLAGS"
  export CGO_CXXFLAGS="$CXXFLAGS"
  export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=readonly'
  go build -ldflags "-X=commands.Version=v${pkgver} -X=commands.Commit=${_commit}" ./cmd/swagger
}

package() {
  cd "${pkgname}-${pkgver}"
  install -Dm755 swagger -t "${pkgdir}/usr/bin"
  install -Dm644 cmd/swagger/completion/swagger.bash-completion -T "${pkgdir}/usr/share/bash-completion/completions/swagger"
  install -Dm644 cmd/swagger/completion/swagger.zsh-completion -T "${pkgdir}/usr/share/zsh/site-functions/_swagger"
}

casualjim commented on 2018-06-03 17:56

The downloaded binaries are now named uniquely. It's kind of odd though that things with different hashes and the same name don't invalidate local caches.

atriix commented on 2017-12-03 12:34

Please name the download so it is unique with each version. With a aur client cache things it won't re-download new versions as is.

Something along the line of https://slexy.org/view/s21DWpXVjT