Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 1 | HOMEPAGE = "https://github.com/minio/mc" |
| 2 | SUMMARY = "MinIO Client is a replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage." |
| 3 | DESCRIPTION = "MinIO Client (mc) provides a modern alternative to \ |
| 4 | UNIX commands like ls, cat, cp, mirror, diff, find \ |
| 5 | etc. It supports filesystems and Amazon S3 compatible \ |
| 6 | cloud storage service (AWS Signature v2 and v4). \ |
| 7 | " |
| 8 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 9 | SRC_URI = "git://github.com/minio/mc;branch=master;name=mc;protocol=https \ |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 10 | file://modules.txt \ |
| 11 | " |
| 12 | |
| 13 | include src_uri.inc |
| 14 | |
| 15 | SRCREV_mc = "01b87ecc02ffad47dfe13c2154ac31db3e3115df" |
| 16 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 17 | SRCREV_FORMAT .= "_mc" |
| 18 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 19 | GO_IMPORT = "import" |
| 20 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 21 | LICENSE = "AGPL-3.0-only" |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 22 | LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=eb1e647870add0502f8f010b19de32af" |
| 23 | |
| 24 | PV = "${SRCREV_mc}" |
| 25 | |
| 26 | inherit go |
| 27 | inherit goarch |
| 28 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 29 | # | ./github.com/minio/mc/main.go:27:(.text+0xd258b8): relocation R_MIPS_HI16 against `a local symbol' cannot be used when making a shared object; recompile with -fPIC |
| 30 | COMPATIBLE_HOST:mips = "null" |
Patrick Williams | b542dec | 2023-06-09 01:26:37 -0500 | [diff] [blame] | 31 | # ERROR: QA Issue: minio: ELF binary /usr/sbin/mc has relocations in .text [textrel] |
| 32 | # Needs fixing with go >= 1.20.4" |
| 33 | EXCLUDE_FROM_WORLD = "1" |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 34 | |
| 35 | DEPENDS += "rsync-native" |
| 36 | |
| 37 | do_compile() { |
| 38 | |
| 39 | cd ${S}/src/${GO_IMPORT} |
| 40 | |
| 41 | export GOFLAGS="-mod=vendor" |
| 42 | export GOPATH="$GOPATH:${S}/src/import/.gopath:${S}/src/import/vendor" |
| 43 | sites="github.com/charmbracelet/bubbletea:github.com/charmbracelet/bubbletea \ |
| 44 | github.com/cheggaaa/pb:github.com/cheggaaa/pb \ |
| 45 | github.com/dustin/go-humanize:github.com/dustin/go-humanize \ |
| 46 | github.com/fatih/color:github.com/fatih/color \ |
| 47 | github.com/go-ole/go-ole:github.com/go-ole/go-ole \ |
| 48 | github.com/goccy/go-json:github.com/goccy/go-json \ |
| 49 | github.com/google/shlex:github.com/google/shlex \ |
| 50 | github.com/google/uuid:github.com/google/uuid \ |
| 51 | github.com/inconshreveable/mousetrap:github.com/inconshreveable/mousetrap \ |
| 52 | github.com/json-iterator/go:github.com/json-iterator/go \ |
| 53 | github.com/klauspost/compress:github.com/klauspost/compress \ |
| 54 | github.com/mattn/go-ieproxy:github.com/mattn/go-ieproxy \ |
| 55 | github.com/mattn/go-isatty:github.com/mattn/go-isatty \ |
| 56 | github.com/minio/cli:github.com/minio/cli \ |
| 57 | github.com/minio/colorjson:github.com/minio/colorjson \ |
| 58 | github.com/minio/filepath:github.com/minio/filepath \ |
| 59 | github.com/minio/madmin-go:github.com/minio/madmin-go \ |
| 60 | github.com/minio/md5-simd:github.com/minio/md5-simd \ |
| 61 | github.com/minio/minio-go/v7:github.com/minio/minio-go/v7 \ |
| 62 | github.com/minio/pkg:github.com/minio/pkg \ |
| 63 | github.com/minio/selfupdate:github.com/minio/selfupdate \ |
| 64 | github.com/minio/sha256-simd:github.com/minio/sha256-simd \ |
| 65 | github.com/mitchellh/go-homedir:github.com/mitchellh/go-homedir \ |
| 66 | github.com/pkg/xattr:github.com/pkg/xattr \ |
| 67 | github.com/posener/complete:github.com/posener/complete \ |
| 68 | github.com/prometheus/client_golang:github.com/prometheus/client_golang \ |
| 69 | github.com/prometheus/prom2json:github.com/prometheus/prom2json \ |
| 70 | github.com/rjeczalik/notify:github.com/rjeczalik/notify \ |
| 71 | github.com/rs/xid:github.com/rs/xid \ |
| 72 | github.com/secure-io/sio-go:github.com/secure-io/sio-go \ |
| 73 | github.com/shirou/gopsutil/v3:github.com/shirou/gopsutil/v3 \ |
| 74 | github.com/tidwall/gjson:github.com/tidwall/gjson \ |
| 75 | golang.org/x/crypto:go.googlesource.com/crypto \ |
| 76 | golang.org/x/net:go.googlesource.com/net \ |
| 77 | golang.org/x/text:go.googlesource.com/text \ |
| 78 | gopkg.in/check.v1:gopkg.in/check.v1 \ |
| 79 | gopkg.in/h2non/filetype.v1:gopkg.in/h2non/filetype.v1 \ |
| 80 | gopkg.in/yaml.v2:gopkg.in/yaml.v2 \ |
| 81 | github.com/charmbracelet/bubbles:github.com/charmbracelet/bubbles \ |
| 82 | github.com/charmbracelet/lipgloss:github.com/charmbracelet/lipgloss \ |
| 83 | github.com/gdamore/tcell/v2:github.com/gdamore/tcell/v2 \ |
| 84 | github.com/golang-jwt/jwt/v4:github.com/golang-jwt/jwt/v4 \ |
| 85 | github.com/navidys/tvxwidgets:github.com/navidys/tvxwidgets \ |
| 86 | github.com/olekukonko/tablewriter:github.com/olekukonko/tablewriter \ |
| 87 | github.com/prometheus/client_model:github.com/prometheus/client_model \ |
| 88 | github.com/rivo/tview:github.com/rivo/tview \ |
| 89 | github.com/tinylib/msgp:github.com/tinylib/msgp \ |
| 90 | golang.org/x/term:go.googlesource.com/term \ |
| 91 | github.com/beorn7/perks:github.com/beorn7/perks \ |
| 92 | github.com/cespare/xxhash/v2:github.com/cespare/xxhash/v2 \ |
| 93 | github.com/containerd/console:github.com/containerd/console \ |
| 94 | github.com/coreos/go-semver:github.com/coreos/go-semver \ |
| 95 | github.com/coreos/go-systemd/v22:github.com/coreos/go-systemd/v22 \ |
| 96 | github.com/decred/dcrd/dcrec/secp256k1/v4:github.com/decred/dcrd/dcrec/secp256k1/v4//dcrec/secp256k1 \ |
| 97 | github.com/fatih/structs:github.com/fatih/structs \ |
| 98 | github.com/gdamore/encoding:github.com/gdamore/encoding \ |
| 99 | github.com/gogo/protobuf:github.com/gogo/protobuf \ |
| 100 | github.com/golang/protobuf:github.com/golang/protobuf \ |
| 101 | github.com/hashicorp/errwrap:github.com/hashicorp/errwrap \ |
| 102 | github.com/hashicorp/go-multierror:github.com/hashicorp/go-multierror \ |
| 103 | github.com/klauspost/cpuid/v2:github.com/klauspost/cpuid/v2 \ |
| 104 | github.com/kr/text:github.com/kr/text \ |
| 105 | github.com/lestrrat-go/backoff/v2:github.com/lestrrat-go/backoff/v2 \ |
| 106 | github.com/lestrrat-go/blackmagic:github.com/lestrrat-go/blackmagic \ |
| 107 | github.com/lestrrat-go/httpcc:github.com/lestrrat-go/httpcc \ |
| 108 | github.com/lestrrat-go/iter:github.com/lestrrat-go/iter \ |
| 109 | github.com/lestrrat-go/jwx:github.com/lestrrat-go/jwx \ |
| 110 | github.com/lestrrat-go/option:github.com/lestrrat-go/option \ |
| 111 | github.com/lucasb-eyer/go-colorful:github.com/lucasb-eyer/go-colorful \ |
| 112 | github.com/lufia/plan9stats:github.com/lufia/plan9stats \ |
| 113 | github.com/mattn/go-colorable:github.com/mattn/go-colorable \ |
| 114 | github.com/mattn/go-runewidth:github.com/mattn/go-runewidth \ |
| 115 | github.com/matttproud/golang_protobuf_extensions:github.com/matttproud/golang_protobuf_extensions \ |
| 116 | github.com/modern-go/concurrent:github.com/modern-go/concurrent \ |
| 117 | github.com/modern-go/reflect2:github.com/modern-go/reflect2 \ |
| 118 | github.com/muesli/ansi:github.com/muesli/ansi \ |
| 119 | github.com/muesli/reflow:github.com/muesli/reflow \ |
| 120 | github.com/muesli/termenv:github.com/muesli/termenv \ |
| 121 | github.com/niemeyer/pretty:github.com/niemeyer/pretty \ |
| 122 | github.com/philhofer/fwd:github.com/philhofer/fwd \ |
| 123 | github.com/pkg/errors:github.com/pkg/errors \ |
| 124 | github.com/power-devops/perfstat:github.com/power-devops/perfstat \ |
| 125 | github.com/prometheus/common:github.com/prometheus/common \ |
| 126 | github.com/prometheus/procfs:github.com/prometheus/procfs \ |
| 127 | github.com/rivo/uniseg:github.com/rivo/uniseg \ |
| 128 | github.com/sirupsen/logrus:github.com/sirupsen/logrus \ |
| 129 | github.com/tidwall/match:github.com/tidwall/match \ |
| 130 | github.com/tidwall/pretty:github.com/tidwall/pretty \ |
| 131 | github.com/tklauser/go-sysconf:github.com/tklauser/go-sysconf \ |
| 132 | github.com/tklauser/numcpus:github.com/tklauser/numcpus \ |
| 133 | github.com/yusufpapurcu/wmi:github.com/yusufpapurcu/wmi \ |
| 134 | go.etcd.io/etcd/api/v3:github.com/etcd-io/etcd/api/v3//api \ |
| 135 | go.etcd.io/etcd/client/pkg/v3:github.com/etcd-io/etcd/api/v3//client/pkg \ |
| 136 | go.etcd.io/etcd/client/v3:github.com/etcd-io/etcd/api/v3//client/v3 \ |
| 137 | go.uber.org/atomic:go.uber.org/atomic \ |
| 138 | go.uber.org/multierr:go.uber.org/multierr \ |
| 139 | go.uber.org/zap:go.uber.org/zap \ |
| 140 | golang.org/x/sync:go.googlesource.com/sync \ |
| 141 | golang.org/x/sys:go.googlesource.com/sys \ |
| 142 | google.golang.org/genproto:google.golang.org/genproto \ |
| 143 | google.golang.org/grpc:google.golang.org/grpc \ |
| 144 | google.golang.org/protobuf:google.golang.org/protobuf \ |
| 145 | gopkg.in/ini.v1:gopkg.in/ini.v1 \ |
| 146 | gopkg.in/yaml.v3:gopkg.in/yaml.v3" |
| 147 | for s in $sites; do |
| 148 | site_dest=$(echo $s | cut -d: -f1) |
| 149 | site_source=$(echo $s | cut -d: -f2) |
| 150 | mkdir -p vendor.copy/$site_dest |
| 151 | [ -n "$(ls -A vendor.copy/$site_dest/*.go 2> /dev/null)" ] && { echo "[INFO] vendor.fetch/$site_source -> $site_dest: go copy skipped (files present)" ; true ; } || { echo "[INFO] $site_dest: copying .go files" ; rsync -a --exclude='vendor/' --exclude='.git/' vendor.fetch/$site_source/ vendor.copy/$site_dest ; } |
| 152 | done |
| 153 | |
| 154 | ln -sf vendor.copy vendor |
| 155 | # these are bad symlinks, go validates them and breaks the build if they are present |
| 156 | rm -f vendor/go.etcd.io/etcd/client/v3/example_* |
| 157 | |
| 158 | cp ${WORKDIR}/modules.txt vendor/ |
| 159 | |
| 160 | ${GO} build -trimpath |
| 161 | } |
| 162 | |
| 163 | do_install() { |
| 164 | install -d ${D}/${sbindir} |
| 165 | install ${S}/src/${GO_IMPORT}/mc ${D}/${sbindir}/mc |
| 166 | } |