diff options
author | Peter Cai | 2017-03-05 11:24:45 +0800 |
---|---|---|
committer | Peter Cai | 2017-03-05 11:24:45 +0800 |
commit | ff4d39681e7f510c75ee6d4683140c559f2cb3c1 (patch) | |
tree | 559e025586e5af92f5267ccfbde9a309af631d2f /PKGBUILD | |
download | aur-ff4d39681e7f510c75ee6d4683140c559f2cb3c1.tar.gz |
initial
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..26895d4b5357 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Peter Cai <peter at typeblog dot net> + +pkgname=yarmd +pkgver=1.0.0 +pkgrel=1 +pkgdesc='Yet Another Recursive Multi-thread Downloader (A wrapper script around aria2, Nginx autoindex required)' +arch=('any') +url='https://github.com/PeterCxy/yarmd' +license=('WTFPL') +depends=( + 'nodejs' + 'aria2' +) +makedepends=( + 'npm' +) + +source=( + "https://github.com/PeterCxy/yarmd/archive/${pkgver}.tar.gz" +) +md5sums=('e01a60c1f53edd81cf50b6e55e146078') + +build() { + cd "$srcdir/$pkgname-$pkgver" + npm install --developement && npm run build + rm -rf node_modules +} + +package() { + local _npmdir="$pkgdir/usr/lib/node_modules" + mkdir -p "$_npmdir" + cp -R "$srcdir/$pkgname-$pkgver" "$_npmdir/yarmd" + cd "$_npmdir/yarmd" && npm install --production && rm -rf node_modules/.bin + local _bindir="$pkgdir/usr/bin" + mkdir -p "$_bindir" + ln -s /usr/lib/node_modules/yarmd/bin/yarmd "$_bindir/yarmd" +} + |