summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAman Grewal2019-03-25 18:02:05 -0400
committerAman Grewal2019-03-25 18:14:26 -0400
commit419458f24099760566561f45ed51a7e612bb3195 (patch)
tree7e008eeaade1383e4e40b781df7a2b7f56d2a083
parenta8132f7a8993a1ec77f86bc9d760fe611bc15b2e (diff)
downloadaur-419458f24099760566561f45ed51a7e612bb3195.tar.gz
Updates PKGBUILD to newer standards.
This removes cl-named-readtables-git.install. There's no need to compile the files at installation, and pre-remove hook doesn't do anything. Updates pkgver to follow upstream.
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD48
-rw-r--r--cl-named-readtables-git.install76
3 files changed, 27 insertions, 107 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 363c35a7afaa..eb0d1b5746a3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,9 @@
pkgbase = cl-named-readtables-git
- pkgdesc = Named-Readtables is a library that provides a namespace for readtables akin to the already-existing namespace of packages.
- pkgver = r69.ee15fc6
+ pkgdesc = A library that provides a namespace for readtables akin to the already-existing namespace of packages.
+ pkgver = 0.9.r20.g985b162
pkgrel = 1
- url = git://github.com/trivial-gray-streams/trivial-gray-streams
- install = cl-named-readtables-git.install
- arch = i686
- arch = x86_64
+ url = https://github.com/melisgl/named-readtables
+ arch = any
license = BSD
makedepends = git
depends = common-lisp
diff --git a/PKGBUILD b/PKGBUILD
index 7daed1ee3f3f..3e25d624f4e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,41 @@
+#Maintainer: Aman Grewal <agrewal at protonmail dot com>
#Contributor: Peter Mukhachev <rolling[dot]robot [shift-two] gmail [dot] com>
pkgname=cl-named-readtables-git
_clname=named-readtables # used in CL scope, not package scope
-_reldate=20140815
-pkgver=r69.ee15fc6
+pkgver=0.9.r20.g985b162
pkgrel=1
-pkgdesc="Named-Readtables is a library that provides a namespace for
+pkgdesc="A library that provides a namespace for
readtables akin to the already-existing namespace of packages."
-arch=('i686' 'x86_64')
-url=("git://github.com/trivial-gray-streams/trivial-gray-streams")
+arch=('any')
+url="https://github.com/melisgl/named-readtables"
license=('BSD')
depends=('common-lisp')
provides=('cl-named-readtables')
makedepends=('git')
-install=${pkgname}.install
-_gitname=("named-readtables")
source=('git+https://github.com/melisgl/named-readtables.git')
md5sums=('SKIP')
+
pkgver() {
- cd ${_gitname}
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- }
+ cd $_clname
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
package() {
- cd "${_gitname}"
- install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/src
- install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/test
- install -d ${pkgdir}/usr/share/common-lisp/systems
- install -d ${pkgdir}/usr/share/licenses/${pkgname}
+ install -Dm644 "$srcdir"/$_clname/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -d "$pkgdir"/usr/share/common-lisp/source/$_clname/src
+ install -d "$pkgdir"/usr/share/common-lisp/source/$_clname/test
+ install -d "$pkgdir"/usr/share/common-lisp/systems
- install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/src \
- ${srcdir}/${_clname}/src/*.lisp
- install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/test \
- ${srcdir}/${_clname}/test/*.lisp
- install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
- ${srcdir}/${_clname}/*.asd
- install -m 644 -t ${pkgdir}/usr/share/licenses/${pkgname} \
- ${srcdir}/${_clname}/LICENSE
+ install -m 644 -t "$pkgdir"/usr/share/common-lisp/source/$_clname/src \
+ "$srcdir"/$_clname/src/*.lisp
+ install -m 644 -t "$pkgdir"/usr/share/common-lisp/source/$_clname/test \
+ "$srcdir"/$_clname/test/*.lisp
+ install -m 644 -t "$pkgdir"/usr/share/common-lisp/source/$_clname \
+ "$srcdir"/$_clname/$_clname.asd
- cd ${pkgdir}/usr/share/common-lisp/systems
- ln -s ../source/${_clname}/${_clname}.asd .
+ cd "$pkgdir"/usr/share/common-lisp/systems
+ ln -s ../source/$_clname/$_clname.asd .
}
diff --git a/cl-named-readtables-git.install b/cl-named-readtables-git.install
deleted file mode 100644
index eefbe4ddcc57..000000000000
--- a/cl-named-readtables-git.install
+++ /dev/null
@@ -1,76 +0,0 @@
-# arg 1: the new package version
-
-_pkgname=named-readtables
-_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