Skip to content

Commit

Permalink
Add PKGBUILD for Arch Linux users
Browse files Browse the repository at this point in the history
  • Loading branch information
scotow committed Aug 1, 2019
1 parent f739411 commit 51b0725
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Maintainer: Benjamin Lopez <[email protected]>

pkgname=mego
pkgver=1.0.3
pkgrel=1
pkgdesc="A simple megadl wrapper with auto-retry and download list"
arch=('x86_64')
url="https://github.com/scotow/${pkgname}"
license=('MIT')
depends=('megatools')
makedepends=('go' 'git')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/scotow/${pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('7b952705c25e06c25f82c2c76c20c34e45b2487e4af1ff7bf39ae22daeed8407')

prepare(){
mkdir -p src/github.com/scotow
ln -rTsf "${pkgname}-${pkgver}" "src/github.com/scotow/${pkgname}"
}

build(){
export GOPATH="${srcdir}"
cd "src/github.com/scotow/${pkgname}"
go install \
-gcflags "all=-trimpath=${GOPATH}/src" \
-asmflags "all=-trimpath=${GOPATH}/src" \
-ldflags "-extldflags ${LDFLAGS}" \
./...
}

package(){
install -Dm755 "bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"

cd "${pkgname}-${pkgver}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

0 comments on commit 51b0725

Please sign in to comment.