diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 33 |
3 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..fa89a1db773f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = cdndrive-go + pkgdesc = BiliDrive-compatible multi source downloader + pkgver = 0.9 + pkgrel = 1 + url = https://github.com/arm64v8a/CDNDrive-go + arch = x86_64 + license = MIT + makedepends = go + source = https://github.com/arm64v8a/CDNDrive-go/archive/v0.9.tar.gz + sha256sums = 360fe6c4a9ed06a17b2349770dcf9a342f4904747b34c965f33f14d4bf802f06 + +pkgname = cdndrive-go diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..48cf588794a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +pkg +src +*.tar.zst +*.tar.zst.sig +*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..80afa1a2a9d2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: mochaaP <aur@mochaa.ws> + +_pkgname=CDNDrive-go # fix uppercase issue +pkgname=cdndrive-go +pkgver=0.9 +pkgrel=1 +pkgdesc='BiliDrive-compatible multi source downloader' +arch=($CARCH) +url="https://github.com/arm64v8a/CDNDrive-go" +license=('MIT') +makedepends=('go') +source=("$url/archive/v$pkgver.tar.gz") +sha256sums=('360fe6c4a9ed06a17b2349770dcf9a342f4904747b34c965f33f14d4bf802f06') + +prepare(){ + cd "$_pkgname-$pkgver" + mkdir -p build/ +} + +build() { + cd "$_pkgname-$pkgver" + 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 -o build ./... +} + +package() { + cd "$_pkgname-$pkgver" + install -Dm755 build/CDNDrive "$pkgdir"/usr/bin/$pkgname +} |