diff --git a/cl-ppcre/PKGBUILD b/cl-ppcre/PKGBUILD new file mode 100644 index 0000000..2a413a7 --- /dev/null +++ b/cl-ppcre/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: George Rawlinson + +pkgbase=cl-ppcre +pkgname=('cl-ppcre' 'cl-ppcre-unicode') +pkgver=2.1.1.r3.gb4056c5 +pkgrel=1 +pkgdesc='Perl-compatible portable regexp library for Common Lisp' +arch=('any') +url='https://edicl.github.io/cl-ppcre/' +license=('BSD') +depends=('common-lisp' 'cl-asdf') +makedepends=('git' 'sbcl') +_commit='b4056c5aecd9304e80abced0ef9c89cd66ecfb5e' +source=("$pkgbase::git+https://github.com/edicl/cl-ppcre#commit=$_commit") +b2sums=('SKIP') + +pkgver() { + cd "$pkgbase" + + git describe --tags | sed -e 's/^v//' -e 's/-/.r/' -e 's/-/./g' +} + +package_cl-ppcre() { + cd "$pkgbase" + + # create directories + install -vd \ + "$pkgdir/usr/share/common-lisp/source/$pkgname" \ + "$pkgdir/usr/share/common-lisp/systems" + + # library + cp -vr test ./*.lisp "$pkgname.asd" "$pkgdir/usr/share/common-lisp/source/$pkgname" + + pushd "$pkgdir/usr/share/common-lisp/systems" + ln -s "../source/$pkgname/$pkgname.asd" . + popd + + # documentation + install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md docs/index.html + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +} + +package_cl-ppcre-unicode() { + depends+=('cl-unicode' 'cl-ppcre') + pkgdesc+=' (Unicode)' + + cd "$pkgbase" + + # create directories + install -vd \ + "$pkgdir/usr/share/common-lisp/source/$pkgname" \ + "$pkgdir/usr/share/common-lisp/systems" + + # library + install -vDm644 -t "$pkgdir/usr/share/common-lisp/source/$pkgname" "$pkgname"/*.lisp "$pkgname.asd" + + pushd "$pkgdir/usr/share/common-lisp/systems" + ln -s "../source/$pkgname/$pkgname.asd" . + popd + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +}