From 0a3c6f2ade6e1c454b914cb3683e87ef14be2d83 Mon Sep 17 00:00:00 2001 From: Chaoting Liu Date: Thu, 12 Jul 2018 16:39:41 +0200 Subject: [PATCH 1/3] atom: update to 1.28.1, revert all the npm fix --- atom/PKGBUILD | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/atom/PKGBUILD b/atom/PKGBUILD index f7b79ed..882502a 100644 --- a/atom/PKGBUILD +++ b/atom/PKGBUILD @@ -1,5 +1,5 @@ pkgname=atom -pkgver=1.28.0 +pkgver=1.28.1 pkgrel=1 pkgdesc='A hackable text editor for the 21st Century' arch=('x86_64') @@ -31,12 +31,14 @@ prepare() { cd electron-link git checkout v0.2.0 + # FIXME: won't build if manually fix npm warnings # npm audit fix, remove package-lock to apply the fix - sed -e 's/"leveldown": "^1.6.0"/"leveldown": "^2.0.1"/' \ - -e 's/"electron": "1.7.10"/"electron": "^2.0.4"/' \ - -e 's/"electron-mocha": "^3.3.0"/"electron-mocha": "^6.0.4"/' \ - -e 's/"mocha": "^3.2.0"/"mocha": "^5.2.0"/' -i package.json - rm package-lock.json + #sed -e 's/"leveldown": "^1.6.0"/"leveldown": "^2.0.1"/' \ + # -e 's/"electron": "1.7.10"/"electron": "^2.0.4"/' \ + # -e 's/"electron-mocha": "^3.3.0"/"electron-mocha": "^6.0.4"/' \ + # -e 's/"mocha": "^3.2.0"/"mocha": "^5.2.0"/' -i package.json + #rm package-lock.json + sed -e 's/"leveldown": "^1.6.0"/"leveldown": "^2.0.1"/' -i package.json npm install npx babel src -d lib cd node_modules/levelup @@ -53,12 +55,13 @@ build() { cd script + # FIXME: won't build if manually fix npm warnings # npm audit fix - sed -e 's/"babel-core": "5.8.38"/"babel-core": "^6.26.3"/' \ - -e 's/"coffeelint": "1.15.7"/"coffeelint": "^2.1.0"/' \ - -e 's/"electron-packager": "7.3.0"/"electron-packager": "^12.1.0"/' \ - -e 's/"npm": "5.3.0"/"npm": "^6.1.0"/' \ - -e 's/"webdriverio": "2.4.5"/"webdriverio": "^4.13.1"/' -i package.json + #sed -e 's/"babel-core": "5.8.38"/"babel-core": "^6.26.3"/' \ + # -e 's/"coffeelint": "1.15.7"/"coffeelint": "^2.1.0"/' \ + # -e 's/"electron-packager": "7.3.0"/"electron-packager": "^12.1.0"/' \ + # -e 's/"npm": "5.3.0"/"npm": "^6.1.0"/' \ + # -e 's/"webdriverio": "2.4.5"/"webdriverio": "^4.13.1"/' -i package.json npm install ./build @@ -94,7 +97,7 @@ package() { node -e "require('./script/lib/get-license-text')().then((licenseText) => require('fs').writeFileSync('${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md', licenseText))" # Remove useless stuff - find "${pkgdir}"/usr/lib/atom/node_modules \ + find "${pkgdir}"/usr/share/atom/node_modules \ -name "*.a" -exec rm '{}' \; \ -or -name "*.bat" -exec rm '{}' \; \ -or -name "*.node" -exec chmod a-x '{}' \; \ From 623df5d3845f205017e2ed0176fb7e6f78bdbad2 Mon Sep 17 00:00:00 2001 From: Chaoting Liu Date: Thu, 12 Jul 2018 16:48:35 +0200 Subject: [PATCH 2/3] atom: updpkgsum --- atom/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/PKGBUILD b/atom/PKGBUILD index 882502a..dfffe38 100644 --- a/atom/PKGBUILD +++ b/atom/PKGBUILD @@ -13,7 +13,7 @@ options=(!emptydirs) source=("${pkgname}-${pkgver}.tar.gz::https://github.com/atom/atom/archive/v${pkgver}.tar.gz" 'fix-license-path.patch' 'fix-restart.patch') -sha256sums=('8d31c74870b7c0813f14eeae55aa85e13bffdfb33a087ad08f1f5eec319331f4' +sha256sums=('24df7ea2017fb7a4c19f685a228af4f6f64b96de42da99084ab6dff29b417247' '67ecd71b08292218388205ee49e02d176a15bd0c3e74d30cb720b79c6946f4c9' 'a6fa960741823a52b2f82684285e26eb84ce54825dc7ed008fdaca974b60957e') From ac8b4fdc5ed0b6ae97924c57317af69c1d7fec57 Mon Sep 17 00:00:00 2001 From: Chaoting Liu Date: Thu, 12 Jul 2018 19:17:50 +0200 Subject: [PATCH 3/3] atom: pkgrel+1, we build bundled atom, so we would not strip js codes --- atom/PKGBUILD | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/atom/PKGBUILD b/atom/PKGBUILD index dfffe38..64ce55f 100644 --- a/atom/PKGBUILD +++ b/atom/PKGBUILD @@ -1,6 +1,6 @@ pkgname=atom pkgver=1.28.1 -pkgrel=1 +pkgrel=2 pkgdesc='A hackable text editor for the 21st Century' arch=('x86_64') url='https://github.com/atom/atom' @@ -95,17 +95,4 @@ package() { msg "installing license" install -d -m 755 "${pkgdir}/usr/share/licenses/${pkgname}" node -e "require('./script/lib/get-license-text')().then((licenseText) => require('fs').writeFileSync('${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md', licenseText))" - - # Remove useless stuff - find "${pkgdir}"/usr/share/atom/node_modules \ - -name "*.a" -exec rm '{}' \; \ - -or -name "*.bat" -exec rm '{}' \; \ - -or -name "*.node" -exec chmod a-x '{}' \; \ - -or -name "benchmark" -prune -exec rm -r '{}' \; \ - -or -name "doc" -prune -exec rm -r '{}' \; \ - -or -name "html" -prune -exec rm -r '{}' \; \ - -or -name "man" -prune -exec rm -r '{}' \; \ - -or -name "scripts" -prune -exec rm -r '{}' \; \ - -or -path "*/less/gradle" -prune -exec rm -r '{}' \; \ - -or -path "*/task-lists/src" -prune -exec rm -r '{}' \; }