summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore5
-rw-r--r--.nvchecker.toml5
-rw-r--r--PKGBUILD70
4 files changed, 71 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 14952767eef1..b52d9e250039 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = azcopy
pkgdesc = A command-line utility designed for copying data to/from Microsoft Azure
- pkgver = 10.2.1
+ pkgver = 10.24.0
pkgrel = 1
- url = https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy
+ url = https://github.com/Azure/azure-storage-azcopy
arch = x86_64
arch = i686
arch = arm
@@ -11,10 +11,8 @@ pkgbase = azcopy
arch = aarch64
license = MIT
makedepends = go
- makedepends = dep
- makedepends = git
- source = azcopy-10.2.1.tar.gz::https://github.com/Azure/azure-storage-azcopy/archive/v10.2.1.tar.gz
- sha512sums = dff5f745f457cc8b3756de00ac4bfef28412596b8dea6a2d691e6bfed48b533f80f1b843188b8aa687e4748107dc4dce2cef07d5e434c7ed72f0cd98bafb5a79
+ depends = glibc
+ source = azcopy-10.24.0.tar.gz::https://github.com/Azure/azure-storage-azcopy/archive/v10.24.0.tar.gz
+ sha256sums = bbb09bee00207eb6e6e80a3ecf58ac39beb956c94f500b62888ed3404580430d
pkgname = azcopy
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0df2b70016b9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!.nvchecker.toml
+!.SRCINFO
+!PKGBUILD
diff --git a/.nvchecker.toml b/.nvchecker.toml
new file mode 100644
index 000000000000..7445fbdb5141
--- /dev/null
+++ b/.nvchecker.toml
@@ -0,0 +1,5 @@
+[azcopy]
+source = "github"
+github = "Azure/azure-storage-azcopy"
+prefix = "v"
+use_latest_release = true
diff --git a/PKGBUILD b/PKGBUILD
index 901492614109..b5f763a37e5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,71 @@
+# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Maintainer: Xuanrui Qi <me@xuanruiqi.com>
-# Contributor: Fabio 'Lolix' Loli <lolix@disroot.org>
+# Maintainer: Fabio 'Lolix' Loli <lolix@disroot.org>
+# Maintainer: Jens Heremans <jensheremans[at]gmail[dot]com>
# Contributor: Jonas Heinrich <onny@project-insanity.org>
pkgname=azcopy
-pkgver=10.2.1
+_pkgname=azure-storage-azcopy
+pkgver=10.24.0
pkgrel=1
pkgdesc="A command-line utility designed for copying data to/from Microsoft Azure"
-arch=(x86_64 i686 arm armv6h armv7h aarch64)
-url="https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy"
-license=(MIT)
-makedepends=(go dep git)
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Azure/azure-storage-azcopy/archive/v${pkgver}.tar.gz")
-sha512sums=('dff5f745f457cc8b3756de00ac4bfef28412596b8dea6a2d691e6bfed48b533f80f1b843188b8aa687e4748107dc4dce2cef07d5e434c7ed72f0cd98bafb5a79')
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/Azure/azure-storage-azcopy"
+license=('MIT')
+depends=('glibc')
+makedepends=('go')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('bbb09bee00207eb6e6e80a3ecf58ac39beb956c94f500b62888ed3404580430d')
+
+_archive="$_pkgname-$pkgver"
prepare() {
- mkdir -p "${srcdir}/src/github.com/Azure"
- mv "${srcdir}/azure-storage-azcopy-${pkgver}" "${srcdir}/src/github.com/Azure/azure-storage-azcopy"
+ cd "$_archive"
+
+ go mod download -x
}
build() {
- cd "${srcdir}/src/github.com/Azure/azure-storage-azcopy"
- go build -buildmode=pie
+ cd "$_archive"
+
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ go build -v -buildvcs=false -o azcopy
+
+ # Completions
+ ./azcopy completion bash > azcopy.bash
+ ./azcopy completion fish > azcopy.fish
+ ./azcopy completion zsh > azcopy.zsh
+}
+
+check() {
+ cd "$_archive"
+
+ # Skip failing tests - not sure why they fail.
+ local unit_tests=$(
+ go list ./... \
+ | grep -v 'github.com/Azure/azure-storage-azcopy/v10/cmd' \
+ | grep -v 'github.com/Azure/azure-storage-azcopy/v10/common' \
+ | grep -v 'github.com/Azure/azure-storage-azcopy/v10/e2etest' \
+ | grep -v 'github.com/Azure/azure-storage-azcopy/v10/ste' \
+ | sort
+ )
+ # shellcheck disable=SC2086
+ go test $unit_tests
}
package() {
- install -Dm755 "${srcdir}/src/github.com/Azure/azure-storage-azcopy/azure-storage-azcopy" "${pkgdir}/usr/bin/azcopy"
- install -Dm644 "${srcdir}/src/github.com/Azure/azure-storage-azcopy/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
+ cd "$_archive"
+
+ install -Dm755 azcopy "$pkgdir/usr/bin/azcopy"
+
+ install -Dm644 azcopy.bash "$pkgdir/usr/share/bash-completion/completions/azcopy"
+ install -Dm644 azcopy.fish "$pkgdir/usr/share/fish/vendor_completions.d/azcopy.fish"
+ install -Dm644 azcopy.zsh "$pkgdir/usr/share/zsh/site-functions/_azcopy"
+
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}