From 4046f0b4cf64eabf91787788f3afd4a14263fc02 Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Mon, 7 Sep 2015 22:22:43 -0500 Subject: [PATCH] add atom-editor to aur --- aur/atom-editor/PKGBUILD | 53 +++++++++++++++++++++++++++++++ aur/atom-editor/atom-python.patch | 10 ++++++ 2 files changed, 63 insertions(+) create mode 100644 aur/atom-editor/PKGBUILD create mode 100644 aur/atom-editor/atom-python.patch diff --git a/aur/atom-editor/PKGBUILD b/aur/atom-editor/PKGBUILD new file mode 100644 index 000000000..dffa1d496 --- /dev/null +++ b/aur/atom-editor/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Sebastian Jug +# Contributor: John Reese +# Upstream URL: https://github.com/atom/atom +# +# For improvements/fixes to this package, please send a pull request: +# https://github.com/sjug/atom-editor + +pkgname=atom-editor +pkgver=1.0.11 +pkgrel=1 +pkgdesc='Chrome-based text editor from Github' +arch=('x86_64' 'i686') +url='https://github.com/atom/atom' +license=('MIT') +depends=('alsa-lib' 'gconf' 'gtk2' 'libgnome-keyring' 'libnotify' 'libxtst' 'nodejs' 'nss' 'python2') +optdepends=('gvfs: file deletion support') +makedepends=('git' 'npm') +conflicts=('atom-editor-bin' 'atom-editor-git') +source=("https://github.com/atom/atom/archive/v${pkgver}.tar.gz" + 'atom-python.patch') +sha256sums=('f649c33efd7de1f3a04d17d2b9f5711e781d5a39aead6f80b9b078a4c7625683' + '9a1f4e2efa7c0b2fb053d27979b0231f75f1f0d928e06413ddebeadd5d7ed46c') + +prepare() { + cd "atom-$pkgver" + + patch -Np0 -i "$srcdir/atom-python.patch" + + sed -i -e "/exception-reporting/d" \ + -e "/metrics/d" package.json + + sed -e "s/<%= description %>/$pkgdesc/" \ + -e "s|<%= executable %>|/usr/bin/atom|"\ + -e "s|<%= iconName %>|atom|"\ + resources/linux/atom.desktop.in > resources/linux/Atom.desktop +} + +build() { + cd "$srcdir/atom-$pkgver" + + export PYTHON=python2 + script/build --build-dir "$srcdir/atom-build" +} + +package() { + cd "$srcdir/atom-$pkgver" + + script/grunt install --build-dir "$srcdir/atom-build" --install-dir "$pkgdir/usr" + + install -Dm644 resources/linux/Atom.desktop "$pkgdir/usr/share/applications/atom.desktop" + install -Dm644 resources/atom.png "$pkgdir/usr/share/pixmaps/atom.png" + install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" +} diff --git a/aur/atom-editor/atom-python.patch b/aur/atom-editor/atom-python.patch new file mode 100644 index 000000000..b5909ed9f --- /dev/null +++ b/aur/atom-editor/atom-python.patch @@ -0,0 +1,10 @@ +--- atom.sh 2014-07-24 18:49:00.022810114 -0700 ++++ atom.sh 2014-07-24 18:49:15.993257782 -0700 +@@ -76,6 +76,7 @@ + USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..) + ATOM_PATH="$USR_DIRECTORY/share/atom/atom" + ATOM_HOME="${ATOM_HOME:-$HOME/.atom}" ++ export PYTHON=python2 + + mkdir -p "$ATOM_HOME" +