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

Nicola Squartini tensor5 at archlinux.org
Sat Aug 13 03:18:17 UTC 2016


    Date: Saturday, August 13, 2016 @ 03:18:17
  Author: tensor5
Revision: 186688

archrelease: copy trunk to community-any

Added:
  asar/repos/community-any/
  asar/repos/community-any/PKGBUILD
    (from rev 186687, asar/trunk/PKGBUILD)

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

Copied: asar/repos/community-any/PKGBUILD (from rev 186687, asar/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2016-08-13 03:18:17 UTC (rev 186688)
@@ -0,0 +1,66 @@
+# $Id$
+# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+
+pkgname=asar
+pkgver=0.12.1
+pkgrel=1
+pkgdesc='Creating atom-shell app packages'
+arch=('any')
+url='https://github.com/electron/asar'
+license=('MIT')
+depends=('nodejs')
+makedepends=('coffee-script' 'npm')
+options=(!emptydirs)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/electron/asar/archive/v${pkgver}.tar.gz")
+sha256sums=('4aba846709dd3eeef47857425191ebe8952a1888e9546024b6ddcaff9e12e2dc')
+
+prepare() {
+    cd ${pkgname}-${pkgver}
+
+    sed -e '/prepublish/d' -i package.json
+}
+
+build() {
+    cd ${pkgname}-${pkgver}
+
+    coffee -c --no-header -o lib src/*.coffee
+}
+
+package() {
+    cd ${pkgname}-${pkgver}
+
+    npm install --user root -g --prefix="${pkgdir}"/usr
+
+    moduledir=/usr/lib/node_modules/${pkgname}
+
+    install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+    ln -s $(realpath \
+            --relative-to="${pkgdir}"/usr/share/licenses/${pkgname} \
+            "${pkgdir}"${moduledir})/LICENSE \
+        "${pkgdir}/usr/share/licenses/${pkgname}"
+
+    # Remove useless stuff and occurrences of ${pkgdir} and ${srcdir}
+    rm "${pkgdir}"${moduledir}/coffeelint.json
+    find "${pkgdir}"${moduledir} \
+        -name '.*' -prune -exec rm -r '{}' \; \
+        -or -name 'appveyor.yml' -exec rm '{}' \; \
+        -or -name 'benchmark' -prune -exec rm -r '{}' \; \
+        -or -path "*/${pkgname}/node_modules/*/bin" -prune -exec rm -r '{}' \; \
+        -or -name 'bin.js' -exec rm '{}' \; \
+        -or -name 'bower.json' -exec rm '{}' \; \
+        -or -name 'cleanup.sh' -exec rm '{}' \; \
+        -or -name 'component.json' -exec rm '{}' \; \
+        -or -name 'example' -prune -exec rm -r '{}' \; \
+        -or -name 'example.js' -exec rm '{}' \; \
+        -or -name 'examples' -prune -exec rm -r '{}' \; \
+        -or -name 'Gruntfile.js' -exec rm '{}' \; \
+        -or -name 'Makefile' -exec rm '{}' \; \
+        -or -name 'man' -prune -exec rm -r '{}' \; \
+        -or -name 'package.json' -exec sed -e "s|${pkgdir}||" \
+            -e "s|${srcdir}/${pkgname}-${pkgver}|${moduledir}|" -i '{}' \; \
+        -or -name 'perf' -prune -exec rm -r '{}' \; \
+        -or -name 'test' -prune -exec rm -r '{}' \; \
+        -or -name 'test.js' -exec rm '{}' \; \
+        -or -name 'tools' -prune -exec rm -r '{}' \; \
+        -or -name 'tst' -prune -exec rm -r '{}' \;
+}



More information about the arch-commits mailing list