PKGBUILD 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Maintainer: txtsd <aur.archlinux@ihavea.quest>
  2. # Contributor: 01189998819991197253 <dev.ben01189998819991197253+aur@gmail.com>
  3. # Contributor: winlu <derwinlu AT gmail DOT com>
  4. pkgname=soundsense
  5. _pkgver="2016-1_196"
  6. pkgver=${_pkgver//-/_}
  7. pkgrel=2
  8. pkgdesc="A sound-engine tool for Dwarf Fortress."
  9. arch=("any")
  10. url="http://df.zweistein.cz/soundsense/"
  11. license=("custom")
  12. install="soundsense.install"
  13. depends=("java-runtime" "bash")
  14. makedepends=("coreutils"
  15. "unzip")
  16. source=("http://df.zweistein.cz/soundsense/soundSense_${_pkgver}.zip"
  17. "soundsense.install")
  18. sha256sums=('4b8771e36b3ec6c36a7f5447b05638418636c0ae6e90049568737f999f3f0850'
  19. 'fe554352d1224146736ded6e3bcf3319c286291828b192c9727cd185e0bd74c6')
  20. DEST="/opt/soundsense"
  21. prepare() {
  22. cd "${srcdir}/${pkgname}"
  23. # fix line breaks
  24. sed -i $'s/\r$//' soundSense.sh
  25. # set correct working dir
  26. sed -i 's:${0\%/\*}:'"${DEST}"':' soundSense.sh
  27. unzip -q -o packSkeletons.zip
  28. }
  29. package() {
  30. # install runner
  31. install -Dm755 "${srcdir}/${pkgname}/soundSense.sh" "${pkgdir}/usr/bin/soundsense"
  32. # rm unneeded files
  33. rm "${srcdir}/${pkgname}/"*.{cmd,exe,zip,sh}
  34. # copy over and set permissions
  35. install -dm755 -o root -g games "${pkgdir}${DEST}"
  36. cp -r "${srcdir}/${pkgname}/." "${pkgdir}${DEST}"
  37. chown root:games -R "${pkgdir}${DEST}"
  38. find "${pkgdir}${DEST}/" -type d -exec chmod 6775 {} +
  39. find "${pkgdir}${DEST}/" -type f -exec chmod 664 {} +
  40. }