diff options
author | Bao Trinh | 2021-08-23 00:42:04 -0500 |
---|---|---|
committer | Bao Trinh | 2021-08-23 00:50:52 -0500 |
commit | e05796539368b5a3bfd3b01e438d2ae151c3c908 (patch) | |
tree | f70cc60da44ee7bb58e77827d73f434bbfb448cb | |
parent | e03c3fd5ba28fc5cac325ad1dff5d00432c36480 (diff) | |
download | aur-e05796539368b5a3bfd3b01e438d2ae151c3c908.tar.gz |
Update PKGBUILD
brings it more in line with the main `zotero` AUR package
replaces sed commands and included file with patches to upstream's files
moves main dir the more standard place (/usr/lib instead of /usr/share)
fixed permissions on icon files
fixes `/usr/bin/zotero` symlink
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 48 | ||||
-rw-r--r-- | zotero-absolute-path-fix.patch | 23 | ||||
-rw-r--r-- | zotero-desktop-mimetype-fix.patch | 9 | ||||
-rw-r--r-- | zotero-disable-update.patch | 12 | ||||
-rw-r--r-- | zotero.desktop | 8 |
6 files changed, 85 insertions, 38 deletions
@@ -1,7 +1,7 @@ pkgbase = zotero-beta pkgdesc = Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share research. pkgver = 5.0.97beta.38 - pkgrel = 1 + pkgrel = 2 url = https://www.zotero.org/support/dev_builds arch = x86_64 arch = i686 @@ -32,16 +32,17 @@ pkgbase = zotero-beta depends = libxrender depends = libxt depends = nss + provides = zotero conflicts = zotero - conflicts = zotero-dev-bin - conflicts = zotero-dev - conflicts = jurism - conflicts = zotero-git - source = zotero.desktop - sha256sums = 17d1a0892d7a516e4f9d732de21ee595d9168d7554ca34b11cdd255795b22eaa - source_x86_64 = https://www.zotero.org/download/standalone/dl?platform=linux-x86_64&channel=beta - sha256sums_x86_64 = SKIP - source_i686 = https://www.zotero.org/download/standalone/dl?platform=linux-i686&channel=beta - sha256sums_i686 = SKIP + source = zotero-absolute-path-fix.patch + source = zotero-disable-update.patch + source = zotero-desktop-mimetype-fix.patch + sha256sums = 7b23d5238430701c1f5cc6f81dfd9b9f67cc643d506e42aa0e62aba5a58191fa + sha256sums = 94211568bbd206d10f1c1e0a2565905fcd27c8586835b7aef6458e657caa8213 + sha256sums = 09752d833320d195ce5f8a65ef900edcda85816c3de210a572871fdfbb92e97a + source_x86_64 = Zotero-5.0.97beta.38_linux_x86_64.tar.bz2::https://www.zotero.org/download/client/dl?channel=beta&platform=linux-x86_64 + sha256sums_x86_64 = 72f16491fb311f1da9a7b9ed47b96463a629efb6ef28a9f603a17ee4f8b0b618 + source_i686 = Zotero-5.0.97beta.38_linux_i686.tar.bz2::https://www.zotero.org/download/client/dl?channel=beta&platform=linux-i686 + sha256sums_i686 = 00a92288922e129dc5fffb6716c35394165a2d4c171e0750949222c1186c74ee pkgname = zotero-beta @@ -1,14 +1,15 @@ -# Maintainer: Malacology <guoyizhang at malacology dot com> +# Maintainer: Bao <qubidt at gmail dot com> # Contributor: Malacology <guoyizhang at malacology dot com> pkgname=zotero-beta _pkgname=zotero-beta pkgver=5.0.97beta.38 -pkgrel=1 +pkgrel=2 pkgdesc="Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share research." arch=('x86_64' 'i686') url="https://www.zotero.org/support/dev_builds" -conflicts=('zotero' 'zotero-dev-bin' 'zotero-dev' 'jurism' 'zotero-git') +conflicts=('zotero') +provides=('zotero') license=('AGPL3') depends=( 'aarch64-linux-gnu-gcc' @@ -38,23 +39,32 @@ depends=( 'libxt' 'nss' ) -source=('zotero.desktop') -source_i686=("https://www.zotero.org/download/standalone/dl?platform=linux-i686&channel=beta") -source_x86_64=("https://www.zotero.org/download/standalone/dl?platform=linux-x86_64&channel=beta") -sha256sums=('17d1a0892d7a516e4f9d732de21ee595d9168d7554ca34b11cdd255795b22eaa') -sha256sums_x86_64=('SKIP') -sha256sums_i686=('SKIP') +source=('zotero-absolute-path-fix.patch' + 'zotero-disable-update.patch' + 'zotero-desktop-mimetype-fix.patch') +source_x86_64=("Zotero-${pkgver}_linux_x86_64.tar.bz2::https://www.zotero.org/download/client/dl?channel=beta&platform=linux-x86_64") +source_i686=("Zotero-${pkgver}_linux_i686.tar.bz2::https://www.zotero.org/download/client/dl?channel=beta&platform=linux-i686") +sha256sums=('7b23d5238430701c1f5cc6f81dfd9b9f67cc643d506e42aa0e62aba5a58191fa' + '94211568bbd206d10f1c1e0a2565905fcd27c8586835b7aef6458e657caa8213' + '09752d833320d195ce5f8a65ef900edcda85816c3de210a572871fdfbb92e97a') +sha256sums_x86_64=('72f16491fb311f1da9a7b9ed47b96463a629efb6ef28a9f603a17ee4f8b0b618') +sha256sums_i686=('00a92288922e129dc5fffb6716c35394165a2d4c171e0750949222c1186c74ee') -package() { - install -dDm755 "$pkgdir"/usr/{bin,share/zotero,share/applications} - mv "$srcdir"/Zotero_linux-x86_64/* "$pkgdir"/usr/share/zotero - ln -s "$pkgdir"/usr/share/zotero/zotero "$pkgdir"/usr/bin/zotero - install -Dm755 "$srcdir"/zotero.desktop "$pkgdir"/usr/share/applications/zotero.desktop +prepare() { + patch --directory="Zotero_linux-$CARCH" --forward --strip=1 --input="${srcdir}/zotero-absolute-path-fix.patch" + patch --directory="Zotero_linux-$CARCH" --forward --strip=1 --input="${srcdir}/zotero-desktop-mimetype-fix.patch" + patch --directory="Zotero_linux-$CARCH" --forward --strip=1 --input="${srcdir}/zotero-disable-update.patch" +} - install -Dm755 "$pkgdir"/usr/share/zotero/chrome/icons/default/default16.png "$pkgdir"/usr/share/icons/hicolor/16x16/apps/zotero.png - install -Dm755 "$pkgdir"/usr/share/zotero/chrome/icons/default/default32.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/zotero.png - install -Dm755 "$pkgdir"/usr/share/zotero/chrome/icons/default/default48.png "$pkgdir"/usr/share/icons/hicolor/48x48/apps/zotero.png - install -Dm755 "$pkgdir"/usr/share/zotero/chrome/icons/default/default256.png "$pkgdir"/usr/share/icons/hicolor/256x256/apps/zotero.png +package() { + install -dDm755 "$pkgdir"/usr/{bin,lib/zotero,share/applications} + mv "${srcdir}/Zotero_linux-${CARCH}"/* "$pkgdir"/usr/lib/zotero + ln -s /usr/lib/zotero/zotero "$pkgdir"/usr/bin/zotero + ln -s /usr/lib/zotero/zotero.desktop "$pkgdir"/usr/share/applications/zotero.desktop - sed -i -r 's/^("\$CALLDIR\/zotero-bin" -app "\$CALLDIR\/application.ini" "\$@")/exec \1/' "$pkgdir"/usr/share/zotero/zotero + # 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 } diff --git a/zotero-absolute-path-fix.patch b/zotero-absolute-path-fix.patch new file mode 100644 index 000000000000..2b7a722aa88f --- /dev/null +++ b/zotero-absolute-path-fix.patch @@ -0,0 +1,23 @@ +diff --unified --recursive --text Zotero_linux-x86_64.orig/zotero Zotero_linux-x86_64.new/zotero +--- Zotero_linux-x86_64.orig/zotero 2021-08-21 01:09:56.000000000 -0500 ++++ Zotero_linux-x86_64.new/zotero 2021-08-22 23:41:17.347839213 -0500 +@@ -9,5 +9,4 @@ + # Current hard-limit on Ubuntu 16.10 is 4096 + ulimit -n 4096 + +-CALLDIR="$(dirname "$(readlink -f "$0")")" +-"$CALLDIR/zotero-bin" -app "$CALLDIR/application.ini" "$@" ++exec "/usr/lib/zotero/zotero-bin" -app "/usr/lib/zotero/application.ini" "$@" +diff --unified --recursive --text Zotero_linux-x86_64.orig/zotero.desktop Zotero_linux-x86_64.new/zotero.desktop +--- Zotero_linux-x86_64.orig/zotero.desktop 2021-08-21 01:09:56.000000000 -0500 ++++ Zotero_linux-x86_64.new/zotero.desktop 2021-08-22 23:39:50.502252665 -0500 +@@ -1,7 +1,7 @@ + [Desktop Entry] + Name=Zotero +-Exec=bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\/\///')))/zotero -url %U" +-Icon=zotero.ico ++Exec=/usr/lib/zotero/zotero -url %U ++Icon=zotero + Type=Application + Terminal=false + Categories=Office; diff --git a/zotero-desktop-mimetype-fix.patch b/zotero-desktop-mimetype-fix.patch new file mode 100644 index 000000000000..ae659e5c95fd --- /dev/null +++ b/zotero-desktop-mimetype-fix.patch @@ -0,0 +1,9 @@ +diff --unified --recursive --text Zotero_linux-x86_64.orig/zotero.desktop Zotero_linux-x86_64.new/zotero.desktop +--- Zotero_linux-x86_64.orig/zotero.desktop 2021-08-23 00:21:55.657909907 -0500 ++++ Zotero_linux-x86_64.new/zotero.desktop 2021-08-23 00:22:21.654980255 -0500 +@@ -5,4 +5,4 @@ + Type=Application + Terminal=false + Categories=Office; +-MimeType=text/plain ++MimeType=x-scheme-handler/zotero diff --git a/zotero-disable-update.patch b/zotero-disable-update.patch new file mode 100644 index 000000000000..6a675b720f4a --- /dev/null +++ b/zotero-disable-update.patch @@ -0,0 +1,12 @@ +diff --unified --recursive --text Zotero_linux-x86_64.orig/defaults/preferences/prefs.js Zotero_linux-x86_64.new/defaults/preferences/prefs.js +--- Zotero_linux-x86_64.orig/defaults/preferences/prefs.js 2021-08-21 01:09:56.000000000 -0500 ++++ Zotero_linux-x86_64.new/defaults/preferences/prefs.js 2021-08-22 23:56:17.907278388 -0500 +@@ -104,7 +104,7 @@ + + /** The below is imported from https://developer.mozilla.org/en/XULRunner/Application_Update **/ + // Whether or not app updates are enabled +-pref("app.update.enabled", true); ++pref("app.update.enabled", false); + + // This preference turns on app.update.mode and allows automatic download and + // install to take place. We use a separate boolean toggle for this to make diff --git a/zotero.desktop b/zotero.desktop deleted file mode 100644 index 568474342919..000000000000 --- a/zotero.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Zotero -Exec=/usr/share/zotero/zotero --url %u -Icon=zotero -Type=Application -Terminal=false -Categories=Office; -MimeType=text/plain |