user/zotero: upgrade to 7.0.0_git20240131
This commit is contained in:
parent
72e1de3224
commit
ca2f264713
4 changed files with 119 additions and 115 deletions
|
@ -1,16 +1,13 @@
|
||||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||||
|
|
||||||
pkgname=zotero
|
pkgname=zotero
|
||||||
pkgver=7.0.0_git20230415
|
pkgver=7.0.0_git20240131
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="A free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
|
pkgdesc="A free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
|
||||||
# fix firefox
|
arch="x86_64"
|
||||||
#arch="x86_64"
|
|
||||||
url="https://github.com/zotero/zotero"
|
url="https://github.com/zotero/zotero"
|
||||||
_giturl="https://lab.ilot.io/mirrors/zotero"
|
_giturl="https://lab.ilot.io/mirrors/zotero"
|
||||||
_gittag_client=7.0.0_20230415
|
_gittag_client=7.0.0._20240131
|
||||||
_gittag_standalone=7.0.0_20230415
|
|
||||||
_gittag_build=20230314
|
|
||||||
license="AGPL3"
|
license="AGPL3"
|
||||||
depends="
|
depends="
|
||||||
dbus-glib
|
dbus-glib
|
||||||
|
@ -31,10 +28,9 @@ makedepends="
|
||||||
"
|
"
|
||||||
source="
|
source="
|
||||||
zotero.desktop
|
zotero.desktop
|
||||||
xulrunner-get-alpine-firefox.diff
|
|
||||||
$_giturl-client/-/releases/$_gittag_client/downloads/tarball/zotero-client-$_gittag_client.tar.gz
|
$_giturl-client/-/releases/$_gittag_client/downloads/tarball/zotero-client-$_gittag_client.tar.gz
|
||||||
$_giturl-standalone-build/-/releases/$_gittag_standalone/downloads/tarball/zotero-standalone-build-$_gittag_standalone.tar.gz
|
xulrunner-get-alpine-firefox.patch
|
||||||
$_giturl-build/-/releases/$_gittag_build/downloads/tarball/zotero-build-$_gittag_build.tar.gz
|
build-sh-fix.patch
|
||||||
"
|
"
|
||||||
builddir="$srcdir"/zotero-client-$_gittag_client
|
builddir="$srcdir"/zotero-client-$_gittag_client
|
||||||
options="!check"
|
options="!check"
|
||||||
|
@ -42,53 +38,33 @@ options="!check"
|
||||||
prepare() {
|
prepare() {
|
||||||
default_prepare
|
default_prepare
|
||||||
|
|
||||||
ln -s "$srcdir"/zotero-client-$_gittag_client "$srcdir"/zotero-client
|
|
||||||
ln -s "$srcdir"/zotero-build-$_gittag_build "$srcdir"/zotero-build
|
|
||||||
|
|
||||||
git init
|
git init
|
||||||
git commit --allow-empty -m 'Initial'
|
git commit --allow-empty -m 'Initial'
|
||||||
|
|
||||||
npm i --legacy-peer-deps
|
|
||||||
|
|
||||||
cd "$srcdir"/zotero-standalone-build*
|
|
||||||
patch -p1 -i "$srcdir"/xulrunner-get-alpine-firefox.diff
|
|
||||||
# We need to had '.git/HEAD' and '.git/config' to the archive as the build expects those
|
|
||||||
mkdir .git
|
|
||||||
echo '[remote "origin"]\nurl="http://github.com/zotero/zotero-standalone-build"' > .git/config
|
|
||||||
echo "$_gittag_standalone" > .git/HEAD
|
|
||||||
|
|
||||||
./fetch_xulrunner.sh -p l
|
|
||||||
./fetch_pdftools
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
npm i --legacy-peer-deps
|
||||||
NODE_OPTIONS=--openssl-legacy-provider npm run build
|
NODE_OPTIONS=--openssl-legacy-provider npm run build
|
||||||
|
|
||||||
cd "$srcdir"/zotero-standalone-build*
|
SKIP_32=1 app/scripts/dir_build -p l
|
||||||
scripts/dir_build -p l
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -dDm755 "$pkgdir"/usr/bin
|
install -dDm755 "$pkgdir"/usr/bin
|
||||||
install -dDm755 "$pkgdir"/usr/lib/zotero
|
install -dDm755 "$pkgdir"/usr/lib/zotero
|
||||||
cp -r "$srcdir"/zotero-standalone-build*/staging/Zotero_linux-$CARCH/* "$pkgdir/usr/lib/zotero"
|
cp -r "$builddir"/app/staging/Zotero_linux-$CARCH/* "$pkgdir/usr/lib/zotero"
|
||||||
rm "$pkgdir/usr/lib/zotero/updater"
|
|
||||||
ln -s /usr/lib/zotero/zotero "$pkgdir/usr/bin/zotero"
|
ln -s /usr/lib/zotero/zotero "$pkgdir/usr/bin/zotero"
|
||||||
install -Dm644 "$srcdir/zotero.desktop" "$pkgdir/usr/share/applications/zotero.desktop"
|
install -Dm644 "$srcdir/zotero.desktop" "$pkgdir/usr/share/applications/zotero.desktop"
|
||||||
|
|
||||||
# Copy zotero icons to a standard location
|
# 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/icons/icon128.png" "$pkgdir/usr/share/icons/hicolor/128x128/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"
|
|
||||||
|
|
||||||
# Close shell when launching
|
# Close shell when launching
|
||||||
sed -i -r 's:^("\$CALLDIR/zotero-bin" -app "\$CALLDIR/application.ini" "\$@"):exec \1:' "$pkgdir/usr/lib/zotero/zotero"
|
sed -i -r 's:^("\$CALLDIR/zotero-bin" -app "\$CALLDIR/application.ini" "\$@"):exec \1:' "$pkgdir/usr/lib/zotero/zotero"
|
||||||
}
|
}
|
||||||
sha512sums="
|
sha512sums="
|
||||||
e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb zotero.desktop
|
e1a0a4ff5cc1b53f13776ca11927d671426b0691e78e74a4adf2166d57bb2ae8ac409cc11a37ce5e2f680fdf05d5bc3849c33a9717aca1bb62d03ae5231a67fb zotero.desktop
|
||||||
1002732c348e3caceb077b8595a3a8b5c15dc17bc9c443e8dc96f8efe82ee37d9b5d7241530d82188846007504a277fd261763a4c64c3c259d9130db3139043d xulrunner-get-alpine-firefox.diff
|
27ca570df108cb9ffa48254f7cc5ef133371dcab652a12b2f636b87a2378d51afa6c118533d8b1779071441fa2b26663d2275db9d441f17dc7431dfdc90996ea zotero-client-7.0.0._20240131.tar.gz
|
||||||
88ae8204fde34bd6b1595ddddc153ded3a3bfcaeb5d65ffd8398d58f41787ddd2ff35051c4f74e0c83483b6ec234f1bf987acbebccfe73ad31be5cb4b55cc403 zotero-client-7.0.0_20230415.tar.gz
|
74c99ba1dd4b23cb696936e18df9c4f55e178bf578818c1a858788c5ff261f8459f992cf4b59eed40e71d8143b4ee14e0a86ad558c2e376866afed52c1f6d74d xulrunner-get-alpine-firefox.patch
|
||||||
2dad54ac1a75e9ed62eec9fe08081e6807ce0167992059d3b7cd7aee3fb4803c694dc852ffe27f82cbe162c7536f2d77c302a8f947b507c6548f729a8c9d3057 zotero-standalone-build-7.0.0_20230415.tar.gz
|
4e897cafc05eefbaf433cc17876d2c8c33f6a244b85418a9dd0e0c6b22528c770f175999ad5deaedeac4d4109496683879ac8420aa489230aad1800571790dfa build-sh-fix.patch
|
||||||
8379985c0da84d82bdba72a03daaf3afe80a30ef696a2da837cff12b23fdec75b62dd43061ede4687c6acc756181ecefd0a025a7fedce500137faba4ae3326ae zotero-build-20230314.tar.gz
|
|
||||||
"
|
"
|
||||||
|
|
44
user/zotero/build-sh-fix.patch
Normal file
44
user/zotero/build-sh-fix.patch
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
diff --git a/app/build.sh.orig b/app/build.sh
|
||||||
|
index 649d629..642ce81 100755
|
||||||
|
--- a/app/build.sh.orig
|
||||||
|
+++ b/app/build.sh
|
||||||
|
@@ -59,10 +59,7 @@ function abspath {
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_lfs_file {
|
||||||
|
- if [ "$(head --bytes 5 "$1")" = "versi" ]; then
|
||||||
|
- echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
+ return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
SOURCE_DIR=""
|
||||||
|
@@ -840,18 +837,13 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||||
|
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
|
||||||
|
|
||||||
|
# Use our own launcher that calls the original Firefox executable with -app
|
||||||
|
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
|
||||||
|
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
|
||||||
|
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
|
||||||
|
|
||||||
|
# Copy Ubuntu launcher files
|
||||||
|
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
|
||||||
|
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
|
||||||
|
|
||||||
|
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
|
||||||
|
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
|
||||||
|
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
|
||||||
|
- chmod 755 "$APPDIR/updater"
|
||||||
|
-
|
||||||
|
# Copy app files
|
||||||
|
rsync -a "$base_dir/" "$APPDIR/"
|
||||||
|
|
||||||
|
@@ -860,6 +852,7 @@ if [ $BUILD_LINUX == 1 ]; then
|
||||||
|
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
|
||||||
|
|
||||||
|
# Copy icons
|
||||||
|
+ mkdir -p "$APPDIR"/icons
|
||||||
|
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
|
||||||
|
cp "$CALLDIR/linux/icons/symbolic.svg" "$APPDIR/icons/"
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
diff --git a/fetch_xulrunner.sh.orig b/fetch_xulrunner.sh
|
|
||||||
index b1e812f..ca3caa5 100755
|
|
||||||
--- a/fetch_xulrunner.sh.orig
|
|
||||||
+++ b/fetch_xulrunner.sh
|
|
||||||
@@ -114,15 +114,6 @@ function modify_omni {
|
|
||||||
replace_line 'MOZ_CRASHREPORTER:' 'MOZ_CRASHREPORTER: false \&\&' modules/AppConstants.jsm
|
|
||||||
replace_line 'MOZ_UPDATE_CHANNEL:.+' 'MOZ_UPDATE_CHANNEL: "none",' modules/AppConstants.jsm
|
|
||||||
replace_line '"https:\/\/[^\/]+mozilla.com.+"' '""' modules/AppConstants.jsm
|
|
||||||
-
|
|
||||||
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
|
|
||||||
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
|
|
||||||
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
|
|
||||||
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- if (!updateAuto) {' modules/UpdateService.jsm
|
|
||||||
-
|
|
||||||
replace_line 'pref\("network.captive-portal-service.enabled".+' 'pref("network.captive-portal-service.enabled", false);' greprefs.js
|
|
||||||
replace_line 'pref\("network.connectivity-service.enabled".+' 'pref("network.connectivity-service.enabled", false);' greprefs.js
|
|
||||||
replace_line 'pref\("toolkit.telemetry.server".+' 'pref("toolkit.telemetry.server", "");' greprefs.js
|
|
||||||
@@ -368,31 +359,13 @@ fi
|
|
||||||
|
|
||||||
if [ $BUILD_LINUX == 1 ]; then
|
|
||||||
GECKO_VERSION="$GECKO_VERSION_LINUX"
|
|
||||||
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
|
||||||
|
|
||||||
- rm -rf firefox
|
|
||||||
-
|
|
||||||
- curl -O "$DOWNLOAD_URL/linux-i686/en-US/firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
- rm -rf firefox-i686
|
|
||||||
- tar xvf firefox-$GECKO_VERSION.tar.bz2
|
|
||||||
- mv firefox firefox-i686
|
|
||||||
-
|
|
||||||
- pushd firefox-i686
|
|
||||||
- modify_omni linux32
|
|
||||||
- popd
|
|
||||||
-
|
|
||||||
- rm "firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
-
|
|
||||||
- curl -O "$DOWNLOAD_URL/linux-x86_64/en-US/firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
rm -rf firefox-x86_64
|
|
||||||
- tar xvf firefox-$GECKO_VERSION.tar.bz2
|
|
||||||
- mv firefox firefox-x86_64
|
|
||||||
-
|
|
||||||
- pushd firefox-x86_64
|
|
||||||
- modify_omni linux64
|
|
||||||
- popd
|
|
||||||
-
|
|
||||||
- rm "firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
+ cp -r /usr/lib/firefox-esr firefox-x86_64
|
|
||||||
+
|
|
||||||
+ pushd firefox-x86_64
|
|
||||||
+ modify_omni linux64
|
|
||||||
+ popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo Done
|
|
||||||
diff --git a/build.sh.orig b/build.sh
|
|
||||||
index 893f9fb..51ae170 100755
|
|
||||||
--- a/build.sh.orig
|
|
||||||
+++ b/build.sh
|
|
||||||
@@ -794,7 +794,7 @@ fi
|
|
||||||
|
|
||||||
# Linux
|
|
||||||
if [ $BUILD_LINUX == 1 ]; then
|
|
||||||
- for arch in "i686" "x86_64"; do
|
|
||||||
+ for arch in "x86_64"; do
|
|
||||||
runtime_path="${LINUX_RUNTIME_PATH_PREFIX}${arch}"
|
|
||||||
|
|
||||||
# Set up directory
|
|
||||||
@@ -807,7 +807,7 @@ if [ $BUILD_LINUX == 1 ]; then
|
|
||||||
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
|
|
||||||
|
|
||||||
# Use our own launcher that calls the original Firefox executable with -app
|
|
||||||
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
|
|
||||||
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
|
|
||||||
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
|
|
||||||
|
|
||||||
# Copy Ubuntu launcher files
|
|
63
user/zotero/xulrunner-get-alpine-firefox.patch
Normal file
63
user/zotero/xulrunner-get-alpine-firefox.patch
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
diff --git a/app/scripts/fetch_xulrunner.orig b/app/scripts/fetch_xulrunner
|
||||||
|
index 8b3d918..c6a96ff 100755
|
||||||
|
--- a/app/scripts/fetch_xulrunner.orig
|
||||||
|
+++ b/app/scripts/fetch_xulrunner
|
||||||
|
@@ -132,15 +132,6 @@ function modify_omni {
|
||||||
|
# Continue using app.update.auto in prefs.js on Windows
|
||||||
|
replace_line 'PER_INSTALLATION_PREFS_PLATFORMS = \["win"\]' 'PER_INSTALLATION_PREFS_PLATFORMS = []' modules/UpdateUtils.jsm
|
||||||
|
|
||||||
|
- # Prompt if major update is available instead of installing automatically on restart
|
||||||
|
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
|
||||||
|
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
|
||||||
|
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
|
||||||
|
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- if (!updateAuto) {' modules/UpdateService.jsm
|
||||||
|
-
|
||||||
|
# Avoid console warning about resource://gre/modules/FxAccountsCommon.js
|
||||||
|
replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.jsm
|
||||||
|
|
||||||
|
@@ -470,36 +461,15 @@ fi
|
||||||
|
|
||||||
|
if [ $BUILD_LINUX == 1 ]; then
|
||||||
|
GECKO_VERSION="$GECKO_VERSION_LINUX"
|
||||||
|
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
||||||
|
|
||||||
|
+ rm -rf firefox-x86_64
|
||||||
|
|
||||||
|
- # Include 32-bit build if not in CI
|
||||||
|
- if [[ "${CI:-}" = "1" ]] || [[ "${SKIP_32:-}" = "1" ]]; then
|
||||||
|
- arches="x86_64"
|
||||||
|
- else
|
||||||
|
- arches="i686 x86_64"
|
||||||
|
- fi
|
||||||
|
- for arch in $arches; do
|
||||||
|
- xdir="firefox-$arch"
|
||||||
|
- rm -rf $xdir
|
||||||
|
-
|
||||||
|
- archived_file="firefox-$GECKO_VERSION-$arch.tar.bz2"
|
||||||
|
- if [ -e "$archived_file" ]; then
|
||||||
|
- echo "Using $archived_file"
|
||||||
|
- cp "$archived_file" "firefox-$GECKO_VERSION.tar.bz2"
|
||||||
|
- else
|
||||||
|
- curl -O "$DOWNLOAD_URL/linux-$arch/en-US/firefox-$GECKO_VERSION.tar.bz2"
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
- tar xvf firefox-$GECKO_VERSION.tar.bz2
|
||||||
|
- mv firefox firefox-$arch
|
||||||
|
+ cp -r /usr/lib/firefox-esr firefox-x86_64
|
||||||
|
+
|
||||||
|
+ pushd firefox-x86_64
|
||||||
|
+ modify_omni linux64
|
||||||
|
+ popd
|
||||||
|
|
||||||
|
- pushd firefox-$arch
|
||||||
|
- modify_omni
|
||||||
|
- popd
|
||||||
|
- echo $($SCRIPT_DIR/xulrunner_hash -p l) > hash-linux
|
||||||
|
- rm "firefox-$GECKO_VERSION.tar.bz2"
|
||||||
|
- done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Done
|
Loading…
Reference in a new issue