summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfusion8092016-06-04 11:12:07 +1000
committerfusion8092016-06-04 11:12:07 +1000
commit3d716158012abd88dfe19c7351b6ab1859217a27 (patch)
tree65c569f77f68d877ba19fb82abfde0c9c5b39313
parentde8797843b3f80309eb3dd3153b31fd51f688237 (diff)
downloadaur-3d716158012abd88dfe19c7351b6ab1859217a27.tar.gz
Initial commit as new owner
-rw-r--r--PKGBUILD116
-rw-r--r--atom-git71
-rw-r--r--atom-git.desktop10
-rw-r--r--atom-git.install11
4 files changed, 171 insertions, 37 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 88f187755807..d54a2b83cf86 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,53 +1,95 @@
-# Maintainer: Andya <ap_9@outlook.com>
-# Contributor: oozyslug <oozyslug@gmail.com>
-# Contributor: Timofey Titovets <nefelim4ag@gmail.com>
-# Submitter: John Reese <john@noswap.com>
-# Upstream URL: https://github.com/atom/atom
-
-# Please do mind that pkgbuild will automagically update
-# to latest tagged release (you could have problems if you use an aur helper),
-# there's no need to manually change pkgver.
-# Please don't flag out-of-date!
-pkgname=atom-editor-git
-pkgver=1.1.0.beta.0.r178.g575d79a
-pkgrel=2
-pkgdesc="Chrome-based text editor from Github"
-arch=('i686' 'x86_64')
-url="https://github.com/atom/atom"
+# Contributor: Matheus de Alcantara <matheus.de.alcantara@gmail.com>
+# Maintainer: Brenton Horne <brentonhorne77 at gmail dot com>
+
+_pkgname=atom
+_version=git
+
+# Module Versions
+_about_url="https://github.com/fusion809/about"
+_about_arch_ver=1.5.16
+_language_gfm2_ver=0.90.3
+_language_liquid_ver=0.5.1
+
+pkgname=${_pkgname}-editor-${_version}
+_gitcommit=82b75b5
+pkgver=1.9.0.dev.${_gitcommit}
+pkgrel=3
+pkgdesc='Chrome-based text editor from GitHub - Git'
+arch=('x86_64' 'i686')
+url="https://github.com/${_pkgname}/${_pkgname}"
license=('MIT')
-provides=('atom-editor')
-conflicts=('atom-editor' 'atom-editor-bin')
-depends=('gconf' 'nodejs' 'libgnome-keyring' 'python2')
+depends=('alsa-lib' 'gconf' 'gtk2' 'libgnome-keyring' 'libnotify' 'libxtst' 'nodejs' 'nss' 'python2')
+optdepends=('gvfs: file deletion support')
makedepends=('git' 'npm')
-source=("atom::git+git://github.com/atom/atom")
-md5sums=('SKIP')
-
-pkgver() {
- cd "$srcdir/atom"
+install=${_pkgname}-${_version}.install
+source=("git+${url}.git"
+"about-arch-${_about_arch_ver}.tar.gz::$_about_url/archive/v${_about_arch_ver}.tar.gz"
+"${_pkgname}-${_version}.desktop"
+"${_pkgname}-${_version}")
+sha256sums=('SKIP'
+ 'de170455e00c684c452acdda5dbfa1182370cd2025990f944bfa48e0df685c6d'
+ '8e7723a0618661f5dabc5729deaf0b453ef7945ec904690a95d446eb517ec522'
+ '012ef71ce4e048f61c018676a0a5112428855f515fb55bf8fa2072a1b364d999')
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
+_gitcommit() {
+ cd $srcdir/$_pkgname
+ git describe --long | sed 's/v1.6.0-beta0//g' | sed 's/-[0-9]*-//g' | sed 's/g//g'
}
prepare() {
- cd "$srcdir/atom"
+ cd "$srcdir/${_pkgname}"
+
+ sed -i -e "/exception-reporting/d" \
+ -e "/metrics/d" \
+ -e "s/\"language-gfm\": \".*\",/\"language-gfm2\": \"${_language_gfm2_ver}\",\n \"language-liquid\": \"${_language_liquid_ver}\",/g" \
+ -e "s/\"about\": \".*\"/\"about-arch\": \"${_about_arch_ver}\"/g" \
+ package.json
+
+ chmod 755 -R package.json
+
+ sed -i -e 's@node script/bootstrap@node script/bootstrap --no-quiet@g' \
+ ./script/build || die "Fail fixing verbosity of script/build"
+
+ if ! [[ -d node_modules ]]; then
+ mkdir -p node_modules
+ else
+ rm -rf node_modules/about-arch
+ fi
- sed -e "s/<%= description %>/$pkgdesc/" \
- -e "s|<%= executable %>|/usr/bin/atom|"\
- -e "s|<%= iconName %>|atom|"\
- resources/linux/atom.desktop.in > resources/linux/Atom.desktop
+ mv $srcdir/about-${_about_arch_ver} $srcdir/about-arch
+ mv $srcdir/about-arch node_modules
+ sed -i -e "s/atom-editor/atom-editor-${_version}/g" node_modules/about-arch/lib/about-view.coffee
+
+ sed -i -e "s/<%=Desc=%>/$pkgdesc/g" ${srcdir}/${_pkgname}-${_version}.desktop
}
build() {
- cd "$srcdir/atom"
+ cd "$srcdir/${_pkgname}"
- export PYTHON=python2
- script/build --build-dir "$srcdir/atom-build"
+ export PYTHON=/usr/bin/python2
+ until ./script/build --build-dir "$srcdir/${_pkgname}-build"; do :; done
}
package() {
- cd "$srcdir/atom"
+ cd "$srcdir/${_pkgname}"
+
+ script/grunt install --build-dir "$srcdir/${_pkgname}-build" --install-dir "$pkgdir/usr"
+
+ mv "$pkgdir/usr/share/${_pkgname}" "$pkgdir/usr/share/${_pkgname}-${_version}"
+
+ rm "$pkgdir/usr/bin/${_pkgname}"
+
+ install -Dm755 "$srcdir/${_pkgname}-${_version}" "$pkgdir/usr/bin/${_pkgname}-${_version}"
+
+ rm "$pkgdir/usr/bin/apm"
+
+ ln -sf "${pkgdir}/usr/share/${_pkgname}-${_version}/resources/app/apm/node_modules/.bin/apm" "${pkgdir}/usr/bin/apm-${_version}"
+
+ if [[ -f "$pkgdir/usr/share/applications/${_pkgname}.desktop" ]]; then
+ rm "$pkgdir/usr/share/applications/${_pkgname}.desktop"
+ fi
- 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 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
+ install -Dm644 "$srcdir/${_pkgname}-${_version}.desktop" "$pkgdir/usr/share/applications/${_pkgname}-${_version}.desktop"
+ install -Dm644 "resources/app-icons/dev/png/1024.png" "$pkgdir/usr/share/pixmaps/${_pkgname}-${_version}.png"
+ install -Dm644 "LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}
diff --git a/atom-git b/atom-git
new file mode 100644
index 000000000000..7e31fd18d191
--- /dev/null
+++ b/atom-git
@@ -0,0 +1,71 @@
+#!/bin/bash
+while getopts ":wtfvh-:" opt; do
+ case "$opt" in
+ -)
+ case "${OPTARG}" in
+ wait)
+ WAIT=1
+ ;;
+ help|version)
+ REDIRECT_STDERR=1
+ EXPECT_OUTPUT=1
+ ;;
+ foreground|test)
+ EXPECT_OUTPUT=1
+ ;;
+ esac
+ ;;
+ w)
+ WAIT=1
+ ;;
+ h|v)
+ REDIRECT_STDERR=1
+ EXPECT_OUTPUT=1
+ ;;
+ f|t)
+ EXPECT_OUTPUT=1
+ ;;
+ esac
+done
+
+if [ $REDIRECT_STDERR ]; then
+ exec 2> /dev/null
+fi
+
+if [ $EXPECT_OUTPUT ]; then
+ export ELECTRON_ENABLE_LOGGING=1
+fi
+
+SCRIPT=$(readlink -f "$0")
+USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)
+
+ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
+
+ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
+mkdir -p "$ATOM_HOME"
+
+if [ $EXPECT_OUTPUT ]; then
+ "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
+ exit $?
+else
+ (
+ nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
+ if [ $? -ne 0 ]; then
+ cat "$ATOM_HOME/nohup.out"
+ exit $?
+ fi
+ ) &
+fi
+
+# Exits this process when Atom is used as $EDITOR
+on_die() {
+ exit 0
+}
+trap 'on_die' SIGQUIT SIGTERM
+
+# If the wait flag is set, don't exit this process until Atom tells it to.
+if [ $WAIT ]; then
+ while true; do
+ sleep 1
+ done
+fi
diff --git a/atom-git.desktop b/atom-git.desktop
new file mode 100644
index 000000000000..b89d9a7a7028
--- /dev/null
+++ b/atom-git.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Atom Git
+Comment=<%=Desc=%>
+GenericName=Text Editor
+Exec=/usr/bin/atom-git %U
+Icon=atom-git.png
+Type=Application
+StartupNotify=true
+Categories=GTK;Utility;TextEditor;Development;
+MimeType=application/javascript;application/json;application/x-desktop;application/x-httpd-eruby;application/x-httpd-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/x-ruby;application/x-bash;application/x-csh;application/x-sh;application/x-zsh;application/x-shellscript;application/x-sql;application/x-tcl;application/xhtml+xml;application/xml;application/xml-dtd;application/xslt+xml;text/coffeescript;text/css;text/html;text/plain;text/xml;text/xml-dtd;text/x-bash;text/x-c++;text/x-c++hdr;text/x-c++src;text/x-c;text/x-chdr;text/x-csh;text/x-csrc;text/x-dsrc;text/x-diff;text/x-go;text/x-java;text/x-java-source;text/x-makefile;text/x-markdown;text/x-objc;text/x-perl;text/x-php;text/x-python;text/x-ruby;text/x-sh;text/x-zsh;text/yaml;inode/directory;
diff --git a/atom-git.install b/atom-git.install
new file mode 100644
index 000000000000..e111ef946053
--- /dev/null
+++ b/atom-git.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}