Skip to content

Commit 51b0725

Browse files
committed
Add PKGBUILD for Arch Linux users
1 parent f739411 commit 51b0725

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

PKGBUILD

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Maintainer: Benjamin Lopez <contact@scotow.com>
2+
3+
pkgname=mego
4+
pkgver=1.0.3
5+
pkgrel=1
6+
pkgdesc="A simple megadl wrapper with auto-retry and download list"
7+
arch=('x86_64')
8+
url="https://github.com/scotow/${pkgname}"
9+
license=('MIT')
10+
depends=('megatools')
11+
makedepends=('go' 'git')
12+
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/scotow/${pkgname}/archive/${pkgver}.tar.gz")
13+
sha256sums=('7b952705c25e06c25f82c2c76c20c34e45b2487e4af1ff7bf39ae22daeed8407')
14+
15+
prepare(){
16+
mkdir -p src/github.com/scotow
17+
ln -rTsf "${pkgname}-${pkgver}" "src/github.com/scotow/${pkgname}"
18+
}
19+
20+
build(){
21+
export GOPATH="${srcdir}"
22+
cd "src/github.com/scotow/${pkgname}"
23+
go install \
24+
-gcflags "all=-trimpath=${GOPATH}/src" \
25+
-asmflags "all=-trimpath=${GOPATH}/src" \
26+
-ldflags "-extldflags ${LDFLAGS}" \
27+
./...
28+
}
29+
30+
package(){
31+
install -Dm755 "bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
32+
33+
cd "${pkgname}-${pkgver}"
34+
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
35+
}

0 commit comments

Comments
 (0)