[arch-commits] Commit in apm/trunk (PKGBUILD apm.js)
Caleb Maclennan
alerque at gemini.archlinux.org
Wed Mar 30 10:44:42 UTC 2022
Date: Wednesday, March 30, 2022 @ 10:44:41
Author: alerque
Revision: 1177775
upgpkg: apm 2.6.5-1
Modified:
apm/trunk/PKGBUILD
apm/trunk/apm.js
----------+
PKGBUILD | 152 ++++++++++++++++++++++++++++++-------------------------------
apm.js | 2
2 files changed, 78 insertions(+), 76 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-30 10:43:38 UTC (rev 1177774)
+++ PKGBUILD 2022-03-30 10:44:41 UTC (rev 1177775)
@@ -1,113 +1,115 @@
-# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Nicola Squartini <tensor5 at gmail.com>
pkgname=apm
-pkgver=2.6.4
-pkgrel=3
+pkgver=2.6.5
+_sha=ade8fbe124b18f5949a6b20b8e02a551d5405d67
+pkgrel=1
pkgdesc='Atom package manager'
-arch=('x86_64')
-url='https://github.com/atom/apm'
-license=('MIT')
-depends=('libsecret' 'nodejs>=10' 'npm' 'python')
-makedepends=('git')
-provides=('nodejs-atom-package-manager')
-conflicts=('nodejs-atom-package-manager')
-replaces=('nodejs-atom-package-manager')
+arch=(x86_64)
+url="https://github.com/atom/$pkgname"
+license=(MIT)
+_electron=electron11 # must match atom package
+depends=(# libgit2{,.so} # see https://bugs.archlinux.org/task/74164
+ libsecret
+ nodejs-lts-gallium
+ npm
+ python)
+makedepends=(git)
+ # node-gyp)
+provides=(nodejs-atom-package-manager)
+conflicts=(nodejs-atom-package-manager)
+replaces=(nodejs-atom-package-manager)
options=(!emptydirs)
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/atom/apm/archive/v${pkgver}.tar.gz"
- "${pkgname}-bump-first-mate.patch::https://github.com/atom/apm/commit/42134ae3278d.patch"
- 'apm.js'
- 'no-scripts.patch'
- 'git-utils.patch')
-sha512sums=('6549b7546afe3053f61804ee324b6dec72e409dbf433b2e7191b99deb189f94d640b7e140b689ab380f5269ba0b9a78132d2745dd6d2689673261d6445183868'
- 'e8725530497a415e0ad7cc51e3855ab5b3eb33b926c3526e439f29e333e0a93cc0a692b46b68819ddbfdcaedb1a1bc2a6161fb9c1c8e34b33ac35a552639311b'
- '36bbf34a3a7ba9ed63ed1d805be9d7906d284077ff72a4c8199efc1f04ac672c4a1a75568f2c9d81037481452d3a47c3e54370a76e9ed7b35e67fda93acd1726'
- 'a962ecc1557bcfe92c8d771a44c3bbbd72d0bf9c81285662ef26a1f99f3604efcca0307e7edb59eb99c2cbc83db4ab844f0db0532ca990581eff28e50c42acd6'
- 'bf9f4023bfbdc7240e5ed8a87bc9097eb7a57b2bae44f1044098eb380b15ff8a12f92347b99b6754c6adb537b8310d1f47bdfd3e60db411e4d69d575ce70b2a6')
+_archive="$pkgname-$_sha"
+source=("$url/archive/$_sha/$_archive.tar.gz"
+ apm.js
+ no-scripts.patch)
+ # git-utils.patch)
+sha512sums=('3788ccc2f6b2fe63792463c282ebb1710aaf2dccb595c3177494cd8800fc5e5df3f3b49481f6342fcff770882c50c2d171d9d53a985184e84b875f386c5a2039'
+ 'dd6786d44278f1edbfb87d4a4a639da4fd4b8ab9aca85ae430e113256befd3850b1fb375353afb5f1f4b99ad3dc2666b37d6d6c31c7563d992d8c034d0d2750a'
+ 'a962ecc1557bcfe92c8d771a44c3bbbd72d0bf9c81285662ef26a1f99f3604efcca0307e7edb59eb99c2cbc83db4ab844f0db0532ca990581eff28e50c42acd6')
_apmdir='/usr/lib/node_modules/atom-package-manager'
prepare() {
- rm -rf "${srcdir}"/apm-build
+ ! test -d "$srcdir"/apm-build
+ cd "$_archive"
- cd apm-${pkgver}
-
# Use custom launcher
rm bin/apm{,.cmd} bin/npm{,.cmd}
rm src/cli.coffee
- install -m755 "${srcdir}"/apm.js bin/apm
+ install -m0755 "$srcdir/apm.js" bin/apm
+ sed -i -e "s/@ELECTRON@/$_electron/" bin/apm
# Don't download binary Node
- patch -Np1 -i "${srcdir}"/no-scripts.patch
+ patch -Np1 -i "$srcdir/no-scripts.patch"
rm BUNDLED_NODE_VERSION script/*
- # Fix build with nodejs 17
- patch -Np1 -i "${srcdir}/${pkgname}-bump-first-mate.patch"
+ sed -i -e '/git-utils/s/5.7.2/5.7.3/' package.json
+
+ npm install --cache "$srcdir/npm-cache"
+ # pushd node_modules/git-utils
+ # patch -Np1 -i "$srcdir/git-utils.patch"
}
build() {
- cd apm-${pkgver}
+ cd "$_archive"
- npm install
npx coffee --compile --output lib src
npm uninstall coffee-script coffeelint express jasmine-focused shx node-gyp
- cd node_modules/git-utils
- patch -Np1 -i "${srcdir}/git-utils.patch"
- node-gyp rebuild
- cd ../..
+ # pushd node_modules/git-utils
+ # node-gyp rebuild
+ # popd
npm pack
}
package() {
- cd apm-${pkgver}
-
- install -d -m755 "${pkgdir}${_apmdir}"
+ cd "$_archive"
+ install -d -m755 "$pkgdir$_apmdir"
tar -xf atom-package-manager-*.tgz --strip-components 1 \
- -C "${pkgdir}${_apmdir}"
- cp -r node_modules "${pkgdir}${_apmdir}"
+ -C "$pkgdir$_apmdir"
+ cp -r node_modules "$pkgdir$_apmdir"
- install -d -m755 "${pkgdir}/usr/bin"
+ install -d -m755 "$pkgdir/usr/bin"
ln -s \
- "$(realpath --relative-to="${pkgdir}/usr/bin" "${pkgdir}${_apmdir}/bin/apm")" \
- "${pkgdir}/usr/bin"
+ "$(realpath --relative-to="$pkgdir/usr/bin" "$pkgdir$_apmdir/bin/apm")" \
+ "$pkgdir/usr/bin"
- # Install license file
- install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
- ln -s \
- "$(realpath --relative-to="${pkgdir}/usr/share/licenses/${pkgname}" "${pkgdir}${_apmdir}/LICENSE.md")" \
- "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
# Remove occurrences of ${srcdir}
- find "${pkgdir}" -name "package.json" \
- -exec sed -e "s|${srcdir}/apm-${pkgver}|${_apmdir}|" \
+ find "$pkgdir" -name "package.json" \
+ -exec sed -e "s|$srcdir/$_archive|$_apmdir|" \
-i '{}' \;
# Remove useless stuff
- find "${pkgdir}"/usr/lib \
- -name ".*" -prune -exec rm -r '{}' \; \
- -or -name "*.a" -exec rm '{}' \; \
- -or -name "*.bat" -exec rm '{}' \; \
- -or -name "*.mk" -exec rm '{}' \; \
- -or -path "*/git-utils/binding.gyp" -exec rm '{}' \; \
- -or -path "*/git-utils/src/*.cc" -exec rm '{}' \; \
- -or -path "*/git-utils/src/*.h" -exec rm '{}' \; \
- -or -path "*/keytar/binding.gyp" -exec rm '{}' \; \
- -or -path "*/keytar/src" -prune -exec rm -r '{}' \; \
- -or -path "*/oniguruma/binding.gyp" -exec rm '{}' \; \
- -or -path "*/oniguruma/src" -prune -exec rm -r '{}' \; \
- -or -name "appveyor.yml" -exec rm '{}' \; \
- -or -name "benchmark" -prune -exec rm -r '{}' \; \
- -or -name "binding.Makefile" -exec rm '{}' \; \
- -or -name "config.gypi" -exec rm '{}' \; \
- -or -name "deps" -prune -exec rm -r '{}' \; \
- -or -name "doc" -prune -exec rm -r '{}' \; \
- -or -name "html" -prune -exec rm -r '{}' \; \
- -or -name "Makefile" -exec rm '{}' \; \
- -or -name "man" -prune -exec rm -r '{}' \; \
- -or -name "obj.target" -prune -exec rm -r '{}' \; \
- -or -name "samples" -prune -exec rm -r '{}' \; \
- -or -name "scripts" -prune -exec rm -r '{}' \; \
- -or -name "test" -prune -exec rm -r '{}' \; \
- -or -name "tests" -prune -exec rm -r '{}' \;
+ find "$pkgdir"/usr/lib \
+ -name '.*' -prune -exec rm -r '{}' \; \
+ -or -name '*.a' -exec rm '{}' \; \
+ -or -name '*.bat' -exec rm '{}' \; \
+ -or -name '*.mk' -exec rm '{}' \; \
+ -or -path '*/git-utils/binding.gyp' -exec rm '{}' \; \
+ -or -path '*/git-utils/src/*.cc' -exec rm '{}' \; \
+ -or -path '*/git-utils/src/*.h' -exec rm '{}' \; \
+ -or -path '*/keytar/binding.gyp' -exec rm '{}' \; \
+ -or -path '*/keytar/src' -prune -exec rm -r '{}' \; \
+ -or -path '*/oniguruma/binding.gyp' -exec rm '{}' \; \
+ -or -path '*/oniguruma/src' -prune -exec rm -r '{}' \; \
+ -or -name 'appveyor.yml' -exec rm '{}' \; \
+ -or -name 'benchmark' -prune -exec rm -r '{}' \; \
+ -or -name 'binding.Makefile' -exec rm '{}' \; \
+ -or -name 'config.gypi' -exec rm '{}' \; \
+ -or -name 'deps' -prune -exec rm -r '{}' \; \
+ -or -name 'doc' -prune -exec rm -r '{}' \; \
+ -or -name 'html' -prune -exec rm -r '{}' \; \
+ -or -name 'Makefile' -exec rm '{}' \; \
+ -or -name 'man' -prune -exec rm -r '{}' \; \
+ -or -name 'obj.target' -prune -exec rm -r '{}' \; \
+ -or -name 'samples' -prune -exec rm -r '{}' \; \
+ -or -name 'scripts' -prune -exec rm -r '{}' \; \
+ -or -name 'test' -prune -exec rm -r '{}' \; \
+ -or -name 'tests' -prune -exec rm -r '{}' \;
}
Modified: apm.js
===================================================================
--- apm.js 2022-03-30 10:43:38 UTC (rev 1177774)
+++ apm.js 2022-03-30 10:44:41 UTC (rev 1177775)
@@ -4,7 +4,7 @@
process.env.ATOM_RESOURCE_PATH = process.env.ATOM_RESOURCE_PATH || "/usr/lib/atom";
-process.env.ATOM_ELECTRON_VERSION = process.env.ATOM_ELECTRON_VERSION || require("fs").readFileSync("/usr/lib/electron9/version", "utf8");
+process.env.ATOM_ELECTRON_VERSION = process.env.ATOM_ELECTRON_VERSION || require("fs").readFileSync("/usr/lib/@ELECTRON@/version", "utf8");
require("../lib/apm-cli.js").run(process.argv.slice(2), function (error) {
process.exitCode = Number(Boolean(error));
More information about the arch-commits
mailing list