summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorC.T Liu2021-11-23 16:20:17 +0000
committerC.T Liu2021-11-23 16:20:17 +0000
commitbcde49c84c1b3ba47e112ceba2ee81ccb48c8ab0 (patch)
tree35250e55144c2c962523f72ab10374cbc2e4d081
parentd53127ecc610a86b9f069bbc941d345680f1837a (diff)
downloadaur-bcde49c84c1b3ba47e112ceba2ee81ccb48c8ab0.tar.gz
updpkg
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD68
2 files changed, 50 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 99b52e8a7b42..a8cafb0f8a82 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = reveal-md
pkgdesc = Get beautiful reveal.js presentations from your Markdown file
- pkgver = 5.1.2
+ pkgver = 5.2.0
pkgrel = 1
- url = http://webpro.github.io/reveal-md/
+ url = https://webpro.github.io/reveal-md/
arch = any
license = MIT
makedepends = yarn
+ makedepends = git
depends = nodejs
- options = !strip
- source = reveal-md-5.1.2.tar.gz::https://github.com/webpro/reveal-md/archive/5.1.2.tar.gz
- sha256sums = e46afc31246b722012d7a7ca4b974463098e85faa1b09c850a80882fbb22effd
+ source = git+https://github.com/webpro/reveal-md.git#tag=5.2.0
+ sha256sums = SKIP
pkgname = reveal-md
diff --git a/PKGBUILD b/PKGBUILD
index 0e20679e812b..5a463259e589 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,57 @@
pkgname=reveal-md
-pkgver=5.1.2
+pkgver=5.2.0
pkgrel=1
pkgdesc='Get beautiful reveal.js presentations from your Markdown file'
arch=('any')
-url='http://webpro.github.io/reveal-md/'
+url='https://webpro.github.io/reveal-md/'
license=('MIT')
-depends=('nodejs')
-makedepends=('yarn')
-options=('!strip')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/webpro/$pkgname/archive/$pkgver.tar.gz")
-sha256sums=('e46afc31246b722012d7a7ca4b974463098e85faa1b09c850a80882fbb22effd')
-
-build() {
- cd $srcdir/$pkgname-$pkgver
- yarn install --prod --cache-dir=$srcdir/cache --link-dir=$srcdir/link --ignore-optional
- yarn autoclean --init
- yarn autoclean --force --non-interactive
- find . -type f -depth \( -iname 'license' -o -iname 'readme*' \) -execdir rm -rfv {} \;
- find . -type d -name ".bin" -exec rm -rfv {} +
- rm -rf .yarnclean
- rm -rf *lock*
+depends=(nodejs)
+makedepends=(yarn git)
+source=(git+https://github.com/webpro/$pkgname.git#tag=$pkgver)
+sha256sums=('SKIP')
+
+prepare() {
+ cd $srcdir/$pkgname
+ sed 's,"puppeteer": "1.19.0","puppeteer-core": "latest",' -i package.json
+}
+
+build() {
+ cd $srcdir/$pkgname
+ rm -rf package-lock.json
+ yarn install \
+ --cache-folder $srcdir/cache \
+ --link-folder $srcdir/link
+
+ # Aggressively remove binary and addins in node_modules
+ yarn autoclean -I
+ yarn autoclean -F
+ find . -name "\.bin" -exec rm -rfv {} +
+ find . -name "\.git*" -exec rm -rfv {} +
+ find . -name "\.eslintrc*" -exec rm -rfv {} +
+ find . -name "\.editorconfig" -exec rm -rfv {} +
+ find . -name "\.npm*" -exec rm -rfv {} +
+ find . -name "\.yarn*" -exec rm -rfv {} +
+ find . -name "\.travis.yml" -exec rm -rfv {} +
+ find . -name "\.tonic_example.js" -exec rm -rfv {} +
+ find . -name "\.prettierrc.js" -exec rm -rfv {} +
+ find . -name "\.coveralls.yml" -exec rm -rfv {} +
+ find . -name "\.js*" -exec rm -rfv {} +
+ find . -name "\.babelrc.js" -exec rm -rfv {} +
+ find . -name "\.vscode" -exec rm -rfv {} +
+ find . -name "\.DS_Store" -exec rm -rfv {} +
+ find . -name "yarn.lock" -exec rm -rfv {} +
+
}
package() {
- local _npmdir="$pkgdir/usr/lib/$pkgname/"
- install -dm755 $_npmdir
- cd $_npmdir
- cp -r --no-preserve=ownership --preserve=mode $srcdir/$pkgname-$pkgver/* ./
+ local _destdir="/usr/lib/node_modules/$pkgname"
+
+ install -dm755 $pkgdir/$_destdir
+ cp -a $srcdir/$pkgname/* $pkgdir/$_destdir/
+
+ install -dm755 $pkgdir/usr/bin
install -Dm755 /dev/stdin $pkgdir/usr/bin/$pkgname <<END
-#!/bin/env sh
-node /usr/lib/$pkgname/bin/$pkgname.js "\$@"
+NODE_ENV=production node $_destdir/bin/$pkgname.js
END
}