summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhaofeng Li2020-03-03 00:38:46 -0800
committerZhaofeng Li2020-03-03 00:40:13 -0800
commit26d27233832f9c1f59a1cceef022738176d49751 (patch)
treeaeb1e5bd39ba4511d578d5b76f0e6e836df1bcda
parent4034468983f4d8193d113c7f4c0cffa441673503 (diff)
downloadaur-26d27233832f9c1f59a1cceef022738176d49751.tar.gz
Add ARM support
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD62
2 files changed, 66 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 55c439f9ee4..fc4b3c66b2c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,28 @@
-pkgbase = zotero
- pkgdesc = Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
+pkgbase = zotero-arm-bin
+ pkgdesc = Zotero Standalone is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources (ARM Binaries)
pkgver = 5.0.84
pkgrel = 1
url = http://www.zotero.org/download
install = zotero.install
- arch = x86_64
+ arch = aarch64
+ arch = armv7h
license = GPL3
depends = dbus-glib
depends = gtk2
depends = gtk3
depends = nss
depends = libxt
+ optdepends = poppler: PDF indexing
+ provides = zotero=5.0.84
+ conflicts = zotero
source = zotero.desktop
+ source = Zotero-5.0.84_linux_x86_64.tar.bz2::https://www.zotero.org/download/client/dl?channel=release&platform=linux-x86_64&version=5.0.84
sha256sums = 2e700ebe97d332a894be80d232b037b0117d84b38c5fa99dffc727cb10918228
- source_x86_64 = Zotero-5.0.84_linux_x86_64.tar.bz2::https://www.zotero.org/download/client/dl?channel=release&platform=linux-x86_64&version=5.0.84
- sha256sums_x86_64 = 96cafb3e982b894a4f56f124b0fbfc7c22e19097a5b23984997b0feebc247f56
+ sha256sums = 96cafb3e982b894a4f56f124b0fbfc7c22e19097a5b23984997b0feebc247f56
+ source_aarch64 = firefox.deb::http://launchpadlibrarian.net/373617392/firefox_60.0.2+build1-0ubuntu0.18.04.1_arm64.deb
+ sha256sums_aarch64 = cad6ea6f971431ece476bda7499b30293dc6b533c1c35a41d1c90f46a0393729
+ source_armv7h = firefox.deb::http://launchpadlibrarian.net/373609086/firefox_60.0.2+build1-0ubuntu0.18.04.1_armhf.deb
+ sha256sums_armv7h = cad6ea6f971431ece476bda7499b30293dc6b533c1c35a41d1c90f46a0393729
-pkgname = zotero
+pkgname = zotero-arm-bin
diff --git a/PKGBUILD b/PKGBUILD
index 561edaf3bdb..cef6ab7b74a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,46 @@
# Contributor: Juanma Hernandez <juanmah@gmail.com>
-# Maintainer: Juanma Hernandez <juanmah@gmail.com>
+# Maintainer: Zhaofeng Li <hello@zhaofeng.li>
-pkgname=zotero
+pkgname=zotero-arm-bin
pkgver=5.0.84
pkgrel=1
-pkgdesc="Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
-arch=('x86_64')
+pkgdesc="Zotero Standalone is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources (ARM Binaries)"
+arch=('aarch64' 'armv7h')
url="http://www.zotero.org/download"
license=('GPL3')
depends=('dbus-glib' 'gtk2' 'gtk3' 'nss' 'libxt')
-
-sha256sums=('2e700ebe97d332a894be80d232b037b0117d84b38c5fa99dffc727cb10918228')
-sha256sums_x86_64=('96cafb3e982b894a4f56f124b0fbfc7c22e19097a5b23984997b0feebc247f56')
+provides=("zotero=${pkgver}")
+conflicts=('zotero')
+optdepends=(
+ 'poppler: PDF indexing'
+)
install='zotero.install'
-source=("zotero.desktop")
-source_x86_64=("Zotero-${pkgver}_linux_$CARCH.tar.bz2::https://www.zotero.org/download/client/dl?channel=release&platform=linux-$CARCH&version=${pkgver}")
+source=(
+ "zotero.desktop"
+ "Zotero-${pkgver}_linux_x86_64.tar.bz2::https://www.zotero.org/download/client/dl?channel=release&platform=linux-x86_64&version=${pkgver}"
+)
+source_aarch64=(
+ "firefox.deb::http://launchpadlibrarian.net/373617392/firefox_60.0.2+build1-0ubuntu0.18.04.1_arm64.deb"
+)
+source_armv7h=(
+ "firefox.deb::http://launchpadlibrarian.net/373609086/firefox_60.0.2+build1-0ubuntu0.18.04.1_armhf.deb"
+)
+sha256sums=('2e700ebe97d332a894be80d232b037b0117d84b38c5fa99dffc727cb10918228'
+ '96cafb3e982b894a4f56f124b0fbfc7c22e19097a5b23984997b0feebc247f56')
+sha256sums_aarch64=('cad6ea6f971431ece476bda7499b30293dc6b533c1c35a41d1c90f46a0393729')
+sha256sums_armv7h=('cad6ea6f971431ece476bda7499b30293dc6b533c1c35a41d1c90f46a0393729')
+
+prepare() {
+ ar x firefox.deb data.tar.xz
+ tar xf data.tar.xz ./usr/lib/firefox --strip-components=3
+ rm data.tar.xz
+}
package() {
install -dDm755 "$pkgdir"/usr/{bin,lib/zotero}
- mv "$srcdir"/Zotero_linux-$CARCH/* "$pkgdir"/usr/lib/zotero
+ mv "$srcdir"/Zotero_linux-x86_64/* "$pkgdir"/usr/lib/zotero
ln -s /usr/lib/zotero/zotero "$pkgdir"/usr/bin/zotero
install -Dm644 "$srcdir"/zotero.desktop "$pkgdir"/usr/share/applications/zotero.desktop
# Copy zotero icons to a standard location
@@ -32,4 +52,26 @@ package() {
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
+
+ # Remove poppler binaries
+ rm "${pkgdir}/usr/lib/zotero/"{pdftotext,pdfinfo}
+
+ # Replace Firefox binaries
+ #
+ # I know you might want to vomit right now, but the official packaging
+ # script from Zotero does the exact same thing (downloading pre-built
+ # Firefox 60 binaries):
+ #
+ # https://github.com/zotero/zotero-standalone-build/blob/master/fetch_xulrunner.sh
+ #
+ # Please forgive me :P
+ rm "${pkgdir}/usr/lib/zotero/"**.{so,chk}
+ rm "${pkgdir}/usr/lib/zotero/gtk2/"*
+ rm -r "${pkgdir}/usr/lib/zotero/gmp-clearkey"
+ rm "${pkgdir}/usr/lib/zotero/"{updater,minidump-analyzer}
+ install -Dm755 firefox/*.{so,chk} "${pkgdir}/usr/lib/zotero/"
+ install -Dm755 firefox/gtk2/*.so "${pkgdir}/usr/lib/zotero/gtk2/"
+ install -Dm755 firefox/plugin-container "${pkgdir}/usr/lib/zotero/plugin-container"
+ install -Dm755 firefox/firefox "${pkgdir}/usr/lib/zotero/zotero-bin"
+ install -Dm644 firefox/dependentlibs.list "${pkgdir}/usr/lib/zotero/dependentlibs.list"
}