Skip to content

Instantly share code, notes, and snippets.

@ivanpu
Last active October 19, 2016 03:42
Show Gist options
  • Save ivanpu/31ce91095897741b47de8d1382525e9b to your computer and use it in GitHub Desktop.
Save ivanpu/31ce91095897741b47de8d1382525e9b to your computer and use it in GitHub Desktop.
A fix for 'atom-editor-bin' AUR package
*.tar
*.tar.*
*.zip
*.tgz
*.log
*.log.*
*.sig
pkg/
src/
# atom deb package
*.deb
# Generated by mksrcinfo v8
# Wed Oct 19 03:42:17 UTC 2016
pkgbase = atom-editor-bin
pkgdesc = Chrome-based text editor from Github - Precompiled binary from official repository
pkgver = 1.11.1
pkgrel = 1
url = https://github.com/atom/atom
install = atom-editor-bin.install
arch = x86_64
license = MIT
depends = git
depends = gconf
depends = gtk2
depends = libnotify
depends = libxtst
depends = nss
depends = python2
depends = xdg-utils
depends = alsa-lib
depends = libgnome-keyring
optdepends = gvfs
provides = atom
conflicts = atom
conflicts = atom-editor
conflicts = atom-editor-git
conflicts = atom-editor-git-tagged
options = !strip
source = atom-amd64-v1.11.1.deb::https://atom-installer.github.com/v1.11.1/atom-amd64.deb
source = atom-python.patch
source = startupwmclass.patch
md5sums = 29c246364abaf2899066265ec7e22b69
md5sums = 22b4763c2e8607f0ea46311ec13da9ff
md5sums = d472858970fc4ba6f63197729b65607c
pkgname = atom-editor-bin
# Colored makepkg-like functions
note() {
printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
}
post_install() {
note "Custom launch flags can be put in: ~/.config/atom-editor-flags.conf"
}
--- a/usr/share/applications/atom.desktop
+++ b/usr/share/applications/atom.desktop
@@ -2,7 +2,7 @@
Name=Atom
Comment=A hackable text editor for the 21st Century.
GenericName=Text Editor
-Exec=/usr/share/atom/atom %F
+Exec=env PYTHON=python2 /usr/share/atom/atom %U
Icon=atom
Type=Application
StartupNotify=true
--- a/usr/share/atom/resources/app/apm/bin/apm
+++ b/usr/share/atom/resources/app/apm/bin/apm
@@ -2,6 +2,8 @@
set -e
+export PYTHON=python2
+
initialCwd=`pwd -P`
apmPath=$0
# Maintainer Danny Arnold <despair.blue at gmail dot com>
# Contributor: Andre Miranda <andreldm1989 AT gmail DOT com>
# Contributor: Tom Bu <tom.bu AT members.fsf.org>
# Contributor: John Reese <[email protected]>
# Contributor: Jordan J Klassen <[email protected]>
# Upstream URL: https://github.com/atom/atom
pkgname=atom-editor-bin
pkgver=1.11.1
pkgrel=1
pkgdesc="Chrome-based text editor from Github - Precompiled binary from official repository"
arch=('x86_64')
url="https://github.com/atom/atom"
license=('MIT')
provides=('atom')
options=(!strip)
depends=('git' 'gconf' 'gtk2' 'libnotify' 'libxtst' 'nss' 'python2' 'xdg-utils' 'alsa-lib' 'libgnome-keyring')
optdepends=('gvfs')
conflicts=('atom' 'atom-editor' 'atom-editor-git' 'atom-editor-git-tagged')
install=$pkgname.install
md5sums=('29c246364abaf2899066265ec7e22b69'
'22b4763c2e8607f0ea46311ec13da9ff'
'd472858970fc4ba6f63197729b65607c')
source=("atom-amd64-v${pkgver}.deb::https://atom-installer.github.com/v${pkgver}/atom-amd64.deb"
atom-python.patch
startupwmclass.patch)
package() {
bsdtar xf data.tar.gz
printf "Applying atom-python.patch\n"
patch -p1 < "${srcdir}"/atom-python.patch
printf "Applying startupwmclass.patch\n"
patch -p1 < "${srcdir}"/startupwmclass.patch
sed -i 's|env PYTHON=python2 GTK_IM_MODULE= QT_IM_MODULE= XMODIFIERS= /usr/share/atom/atom|/usr/bin/atom|' usr/share/applications/atom.desktop
chmod -R g-w usr
mv usr "${pkgdir}"
}
--- a/usr/share/applications/atom.desktop
+++ b/usr/share/applications/atom.desktop
@@ -6,5 +6,6 @@ Exec=/usr/bin/atom %U
Icon=atom
Type=Application
StartupNotify=true
+StartupWMClass=Atom
Categories=GNOME;GTK;Utility;TextEditor;Development;
MimeType=text/plain;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment