-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Package]: Zotero 7 #22503
Comments
Alpine's Zotero build script and patches here: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/zotero |
Zotero seems to heavily utilize a system called Fluent, which as far as I'm aware we do not have any other package that uses that.
That's a hell of a lot of patches. I'll leave this PR open and add the help wanted tag to it, |
Hi! I am the maintainer who ported Zotero to Alpine. Most of the patches are to get Firefox built. Only the patches prefixed Prepare: # zotero prepare
mv "$_zoterodir" "$builddir"/zotero
(
cd "$builddir"/zotero
# checks that we're using expected fx version
local _exp_fxver=$(grep GECKO_VERSION_LINUX "$builddir"/zotero/app/config.sh | sed 's|.*=||' | tr -d '"' | sed 's|esr||')
if [ "$_fxver" != "$_exp_fxver" ]; then
msg "Expected firefox version $_exp_fxver, got $_fxver"
fi
# zotero build expects to be in a git repo
git init
git config user.name info
git config user.email [email protected]
git commit --allow-empty -m 'Initial'
npm i --legacy-peer-deps
) Build: # install to where zotero expects it
DESTDIR="$builddir"/zotero/app/xulrunner/firefox ./mach install
mv "$builddir"/zotero/app/xulrunner/firefox/usr/lib/firefox-esr/* "$builddir"/zotero/app/xulrunner/firefox/.
rm -R "$builddir"/zotero/app/xulrunner/firefox/usr
# zotero build
(
cd "$builddir"/zotero
NODE_OPTIONS=--openssl-legacy-provider npm run build
SKIP_32=1 app/scripts/dir_build -p l
# move to seperate folder as check will rebuild with test files added
mv "$builddir"/zotero/app/staging "$builddir"/zotero/app/package
)
rm -R "$builddir"/zotero/app/xulrunner/firefox # clean-up unused firefox install Package package() {
install -dDm755 "$pkgdir"/usr/bin
install -dDm755 "$pkgdir"/usr/lib/zotero
cp -r "$builddir"/zotero/app/package/Zotero_linux/* "$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
install -Dm644 "$pkgdir/usr/lib/zotero/icons/icon32.png" "$pkgdir/usr/share/icons/hicolor/32x32/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/icons/icon64.png" "$pkgdir/usr/share/icons/hicolor/64x64/apps/zotero.png"
install -Dm644 "$pkgdir/usr/lib/zotero/icons/icon128.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/zotero.png"
# Close shell when launching
sed -i -r 's:^("\$CALLDIR/zotero-bin" -app "\$CALLDIR/application.ini" "\$@"):exec \1:' "$pkgdir/usr/lib/zotero/zotero"
} Hope this information can be of use for anyone who wants to port this to Termux. |
I would definitely use this in Termux, as I am pre-pre-processing a corpora for RAG in ObsidianMD in a Debian proot chroot and Zotero housing meta-data, along with PostgreSQL, is part of the pre-pre-processing project, cleaning and wrangling the metadata and file names into order. My skills are not yet up to patching, packaging and maintaining this myself, but I am formally putting my paws up to say I would be happy to assist in any way in order to help and learn. |
Why is it worth to add this package?
Zotero is a Firefox-based research sources manager. It does not have an official build for
aarch64
, but Alpine 3.21 has added a build, and I've confirmed it works well under Termux with proot. It'll be nice to have a native Termux package now that Alpine has shown us that it's possible.Home page URL
https://www.zotero.org/
Source code URL
https://github.com/zotero/zotero
Packaging policy acknowledgement
The project is actively developed.
The project has existing packages and is "well known".
Licensed under an open source license.
Not available through a language package manager: pip, npm, cpan, cargo, etc.
Not taking up too much disk space (< 100MiB per architecture, exceptions can be made)
Not duplicating the functionality of existing packages.
Not serving hacking, malware, phishing, spamming, spying, ddos functionality.
I certify that I have read Termux Packaging Policy and understand that my request will be denied if it is found lacking.
Additional information
Nix flake and Alpine Linux package are discussed here: zotero/zotero#3515
The text was updated successfully, but these errors were encountered: