PKGBUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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=0.14.2
  6. pkgrel=2
  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' 'electron17')
  12. makedepends=('asar')
  13. options=(!strip)
  14. source=(
  15. "${pkgname}.sh"
  16. "${pkgname}.desktop"
  17. "https://github.com/obsidianmd/obsidian-releases/releases/download/v${pkgver}/obsidian-${pkgver}.tar.gz"
  18. )
  19. sha256sums=('b5dcbbded25b7f65fd274eb9c98c4a4143e9c405074f97c5123c56df5482bd91'
  20. 'be67713e873a5935d910efc6f6005c104b35c7b3a002dfcb5643fd185d1b0056'
  21. '03ebaa4da657437b17b3cd8768469bd023e8bb3e4886d329f7dcafb9afb9f101')
  22. prepare() {
  23. cd "$srcdir"
  24. asar ef "${pkgname}-${pkgver}"/resources/obsidian.asar icon.png
  25. }
  26. package() {
  27. cd "$srcdir"
  28. # Install executable file
  29. install -Dm755 "$pkgname".sh "$pkgdir"/usr/bin/obsidian
  30. # Install desktop file
  31. install -Dm644 "$pkgname".desktop -t "$pkgdir"/usr/share/applications/
  32. install -Dm644 icon.png "$pkgdir"/usr/share/pixmaps/obsidian.png
  33. # Most of the release package is electron, but we use system's default one
  34. # So strip away asar packages and put them to /usr/lib/
  35. cd "${pkgname}-${pkgver}"/resources/
  36. install -dm0755 "$pkgdir"/usr/lib/obsidian
  37. find . -type d -exec install -d {,"$pkgdir"/usr/lib/obsidian/}{} \;
  38. find . -type f -exec install -D {,"$pkgdir"/usr/lib/obsidian/}{} \;
  39. }