summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Whitt2017-05-06 17:01:29 -0400
committerAlex Whitt2017-05-06 17:01:29 -0400
commit266e9b02f1ed8ff6af2b64907968807335b7a69e (patch)
treebd577cad29ba6d70f165ceffcbbae1a6f2a202f9
downloadaur-emacs-top-mode.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD28
-rw-r--r--emacs-top-mode.install28
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b94b811bcf4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+# Generated by mksrcinfo v8
+# Sat May 6 21:00:37 UTC 2017
+pkgbase = emacs-top-mode
+ pkgdesc = Run 'top' from emacs
+ pkgver = 2013_06_05.1
+ pkgrel = 1
+ url = https://www.emacswiki.org/emacs/TopMode
+ install = emacs-top-mode.install
+ arch = any
+ license = GPL2
+ depends = emacs
+ source = https://github.com/emacsmirror/top-mode/archive/master.zip
+ sha256sums = 15bb054e0447d6b557b70856fdba93382422f587dd0a01342930b3891377e4a3
+
+pkgname = emacs-top-mode
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..84e74a6a88b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Alex Whitt <alex.joseph.whitt@gmail.com>
+
+_pkgsrcname=top-mode
+_pkgdestdirname=top-mode
+_versionprefix=
+pkgver=2013_06_05.1
+_pkgsrcver=master
+pkgrel=1
+pkgdesc="Run 'top' from emacs"
+pkgname=emacs-${_pkgdestdirname}
+arch=(any)
+url="https://www.emacswiki.org/emacs/TopMode"
+license=('GPL2')
+depends=('emacs')
+source=("https://github.com/emacsmirror/top-mode/archive/master.zip")
+sha256sums=('15bb054e0447d6b557b70856fdba93382422f587dd0a01342930b3891377e4a3')
+install=${pkgname}.install
+
+build() {
+ cd "${srcdir}/${_pkgsrcname}-${_pkgsrcver}"
+ emacs -q --no-splash -batch -L . -f batch-byte-compile *.el
+}
+
+package() {
+ cd "${srcdir}/${_pkgsrcname}-${_pkgsrcver}"
+ mkdir -p "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+ install -m644 *.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+}
diff --git a/emacs-top-mode.install b/emacs-top-mode.install
new file mode 100644
index 00000000000..a9f6223d11a
--- /dev/null
+++ b/emacs-top-mode.install
@@ -0,0 +1,28 @@
+post_install () {
+
+cat << EOF
+
+==> Add this code to your .emacs file to use the mode:
+
+(require 'top-mode)
+
+==> Or, with use-package:
+
+(use-package top-mode)
+
+==> A function to auto-refresh:
+
+(defun top-auto-refresh (rate)
+ (interactive "nTop refresh rate (seconds): ")
+ (progn
+ (cancel-function-timers 'top)
+ (if (not (zerop rate))
+ (setq *top-refresh-timer*
+ (run-with-timer 2 rate 'top)))))
+
+EOF
+}
+
+post_upgrade () {
+ post_install $1
+}