summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorliolok2021-06-22 01:48:41 +0800
committerliolok2021-06-22 01:48:41 +0800
commitacb0781aa226c91b3bf52162699793c42c2fcbd9 (patch)
treecd1d81867640560801e54ee7b8cab224dbf174fd
parent0f583cd9a7406132ca4126a29d8d3f3c05e7a432 (diff)
downloadaur-acb0781aa226c91b3bf52162699793c42c2fcbd9.tar.gz
try to do dependencies right
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD29
-rw-r--r--newbie-hint.install6
3 files changed, 32 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ed7f5bbecb11..344947945312 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index e321baf64c74..04d7fecb63e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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}.
+}