add atom-editor to aur

This commit is contained in:
Mike Brown 2015-09-07 22:22:43 -05:00
parent bf8257d61a
commit 4046f0b4cf
2 changed files with 63 additions and 0 deletions

53
aur/atom-editor/PKGBUILD Normal file
View file

@ -0,0 +1,53 @@
# Maintainer: Sebastian Jug <sebastian.jug@gmail.com>
# Contributor: John Reese <jreese@noswap.com>
# 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"
}

View file

@ -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"