summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 71989a26f77e163d2838f87b0d771ac25bdef0ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Drew Nutter <dnut@users.noreply.github.com>
# Contributor: Dmitri Goutnik <dg@syrec.org>

pkgname=pget
pkgver=0.2.1
pkgrel=1
pkgdesc="Fast, resumable, and parallel file download client, written in go."
arch=(i686 x86_64 i386 arm arm64 armv6 aarch64)
url="https://github.com/Code-Hex/${pkgname}"
license=('GPL3')
depends=('glibc')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Code-Hex/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=(fa7646bec975dd3995fb45d6b1f190565d6c4fae03c46c4eda34716c83ede03e)

prepare() {
    mkdir -p "${srcdir}/src/github.com/Code-Hex/"
    mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/src/github.com/Code-Hex/${pkgname}"
}

build() {
    cd "${srcdir}/src/github.com/Code-Hex/${pkgname}"
    export GOPATH="${srcdir}"
    go get -d ./cmd/${pkgname}
    go build ./cmd/${pkgname}
}

package() {
    cd "${srcdir}/src/github.com/Code-Hex/${pkgname}"
    install -Dm755 pget "${pkgdir}/usr/bin/${pkgname}"
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}