summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD28
-rw-r--r--emacs-linum-relative.install28
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9dca03c415ac
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+# Generated by mksrcinfo v8
+# Fri May 5 19:34:02 UTC 2017
+pkgbase = emacs-linum-relative
+ pkgdesc = Display relative line number in the left margin in emacs
+ pkgver = 0.5
+ pkgrel = 1
+ url = https://github.com/coldnew/linum-relative
+ install = emacs-linum-relative.install
+ arch = any
+ license = GPL2
+ depends = emacs
+ source = emacs-linum-relative-0.5.tar.gz::https://github.com/coldnew/linum-relative/archive/0.5.tar.gz
+ sha256sums = 5b4fac5fd35f19c0cfc65f474fba4b7fe62279a24a0e9b03a7c6a023f2ce8e68
+
+pkgname = emacs-linum-relative
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3dae7c589f18
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Alex Whitt <alex.joseph.whitt@gmail.com>
+
+_pkgsrcname=linum-relative
+_pkgmaintainer=coldnew
+_pkgdestdirname=linum-relative
+_versionprefix=
+pkgver=0.5
+pkgrel=1
+pkgdesc="Display relative line number in the left margin in emacs"
+pkgname=emacs-${_pkgdestdirname}
+arch=(any)
+url="https://github.com/${_pkgmaintainer}/${_pkgsrcname}"
+license=('GPL2')
+depends=('emacs')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/${_pkgmaintainer}/${_pkgsrcname}/archive/${_versionprefix}${pkgver}.tar.gz")
+sha256sums=('5b4fac5fd35f19c0cfc65f474fba4b7fe62279a24a0e9b03a7c6a023f2ce8e68')
+install=${pkgname}.install
+
+build() {
+ cd "${srcdir}/${_pkgsrcname}-${pkgver}"
+ emacs -q --no-splash -batch -L . -f batch-byte-compile *.el
+}
+
+package() {
+ cd "${srcdir}/${_pkgsrcname}-${pkgver}"
+ mkdir -p "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+ install -m644 *.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+}
diff --git a/emacs-linum-relative.install b/emacs-linum-relative.install
new file mode 100644
index 000000000000..ccc59834cde2
--- /dev/null
+++ b/emacs-linum-relative.install
@@ -0,0 +1,28 @@
+post_install () {
+
+cat << EOF
+
+==> Add this code to your .emacs file to use the mode:
+
+(require 'linum-relative)
+(global-linum-mode 1)
+(linum-relative-on)
+
+==> If you want to see the current line number instead of an unhelpful "0":
+
+(setq linum-relative-current-symbol "")
+
+==> Or do the above with use-package:
+
+(use-package linum-relative
+ :config
+ (global-linum-mode 1)
+ (linum-relative-on)
+ (setq linum-relative-current-symbol "")) ; For current line number
+
+EOF
+}
+
+post_upgrade () {
+ post_install $1
+}