[arch-commits] Commit in modclean/repos (community-any community-any/PKGBUILD)

Nicola Squartini tensor5 at archlinux.org
Tue Jan 8 21:15:56 UTC 2019


    Date: Tuesday, January 8, 2019 @ 21:15:55
  Author: tensor5
Revision: 421058

archrelease: copy trunk to community-any

Added:
  modclean/repos/community-any/
  modclean/repos/community-any/PKGBUILD
    (from rev 421057, modclean/trunk/PKGBUILD)

----------+
 PKGBUILD |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Copied: modclean/repos/community-any/PKGBUILD (from rev 421057, modclean/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2019-01-08 21:15:55 UTC (rev 421058)
@@ -0,0 +1,25 @@
+# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+
+pkgname=modclean
+pkgver=3.0.0beta.1
+pkgrel=1
+pkgdesc='Remove unwanted files and directories from your node_modules folder'
+arch=('any')
+url='https://github.com/ModClean/modclean'
+license=('MIT')
+depends=('nodejs')
+makedepends=('npm')
+options=(!emptydirs)
+
+package() {
+    npm install -g --prefix="${pkgdir}/usr" ${pkgname}@3.0.0-beta.1
+
+    cd "${pkgdir}/usr/lib/node_modules/${pkgname}"
+    install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
+    ln -s \
+        $(realpath --relative-to="${pkgdir}/usr/share/licenses/${pkgname}" LICENSE) \
+        "${pkgdir}/usr/share/licenses/${pkgname}"
+    sed -e "s|${srcdir}|/|" -i package.json
+    find node_modules -name 'package.json' -exec sed -e "s|${pkgdir}||" -i {} \;
+    ./bin/modclean.js -r -a '.bin,bin.js' --ignore='license'
+}


More information about the arch-commits mailing list