Commit 6d58ff79 authored by AlmAck's avatar AlmAck

atom 1.28.0

fix ATOM_PATH="usr/share/atom/atom"
parent 4604907c
Pipeline #829 failed with stages
in 32 minutes and 37 seconds
pkgname=atom
pkgver=1.27.2
pkgrel=2
pkgver=1.28.0
pkgrel=1
pkgdesc='A hackable text editor for the 21st Century'
arch=('x86_64')
url='https://github.com/atom/atom'
......@@ -10,22 +10,16 @@ makedepends=('git' 'npm' 'libgnome-keyring' 'gconf' 'python2' 'libsecret')
options=(!emptydirs)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/atom/atom/archive/v${pkgver}.tar.gz"
'fix-license-path.patch'
'fix-restart.patch'
'fix-node8.patch')
sha256sums=('e99c96326682cd674d3d225c01b706ddd7e5a6b3f4e7cbfcbef1a74d3b977223'
'fix-restart.patch')
sha256sums=('8d31c74870b7c0813f14eeae55aa85e13bffdfb33a087ad08f1f5eec319331f4'
'67ecd71b08292218388205ee49e02d176a15bd0c3e74d30cb720b79c6946f4c9'
'a6fa960741823a52b2f82684285e26eb84ce54825dc7ed008fdaca974b60957e'
'eb771d7c009be8d48c1387ed63f3e575dc12f3bd69455b4be4b78ab57cb49b86')
'a6fa960741823a52b2f82684285e26eb84ce54825dc7ed008fdaca974b60957e')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}"/fix-license-path.patch
patch -Np1 -i "${srcdir}"/fix-restart.patch
patch -Np1 -i "${srcdir}"/fix-node8.patch
# Upstream ea1ff8d45448679390058be185ee0d36f823872e
sed -e 's/"archive-view": "0.64.3"/"archive-view": "0.64.6"/' -i package.json
# Workaround for Node 10
sed -e 's|"electron-link": "0.2.0"|"electron-link": "../../electron-link"|' \
......@@ -57,14 +51,16 @@ build() {
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -d -m 755 "${pkgdir}"/usr/share/atom
cp -r out/atom-$pkgver-amd64/* "${pkgdir}"/usr/share/atom
install -d -m 755 "${pkgdir}"/usr/lib
cp -r out/app "${pkgdir}"/usr/lib/atom
install -m 644 out/startup.js "${pkgdir}"/usr/lib/atom
install -m 755 "${srcdir}/atom.js" "${pkgdir}"/usr/lib/atom/atom
msg "installing .desktop"
install -d -m 755 "${pkgdir}/usr/share/applications"
sed -e "s|<%= appName %>|Atom|" \
-e "s/<%= description %>/${pkgdesc}/" \
-e "s|<%= installDir %>/share/<%= appFileName %>/atom|/usr/bin/atom|" \
-e "s|<%= installDir %>/share/<%= appFileName %>/atom|/usr/lib/atom/atom|" \
-e "s|<%= iconPath %>|atom|" \
resources/linux/atom.desktop.in > "${pkgdir}/usr/share/applications/atom.desktop"
......@@ -82,4 +78,18 @@ 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
rm "${pkgdir}"/usr/lib/atom/node_modules/.bin/pegjs
find "${pkgdir}"/usr/lib/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 '{}' \;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment