makedeb


zotero 6.0.35-1


Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for zotero.

# Maintainer:  only_vip <onlyme_vip@protonmail.com>
pkgname=zotero
pkgver=6.0.35
pkgrel=1
pkgdesc="Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
arch=('amd64')
url="https://www.zotero.org/download"
license=('AGPL3')
depends=('libdbus-glib-1-2' 'libgtk-3-0' 'libnss3' 'libxt6')
source=("https://download.zotero.org/client/release/${pkgver}/Zotero-${pkgver}_linux-$CARCH.tar.bz2"
        "zotero.desktop"
        "zotero.install")
sha512sums=("f74574ecddba45c15f4cb61015969af0bdbc594e8f7f7707d6e5d6f6f74dca839b1f71cada2f5c66b530da28719a832ed0cc93c0684e948e17591a46fde50297"
            "e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb"
            "f5155d464a1e8fab71b92b62eebe9001788f7baf792413a08634c897c9ff35daadb418a0c11f2980d45ef2c00c0223062b58f46c450b962208e2ccca4d4d6f9e")
postinst='zotero.install'

package() {
  install -dDm755 "${pkgdir}/usr/"{bin,lib/zotero}
  mv "$srcdir/Zotero_linux-$CARCH/"* "${pkgdir}/usr/lib/zotero"
  ln -s "/usr/lib/zotero/zotero" "${pkgdir}/usr/bin/zotero"
  install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
  # Copy zotero icons to a standard location
  install -Dm644 "${pkgdir}/usr/lib/zotero/chrome/icons/default/default16.png" "${pkgdir}/usr/share/icons/hicolor/16x16/apps/zotero.png"
  install -Dm644 "${pkgdir}/usr/lib/zotero/chrome/icons/default/default32.png" "${pkgdir}/usr/share/icons/hicolor/32x32/apps/zotero.png"
  install -Dm644 "${pkgdir}/usr/lib/zotero/chrome/icons/default/default48.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/zotero.png"
  install -Dm644 "${pkgdir}/usr/lib/zotero/chrome/icons/default/default256.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/zotero.png"
  # Disable APP update
  sed -i '/pref("app.update.enabled", true);/c\pref("app.update.enabled", false);' "${pkgdir}/usr/lib/zotero/defaults/preferences/prefs.js"
  # No need to keep a shell around when launching Zotero
  sed -i -r 's/^("\$CALLDIR\/zotero-bin" -app "\$CALLDIR\/application.ini" "\$@")/exec \1/' "${pkgdir}/usr/lib/zotero/zotero"
}