summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin James2015-08-09 18:13:09 -0500
committerBenjamin James2015-08-09 18:13:09 -0500
commit0b9f125793bbbb61237212c6a5ec0dd90726f70e (patch)
tree2611fbca670a7694e3b5aa4bb6a6df5e45b5f44e
downloadaur-0b9f125793bbbb61237212c6a5ec0dd90726f70e.tar.gz
Update to AUR4
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD53
-rw-r--r--README.licensing4
-rw-r--r--clx.install76
4 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dc1cd8bc058f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = clx-git
+ pkgdesc = An X11 client for Common Lisp
+ pkgver = r178.0a3bea0
+ pkgrel = 1
+ url = https://github.com/sharplispers/clx
+ install = clx.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = git
+ makedepends = texinfo
+ depends = x-server
+ depends = sbcl
+ provides = clx
+ conflicts = clx
+ source = clx-git::git+https://github.com/sharplispers/clx.git
+ source = README.licensing
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = clx-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c12874e7f6c8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Benjamin James <benjamin-james@utulsa.edu>
+
+pkgname=clx-git
+_clname=clx
+pkgver=r178.0a3bea0
+pkgrel=1
+arch=('i686' 'x86_64')
+pkgdesc="An X11 client for Common Lisp"
+url="https://github.com/sharplispers/clx"
+license=('custom')
+provides=('clx')
+conflicts=('clx')
+depends=('x-server' 'sbcl')
+makedepends=('git' 'texinfo')
+install=clx.install
+source=(${pkgname}::git+https://github.com/sharplispers/clx.git
+ README.licensing)
+md5sums=('SKIP'
+ 'SKIP')
+
+pkgver() {
+ cd ${srcdir}/${pkgname}
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd ${srcdir}/${pkgname}/manual
+
+ makeinfo ${_clname}.texinfo
+}
+
+package() {
+ cd ${srcdir}/${pkgname}
+
+ install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} *.lisp
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} ${_clname}.asd
+ install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/debug
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/debug debug/*.lisp
+ install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/demo
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/demo demo/*.lisp
+ install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/test
+ install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/test test/*.lisp
+ install -d ${pkgdir}/usr/share/info
+ install -m 644 -t ${pkgdir}/usr/share/info manual/${_clname}.info
+ install -d ${pkgdir}/usr/share/licenses/${_clname}
+ install -m 644 -t ${pkgdir}/usr/share/licenses/${_clname} ${srcdir}/README.licensing
+
+ install -d ${pkgdir}/usr/share/common-lisp/systems
+ cd ${pkgdir}/usr/share/common-lisp/systems
+ ln -s ../source/${_clname}/${_clname}.asd .
+}
diff --git a/README.licensing b/README.licensing
new file mode 100644
index 000000000000..669083222b88
--- /dev/null
+++ b/README.licensing
@@ -0,0 +1,4 @@
+This packages uses several licenses.
+
+To see a given source file's license, please check its header. The
+lisp files are installed in /usr/share/common-lisp/source/clx.
diff --git a/clx.install b/clx.install
new file mode 100644
index 000000000000..7344518a42cb
--- /dev/null
+++ b/clx.install
@@ -0,0 +1,76 @@
+# arg 1: the new package version
+
+_pkgname=clx
+_compile_log=n
+_lisp=()
+
+if pacman -Qq clisp-new-clx &>/dev/null ||
+ pacman -Qq clisp-gtk2 &>/dev/null ||
+ pacman -Qq clisp-new-clx &>/dev/null; then
+ _lisp=(${_lisp[@]} 'clisp')
+fi
+if pacman -Qq sbcl &>/dev/null; then
+ _lisp=(${_lisp[@]} 'sbcl')
+fi
+if pacman -Qq cmucl &> /dev/null; then
+ _lisp=(${_lisp[@]} 'cmucl')
+fi
+
+_compile_sbcl() {
+ sbcl --noinform --no-sysinit --no-userinit \
+ --eval "(require :asdf)" \
+ --eval "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \
+ --eval "(asdf:operate 'asdf:compile-op '${_pkgname})" \
+ --eval "(quit)" &> ${_compile_log_file} || return 1
+}
+_compile_clisp() {
+ clisp --silent -norc -x \
+ "(load #p\"/usr/share/common-lisp/source/asdf/asdf\")
+ (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)
+ (asdf:operate 'asdf:compile-op '${_pkgname})
+ (quit)" &> ${_compile_log_file} || return 1
+}
+_compile_cmucl() {
+ cmucl -quiet -nositeinit -noinit -eval \
+ "(load #p\"/usr/share/common-lisp/source/asdf/asdf\")
+ (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)
+ (asdf:operate 'asdf:compile-op '${_pkgname})
+ (quit)" &> ${_compile_log_file} || return 1
+}
+
+post_install() {
+ for _lispiter in ${_lisp[@]}; do
+ echo "---> Compiling lisp files using ${_lispiter} <---"
+ if [ $_compile_log = 'y' ]; then
+ _compile_log_file=/tmp/${_pkgname}_${_lispiter}.log
+ else
+ _compile_log_file=/dev/null
+ fi
+ _compile_${_lispiter}
+ echo "---> Done compiling lisp files (using ${_lispiter}) <---"
+ done
+
+ cat << EOM
+
+ To load this library, load asdf and then run the following lines
+ (or their equivalent for your lisp of choice):
+
+ (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*)
+ (asdf:operate 'asdf:load-op '${_pkgname})
+EOM
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ rm -f /usr/share/common-lisp/source/$_pkgname/{*.fas,*.fasl,*.lib,*.x86f}
+}
+
+op=$1
+shift
+
+$op $*
+
+# End of file \ No newline at end of file