diff options
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" +} + |