Skip to content

Commit

Permalink
Merge pull request conda-forge#27664 from danielnachun/misc-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy authored Sep 22, 2024
2 parents e92d59a + 1528baf commit e7987c2
Show file tree
Hide file tree
Showing 13 changed files with 247 additions and 0 deletions.
8 changes: 8 additions & 0 deletions recipes/gen3-client/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
6 changes: 6 additions & 0 deletions recipes/gen3-client/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w"
go-licenses save . --save_path=license-files
35 changes: 35 additions & 0 deletions recipes/gen3-client/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "gen3-client" %}
{% set version = "1.2.1" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/uc-cdis/cdis-data-client/archive/{{ version }}.tar.gz
sha256: df864bfac0befb7b20552ae600f88e5e0e04349b355337cab7d96afaf427967e

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- gen3-client --help

about:
home: https://github.com/uc-cdis/cdis-data-client
license: Apache-2.0
license_file:
- LICENSE
- license-files/
summary: Data access client for Gen3 data commons
dev_url: https://github.com/uc-cdis/cdis-data-client

extra:
recipe-maintainers:
- danielnachun
11 changes: 11 additions & 0 deletions recipes/go-gum/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\gum.exe -ldflags="-s -X main.Version=%PKG_VERSION%" || goto :error
go-licenses save . --save_path=license-files --ignore github.com/mattn/go-localereader || goto :error

:: Manually copy licenses that go-licenses could not download
xcopy /s %RECIPE_DIR%\license-files\* %SRC_DIR%\license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
18 changes: 18 additions & 0 deletions recipes/go-gum/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/gum -ldflags="-s -w -X main.Version=${PKG_VERSION}"
go-licenses save . --save_path=license-files --ignore github.com/mattn/go-localereader

# Manually copy licenses that go-licenses could not download
cp -r ${RECIPE_DIR}/license-files/* ${SRC_DIR}/license-files

mkdir -p ${PREFIX}/etc/bash_completion.d
mkdir -p ${PREFIX}/share/fish/vendor_completions.d
mkdir -p ${PREFIX}/share/zsh/site-functions
mkdir -p ${PREFIX}/share/man/man1
gum completion bash > ${PREFIX}/etc/bash_completion.d/gum
gum completion fish > ${PREFIX}/share/fish/vendor_completions.d/gum.fish
gum completion zsh > ${PREFIX}/share/zsh/site-functions/_gum
gum man > ${PREFIX}/share/man/man1/gum.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Yasuhiro Matsumoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions recipes/go-gum/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "go-gum" %}
{% set version = "0.14.1" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/charmbracelet/gum/archive/v{{ version }}.tar.gz
sha256: 28d1d50a29ede093809b08ee6ac2f8a1a9c748728f481835fad3d2b45b0cec83

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- gum --help

about:
home: https://github.com/charmbracelet/gum
license: MIT
license_file:
- LICENSE
- license-files/
summary: Tool for glamorous shell scripts
dev_url: https://github.com/charmbracelet/gum

extra:
recipe-maintainers:
- danielnachun
10 changes: 10 additions & 0 deletions recipes/gvproxy/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\gvproxy.exe -ldflags="-s -H=windowsgui" .\cmd\gvproxy || goto :error
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\sshproxy.exe -ldflags="-s -H=windowsgui" .\cmd\win-sshproxy || goto :error
go-licenses save .\cmd\gvproxy --save_path=license-files_gvproxy || goto :error
go-licenses save .\cmd\win-sshproxy --save_path=license-files_win-sshproxy || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
13 changes: 13 additions & 0 deletions recipes/gvproxy/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/gvproxy -ldflags="-s -w" ./cmd/gvproxy
go build -buildmode=pie -trimpath -o=${PREFIX}/bin/qemu-wrapper -ldflags="-s -w" ./cmd/qemu-wrapper
go-licenses save ./cmd/gvproxy --save_path=license-files_gvproxy
go-licenses save ./cmd/qemu-wrapper --save_path=license-files_qemu-wrapper

if [[ ${target_platform} =~ .*linux.* ]]; then
go build -buildmode=pie -trimpath -o=${PREFIX}/bin/vm -ldflags="-s -w" ./cmd/vm
go-licenses save ./cmd/vm --save_path=license-files_vm
fi
40 changes: 40 additions & 0 deletions recipes/gvproxy/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% set name = "gvproxy" %}
{% set version = "0.7.2" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/containers/gvisor-tap-vsock/archive/v{{ version }}.tar.gz
sha256: 2163287ba1df33d9aba905888f271dc997d04fd3027f1c1f0c354d6045e07425

build:
number: 0

requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }}
- {{ compiler('go-cgo') }}
- go-licenses

test:
commands:
- gvproxy --help

about:
home: https://github.com/containers/gvisor-tap-vsock
license: Apache-2.0
license_file:
- LICENSE
- license-files_gvproxy/
- license-files_win-sshproxy/ # [win]
- license-files_qemu-wrapper/ # [not win]
- license-files_vm/ # [linux]
summary: A new network stack based on gVisor
dev_url: https://github.com/containers/gvisor-tap-vsock

extra:
recipe-maintainers:
- danielnachun
9 changes: 9 additions & 0 deletions recipes/joker/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
go generate ./... || goto :error
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s -X main.version=v%PKG_VERSION%" || goto :error
go-licenses save . --save_path=license-files --ignore github.com/candid82/joker || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
7 changes: 7 additions & 0 deletions recipes/joker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go generate ./...
go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w -X main.version=v${PKG_VERSION}"
go-licenses save . --save_path=license-files --ignore github.com/candid82/joker
34 changes: 34 additions & 0 deletions recipes/joker/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% set name = "joker" %}
{% set version = "1.3.5" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/candid82/joker/archive/v{{ version }}.tar.gz
sha256: f807a7378c78510fd7eba13607c3ec06c405ed08cc0605fade0fe2f7adeac101

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- joker --help

about:
home: https://github.com/candid82/joker
license: EPL-1.0
license_file:
- LICENSE
summary: Small Clojure interpreter, linter and formatter.
dev_url: https://github.com/candid82/joker

extra:
recipe-maintainers:
- danielnachun

0 comments on commit e7987c2

Please sign in to comment.