From 937108dba8830c9683be9d405415a51b6a925f4b Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Fri, 22 Sep 2023 01:20:00 +0300 Subject: [PATCH] Arch PKGBUILD Signed-off-by: HeshamTB --- PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..7aad483 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Hesham T. Banafa +pkgname=yt-mdl +pkgver=0.1 +pkgrel=1 +pkgdesc="Concurrent yt-dlp downloads" +arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'riscv64') +url="https://github.com/HeshamTB/yt-mdl" +options=(!lto) +license=('GPL3') +depends=( + 'yt-dlp' +) + +makedepends=('go>=1.19') + +source=("yt-mdl::git+https://github.com/HeshamTB/yt-mdl") +sha256sums=("SKIP") + +build() { + export GOPATH="$srcdir"/gopath + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_ENABLED=1 + + cd "$srcdir/$pkgname" + go mod tidy + go build yt-mdl.go downloader.go +} + +package() { + cd "${srcdir}/yt-mdl" + GOBIN="${pkgdir}/usr/bin/" go install +} +