diff options
author | liolok | 2021-06-22 01:48:41 +0800 |
---|---|---|
committer | liolok | 2021-06-22 01:48:41 +0800 |
commit | acb0781aa226c91b3bf52162699793c42c2fcbd9 (patch) | |
tree | cd1d81867640560801e54ee7b8cab224dbf174fd | |
parent | 0f583cd9a7406132ca4126a29d8d3f3c05e7a432 (diff) | |
download | aur-acb0781aa226c91b3bf52162699793c42c2fcbd9.tar.gz |
try to do dependencies right
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | newbie-hint.install | 6 |
3 files changed, 32 insertions, 14 deletions
@@ -1,13 +1,18 @@ pkgbase = hexo-cli pkgdesc = Command line interface for Hexo pkgver = 4.3.0 - pkgrel = 5 + pkgrel = 6 url = https://www.npmjs.com/package/hexo-cli + install = newbie-hint.install arch = any license = MIT + makedepends = npm depends = nodejs - depends = npm - depends = git + optdepends = git: initialize and deploy websites + optdepends = npm: initialize websites, install plugins + optdepends = pnpm: npm alternative + optdepends = yarn: npm alternative + optdepends = rsync: deploy websites conflicts = nodejs-hexo conflicts = nodejs-hexo-cli replaces = nodejs-hexo-cli @@ -3,28 +3,35 @@ pkgname=hexo-cli pkgver=4.3.0 -pkgrel=5 +pkgrel=6 pkgdesc="Command line interface for Hexo" arch=('any') url="https://www.npmjs.com/package/$pkgname" license=('MIT') -depends=('nodejs' 'npm' 'git') +depends=('nodejs') +makedepends=('npm') +optdepends=('git: initialize and deploy websites' + 'npm: initialize websites, install plugins' + 'pnpm: npm alternative' + 'yarn: npm alternative' + 'rsync: deploy websites') conflicts=('nodejs-hexo' 'nodejs-hexo-cli') replaces=('nodejs-hexo-cli') +install=newbie-hint.install source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz) noextract=($pkgname-$pkgver.tgz) sha256sums=('933c8495faa4393cf9cf2e120e49e33495820605b75738813918a086605ca20d') package() { - npm install --global "$srcdir/$pkgname-$pkgver.tgz" \ - --prefix "$pkgdir/usr" \ - --cache "$srcdir/npm-cache" + npm install --global "$srcdir/$pkgname-$pkgver.tgz" \ + --prefix "$pkgdir/usr" \ + --cache "$srcdir/npm-cache" - # Non-deterministic race in npm gives 777 permissions to random directories. - # See https://github.com/npm/cli/issues/1103 for details. - find "${pkgdir}/usr" -type d -exec chmod 755 {} + + # Non-deterministic race in npm gives 777 permissions to random directories. + # See https://github.com/npm/cli/issues/1103 for details. + find "${pkgdir}/usr" -type d -exec chmod 755 {} + - # npm gives ownership of ALL FILES to build user - # https://bugs.archlinux.org/task/63396 - chown --recursive root:root "${pkgdir}" + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown --recursive root:root "${pkgdir}" } diff --git a/newbie-hint.install b/newbie-hint.install new file mode 100644 index 000000000000..f23e7342f6ae --- /dev/null +++ b/newbie-hint.install @@ -0,0 +1,6 @@ +post_install() { + B='\e[42m' # background green + F='\e[32m' # foreground green + E='\e[0m' # end color + echo -e ${B}NEWBIE HINT${E}: If new to Hexo, consider starting with ${F}git${E} and ${F}npm${E}. +} |