science/linux-zotero: Commit zotero.desktop patches & fix Exec

I forgot to commit the patch for the icon support. While here, fix the
Exec line.
This commit is contained in:
Mateusz Piotrowski 2022-07-29 15:19:11 +02:00
parent 9f069b6d4b
commit 77f485048c
2 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= zotero
DISTVERSION= 6.0.10
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= science deskutils linux
MASTER_SITES= https://download.zotero.org/client/release/${DISTVERSION}/ \
https://raw.githubusercontent.com/zotero/zotero-standalone-build/${DISTVERSION}/:LICENSE
@ -38,11 +38,12 @@ post-extract:
${CP} ${DISTDIR}/${DIST_SUBDIR}/COPYING ${WRKDIR}
do-configure:
${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${PORTNAME}.desktop
(cd ${WRKSRC} && ${BRANDELF} -t Linux ${_BINARIES})
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} "! -name '*.orig'")
(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} "! -name '*.orig' ! -name '*.bak'")
(cd ${WRKSRC} && ${CHMOD} +x ${_BINARIES})
# Only strip zotero-bin. Other ${_BINARIES} break strip(1).
(cd ${STAGEDIR}${DATADIR} && ${STRIP_CMD} zotero-bin)

View File

@ -0,0 +1,12 @@
--- zotero.desktop.orig 2022-07-19 02:55:23 UTC
+++ zotero.desktop
@@ -1,7 +1,7 @@ Name=Zotero
[Desktop Entry]
Name=Zotero
-Exec=bash -c "$(dirname $(realpath $(echo %k | sed -e 's/^file:\/\///')))/zotero -url %U"
-Icon=zotero.ico
+Exec=%%PREFIX%%/bin/zotero -url %U
+Icon=zotero.png
Type=Application
Terminal=false
Categories=Office;