summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Whitt2017-05-19 16:19:44 -0400
committerAlex Whitt2017-05-19 16:19:44 -0400
commitf6b2f4a71f39bf3cb1e07d3eabfb67ecac8ff386 (patch)
tree955fd9684fc74924464577da94ae74d9f71bf4ea
downloadaur-f6b2f4a71f39bf3cb1e07d3eabfb67ecac8ff386.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD43
-rw-r--r--emacs-spacemacs-funcs.install20
-rw-r--r--spacemacs-funcs.el15
4 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e2ea85e23dde
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by mksrcinfo v8
+# Fri May 19 20:19:02 UTC 2017
+pkgbase = emacs-spacemacs-funcs
+ pkgdesc = Useful functions from the Spacemacs project
+ pkgver = 0.200.9
+ pkgrel = 1
+ url = https://github.com/syl20bnr/spacemacs
+ install = emacs-spacemacs-funcs.install
+ arch = any
+ license = GPL3
+ depends = emacs
+ source = spacemacs-funcs.el
+ source = emacs-spacemacs-funcs-0.200.9.tar.gz::https://github.com/syl20bnr/spacemacs/archive/v0.200.9.tar.gz
+ sha256sums = 6e9f59ad05e6c1a96d3efc268a39999e95956480c4f42a122a305633e0b60837
+ sha256sums = 81e8fc56421e00405cba2d78f8b5e14b1d9e8e23803dcf43eb8e89b72273ea1b
+
+pkgname = emacs-spacemacs-funcs
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..07848ab92999
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Alex Whitt <alex.joseph.whitt@gmail.com>
+
+_pkgsrcname=spacemacs
+_pkgmaintainer=syl20bnr
+_pkgdestdirname=spacemacs-funcs
+_versionprefix=v
+pkgver=0.200.9
+pkgrel=1
+pkgdesc="Useful functions from the Spacemacs project"
+pkgname=emacs-${_pkgdestdirname}
+arch=(any)
+url="https://github.com/${_pkgmaintainer}/${_pkgsrcname}"
+license=('GPL3')
+depends=('emacs')
+source=("spacemacs-funcs.el"
+ "$pkgname-$pkgver.tar.gz::https://github.com/${_pkgmaintainer}/${_pkgsrcname}/archive/${_versionprefix}${pkgver}.tar.gz")
+sha256sums=('6e9f59ad05e6c1a96d3efc268a39999e95956480c4f42a122a305633e0b60837'
+ '81e8fc56421e00405cba2d78f8b5e14b1d9e8e23803dcf43eb8e89b72273ea1b')
+install=${pkgname}.install
+
+build() {
+ emacs -q --no-splash -batch -L . -f batch-byte-compile spacemacs-funcs.el
+
+ cd "${srcdir}/${_pkgsrcname}-${pkgver}"
+ shopt -s globstar
+ shopt -s extglob
+ emacs -q --no-splash -batch -L . -f batch-byte-compile core/**/*funcs*.el
+ emacs -q --no-splash -batch -L . -f batch-byte-compile layers/**/*funcs*.el
+}
+
+package() {
+ mkdir -p "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+
+ cp spacemacs-funcs.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+
+ cd "${srcdir}/${_pkgsrcname}-${pkgver}"
+ shopt -s globstar
+ shopt -s extglob
+ cp --parents core/**/*funcs*.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+ cp --parents layers/**/*funcs*.el{c,} "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/"
+
+ find "${pkgdir}/usr/share/emacs/site-lisp/${_pkgdestdirname}/" -type f -exec chmod 644 -- {} +
+}
diff --git a/emacs-spacemacs-funcs.install b/emacs-spacemacs-funcs.install
new file mode 100644
index 000000000000..000eec4443a3
--- /dev/null
+++ b/emacs-spacemacs-funcs.install
@@ -0,0 +1,20 @@
+post_install () {
+
+cat << EOF
+
+==> Add this code to your .emacs file to include these functions:
+
+(require 'spacemacs-funcs)
+
+==> Or do the above with use-package:
+
+(use-package spacemacs-funcs)
+
+==> NOTE: This is a really rough include, and basically imports all of the *funcs.el files in the Spacemacs project. There are bound to be functions that don't work, because they reference variables outside of these files (and therefore outside of the scope of this package.) Over time I might think about refining this, but for now it gets me the utilities I need.
+
+EOF
+}
+
+post_upgrade () {
+ post_install $1
+}
diff --git a/spacemacs-funcs.el b/spacemacs-funcs.el
new file mode 100644
index 000000000000..3537feb5a3f0
--- /dev/null
+++ b/spacemacs-funcs.el
@@ -0,0 +1,15 @@
+;;; spacemacs-funcs --- Reusable functions from Spacemacs
+;;; Commentary:
+;;
+;; This file simply ncludes all *funcs.el files in the Spacemacs project.
+;; This is a rough operation and makes little effort to sanitize what is imported.
+;; That may happen someday but for now I just wanted to be able to grab
+;; some of the utility functions that community has assembled.
+
+;;; Code:
+(mapc 'load (file-expand-wildcards "**/*funcs*.elc"))
+
+(provide 'spacemacs-funcs)
+
+;;; end
+;;; spacemacs-funcs.el ends here