Skip to content

Commit

Permalink
Add gocommands recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Jan 16, 2024
1 parent 8bf3fcf commit 1f32d64
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
13 changes: 13 additions & 0 deletions recipes/gocommands/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2010-2023, The Arizona Board of Regents on behalf of The University of Arizona

All rights reserved.

Developed by: CyVerse as a collaboration between participants at BIO5 at The University of Arizona (the primary hosting institution), Cold Spring Harbor Laboratory, The University of Texas at Austin, and individual contributors. Find out more at http://www.cyverse.org/.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of CyVerse, BIO5, The University of Arizona, Cold Spring Harbor Laboratory, The University of Texas at Austin, nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 changes: 8 additions & 0 deletions recipes/gocommands/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off

if not exist "%PREFIX%\bin" (
mkdir "%PREFIX%\bin"
if errorlevel 1 exit 1
)

copy %SRC_DIR%\gocmd.exe %PREFIX%\bin\gocmd.exe
2 changes: 2 additions & 0 deletions recipes/gocommands/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdir -p ${PREFIX}/bin
cp ${SRC_DIR}/gocmd ${PREFIX}/bin/gocmd
56 changes: 56 additions & 0 deletions recipes/gocommands/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set name = "gocommands" %}
{% set version = "0.7.6" %}
{% set git_repo = "https://github.com/cyverse/gocommands" %}
{% set release_url = "https://github.com/cyverse/gocommands/releases" %}

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

source:
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-darwin-amd64.tar.gz # [osx and x86_64]
md5: b0d7a6d0ab22bc6e31386c8297b5a62b # [osx and x86_64]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-darwin-arm64.tar.gz # [arm64]
md5: bfeabe3b04d97ed85bd2198c8033cc08 # [arm64]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-linux-386.tar.gz # [linux32]
md5: 4fc93d4a970372b9bae3da5834b499fa # [linux32]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-linux-amd64.tar.gz # [linux64]
md5: 97d347f857b8755e5becb1df7815d825 # [linux64]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-linux-arm.tar.gz # [linux and (armv7l or arm6l)]
md5: 1cf087eb3a0abe1bf9477552f2084351 # [linux and (armv7l or arm6l)]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-linux-arm64.tar.gz # [aarch64]
md5: c2fcf9feb193d7456ffeab6f6c58991e # [aarch64]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-windows-386.zip # [win32]
md5: 861a56677b750a6a59617da92f9d9025 # [win32]
url: {{ release_url }}/download/v{{ version }}/gocmd-v{{ version }}-windows-amd64.zip # [win64]
md5: bec4e699ab1233f3fdba323e84678a97 # [win64]

build:
number: 0
overlinking_ignore_patterns:
- "bin/*"
# Our package contains only a single binary already compiled
binary_relocation: False

test:
commands:
# We don't want to run tests when the target platform is not the same as the build platform
# because gocmd is a binary that can run on a specific platform
- gocmd --version # [build_platform == target_platform and not win64 and not win32]
- gocmd.exe --version # [build_platform == target_platform and (win64 or win32)]

about:
home: {{ git_repo }}
summary: 'A protable command-line toolkit for iRODS'
description: |
gocommands is a portable command-line toolkit for iRODS data management service.
It can run on any systems, including linux, osx, and windows. As it is written in
pure Go language, it has no dependencies.
license: BSD-3-Clause
license_family: BSD
license_file: LICENSE

extra:
recipe-maintainers:
# GitHub IDs for maintainers of the recipe.
- iychoi

0 comments on commit 1f32d64

Please sign in to comment.