PKGBUILD 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
  2. # Contributor: Gennadiy Mykhailiuta <gmykhailiuta@gmail.com>
  3. # Contributor: Xuanwo <xuanwo@archlinuxcn.org>
  4. pkgname=obsidian
  5. pkgver=1.4.16
  6. pkgrel=1
  7. pkgdesc="A powerful knowledge base that works on top of a local folder of plain text Markdown files"
  8. arch=('x86_64')
  9. url="https://obsidian.md/"
  10. license=('custom:Commercial')
  11. depends=('zlib' 'hicolor-icon-theme' 'fuse' 'electron', 'xdg-utils')
  12. makedepends=('asar')
  13. options=(!strip)
  14. source=("obsidian.sh"
  15. "obsidian.desktop"
  16. "https://github.com/obsidianmd/obsidian-releases/releases/download/v${pkgver}/obsidian-${pkgver}.tar.gz"
  17. )
  18. sha256sums=('b5dcbbded25b7f65fd274eb9c98c4a4143e9c405074f97c5123c56df5482bd91'
  19. 'be67713e873a5935d910efc6f6005c104b35c7b3a002dfcb5643fd185d1b0056'
  20. '3c128b1acdcc6726ab48c8969e3a98eddf5b42b2aedae2c0bcb52e7e91cbc5cc')
  21. prepare() {
  22. cd "$srcdir"
  23. asar ef "${pkgname}-${pkgver}"/resources/obsidian.asar icon.png
  24. }
  25. package() {
  26. cd "$srcdir"
  27. # Install executable file
  28. install -Dm755 "$pkgname".sh "$pkgdir"/usr/bin/obsidian
  29. # Install desktop file
  30. install -Dm644 "$pkgname".desktop -t "$pkgdir"/usr/share/applications/
  31. install -Dm644 icon.png "$pkgdir"/usr/share/pixmaps/obsidian.png
  32. # Most of the release package is electron, but we use system's default one
  33. # So strip away asar packages and put them to /usr/lib/
  34. cd "${pkgname}-${pkgver}"/resources/
  35. install -dm0755 "$pkgdir"/usr/lib/obsidian
  36. find . -type d -exec install -d {,"$pkgdir"/usr/lib/obsidian/}{} \;
  37. find . -type f -exec install -D {,"$pkgdir"/usr/lib/obsidian/}{} \;
  38. }