PKGBUILD 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. pkgname='urn-lang-git'
  2. pkgver=0.7.2.r57.g64ad9f8
  3. pkgrel=1
  4. pkgdesc='Yet another Lisp dialect which compiles to Lua'
  5. source=('urn::git+https://gitlab.com/urn/urn.git#branch=master')
  6. md5sums=('SKIP')
  7. arch=('any')
  8. url='http://urn-lang.com/'
  9. license=('BSD')
  10. depends=('lua>=5.1')
  11. optdepends=('luajit: readline support'
  12. 'luarocks: readline or linenoise rock support')
  13. provides=('urn-lang')
  14. conflicts=('urn-git')
  15. pkgver() {
  16. cd "${srcdir}/urn"
  17. git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  18. }
  19. build() {
  20. cd "${srcdir}/urn"
  21. make all
  22. make all
  23. }
  24. check() {
  25. cd "${srcdir}/urn"
  26. make QUIET=1 test
  27. }
  28. package() {
  29. cd "${srcdir}/urn"
  30. install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
  31. install -dm755 "${pkgdir}/usr/bin"
  32. install -dm755 "${pkgdir}/usr/share/urn"
  33. install -dm755 "${pkgdir}/usr/lib/urn"
  34. find bin lib plugins -type d -exec install -dm755 "${pkgdir}/usr/share/urn/{}" \;
  35. find lib plugins -type f -exec install -m644 "{}" "${pkgdir}/usr/share/urn/{}" \;
  36. find bin -type f -exec install -m755 "{}" "${pkgdir}/usr/share/urn/{}" \;
  37. cat << EOF > "${pkgdir}/usr/bin/urn"
  38. #!/usr/bin/env sh
  39. exec lua /usr/share/urn/bin/urn.lua -i /usr/lib/urn -i ~/.local/lib/urn "\$@"
  40. EOF
  41. chmod 755 "${pkgdir}/usr/bin/urn"
  42. cp "${srcdir}/urn/LICENCE" "${pkgdir}/usr/share/licenses/${pkgname}"
  43. }