Compiled on X8DTU with 2 physical Intel Xeon E5530 CPU (8C16T) Compile Flags: # 'dynamic_cast' not permitted with '-fno-rtti' CFLAGS='-mtune=generic -Os -pipe -flto -fno-exceptions -fuse-linker-plugin' CXXFLAGS='-mtune=generic -Os -pipe -flto -fno-exceptions -fuse-linker-plugin' LDFLAGS='-Wl,-O1' export CFLAGS CXXFLAGS LDFLAGS Dependencies: bash # required for bootstrap compiletc # required for bootstrap git # required for bootstrap node # required for bootstrap libsecret-dev # required for bootstrap libX11-dev # required for bootstrap libxkbfile-dev # required for bootstrap nss # required for build gdk-pixbuf2 # required for build libXext # required for build libXrender # required for build libXfixes # required for build libXdamage # required for build cairo # required for build pango # required for build atk # required for build dbus # required for build libXcomposite # required for build libXcursor # required for build libXi # required for build libXrandr # required for build at-spi2-core # required for build at-spi2-atk # required for build gtk3 # required for build libXtst # required for build libXss # required for build libasound # required for build libcups # required for build hicolor-icon-theme # required for build patchelf # required for binaries # not required, the package comes with its copies libEGL-dev # these two does nothing libGLESv2-dev # even if loaded tar -zxf v1.55.0.tar.gz cd atom-1.55.0 # temporary fix sudo ln -s /lib /lib64 # dataDirs sed -i 's:/usr/share:/usr/local/share:' ./script/lib/install-application.js # just in case ./script/clean # bootstrap, if failed, load missing deps and restart time ./script/bootstrap [ 15 min ] # before install, set a time mark touch /tmp/TimeMark # compile and install (in a go, sudo required) sudo time ./script/build --no-bootstrap --install [ 12 min ] # After installed find /usr -newer /tmp/TimeMark -not -type d > /tmp/atom.lst # make sure nothing else were included grep -v '/usr/local' /tmp/atom.lst # packup for later use tar -T /tmp/atom.lst -zcf atom-raw.tar.gz # for future reference, the size is huge du -h atom-raw.tar.gz [ 184.9M ] # unpack the archive mkdir work && cd work && tar -zxf ../atom-raw.tar.gz # copy the missing library, that sometimes got left behind, from source code directory cp /tmp/atom-1.55.0/script/node_modules/electron-mksnapshot/bin/libffmpeg.so ./usr/local/share/atom/ # patchelf, replace interpreter with the realpath grep -lr '/lib64/ld-linux-x86-64.so.2' | xargs patchelf --set-interpreter '/lib/ld-linux-x86-64.so.2' # strip binaries find -executable -not -type d -exec file {} \; | grep ELF | cut -d : -f 1 | xargs strip --strip-unneeded # shared objects, we can use the system ones mkdir -p /tmp/atom-share/usr/local/share/atom/ mv ./usr/local/share/atom/*.so /tmp/atom-share/usr/local/share/atom/ mv ./usr/local/share/atom/swiftshader /tmp/atom-share/usr/local/share/atom/ # remove python bytecode find -name '*.pyc' -exec rm -f {} \; # remove useless MicroSoft scripts find -name '*.cmd' -exec rm -f {} \; # remove icon-theme.cache rm -f ./usr/local/share/icons/hicolor/icon-theme.cache # locale mkdir -p /tmp/atom-loc/usr/local/share/atom/ mv ./usr/local/share/atom/locales/ /tmp/atom-loc/usr/local/share/atom/ mkdir -p /tmp/atom-loc/usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/ mv usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/locale/ /tmp/atom-loc/usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/ # apm: Atom Package Manager mkdir -p /tmp/atom-apm/usr/local/bin/ mv ./usr/local/bin/apm /tmp/atom-apm/usr/local/bin/ mkdir -p /tmp/atom-apm/usr/local/share/atom/resources/app/ mv ./usr/local/share/atom/resources/app/apm /tmp/atom-apm/usr/local/share/atom/resources/app/ # desktop: edit manually vi ./usr/local/share/applications/atom.desktop => X-FullPathIcon=/usr/local/share/icons/hicolor/48x48/apps/atom.png # perl grep -rIl '\/usr\/bin\/perl' | xargs sed -i 's:/usr/bin/perl:/usr/local/bin/perl:g' # is bash droppable ? ( just some checks ) find -type f -exec file {} \; | grep 'Bourne-Again shell script' > /tmp/bash.lst mkdir /tmp/bash-check cp $(cut -d : -f 1 /tmp/bash.lst) /tmp/bash-check for B in *; do busybox sh -n $B && echo $B good || echo $B bad; done # edit the main script ./usr/local/bin/atom ./usr/local/share/atom/resources/app/atom.sh #!/bin/bash --> #!/bin/sh # patchelf: (optional) rename libraries, should be backward compatible patchelf --replace-needed libssl.so.1.0.0 libssl.so.1.1 \ ./usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-imap-send patchelf --replace-needed libcrypto.so.1.0.0 libcrypto.so.1.1 \ ./usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-imap-send # clear empty directories (if any) find -depth -exec rmdir {} \; 2> /dev/null # tce.installed mkdir -m 775 ./usr/local/tce.installed vi ./usr/local/tce.installed/atom => gtk-update-icon-cache -q -f -t /usr/local/share/icons/hicolor => test -d /etc/fonts -o -L /etc/fonts || ln -s /tmp/tcloop/fontconfig/usr/local/etc/fonts /etc/fonts