View previous topic :: View next topic |
Author |
Message |
russellD n00b
Joined: 07 Oct 2014 Posts: 55 Location: 28.5797S,153.338 E
|
Posted: Mon Oct 26, 2015 7:24 am Post subject: [Request] Zotero ebuild |
|
|
Hi Gentoo Wizards,
Could some kind person please provide an ebuild to install the stand alone version of Zotero?
Zotero is a free, easy-to-use tool to help collect, organize, cite, and share research sources.
Zotero is a FOSS project. More information here!
This would be very much appreciated!
Thanks in advance! |
|
Back to top |
|
|
kernelOfTruth Watchman
Joined: 20 Dec 2005 Posts: 6111 Location: Vienna, Austria; Germany; hello world :)
|
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Tue Oct 27, 2015 12:39 am Post subject: |
|
|
Huh? You can do it, ffs, by now.. |
|
Back to top |
|
|
russellD n00b
Joined: 07 Oct 2014 Posts: 55 Location: 28.5797S,153.338 E
|
Posted: Tue Oct 27, 2015 7:05 am Post subject: |
|
|
So far I have got a start on a simple ebuild from the instructions from: https://wiki.gentoo.org/wiki/Basic_guide_to_write_Gentoo_Ebuilds
zotero-1.0.ebuild
Code: |
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
DESCRIPTION="Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
HOMEPAGE="https://www.zotero.org/"
SRC_URI="https://download.zotero.org/standalone/4.0.28/Zotero-4.0.28_linux-x86_64.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
|
I couldn't get much further as the instructions page on https://devmanual.gentoo.org/quickstart/ was timing out.
Your help to complete this is very much appreciated! |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Oct 27, 2015 1:48 pm Post subject: |
|
|
russellD wrote: | zotero-1.0.ebuild |
russellD ... based on the name of the tarball that would be 'zotero-4.0.28.ebuild' ... and for SRC_URI, you should be using ${PV} (package version) rather than hardcode the version.
Code: | SRC_URI="https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-x86_64.tar.bz2" |
russellD wrote: | Code: | KEYWORDS="~amd64 ~x86" |
|
That doesn't seem consistent with the 'x86_64.tar.bz2' above ... you need to provide the SRC_URI for the x86 sources.
Code: | SRC_URI="amd64? ( https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-x86_64.tar.bz2 )
x86? ( https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-i686.tar.bz2 )" |
best ... khay |
|
Back to top |
|
|
russellD n00b
Joined: 07 Oct 2014 Posts: 55 Location: 28.5797S,153.338 E
|
Posted: Wed Oct 28, 2015 10:54 am Post subject: |
|
|
Hi khay
thanks for the tips, and adjusted the code.
cheers rd |
|
Back to top |
|
|
russellD n00b
Joined: 07 Oct 2014 Posts: 55 Location: 28.5797S,153.338 E
|
Posted: Fri Oct 30, 2015 12:17 pm Post subject: |
|
|
This is the working ebuild for Zotero.
I had to hard code the sym link to the binary as Zotero changes to lower case for the binary to "zotero" for a package with upper case "Zotero".
While its rough and not as elegant as I would like, it installed Zotero and cleanly uninstalls with "emerge -Cva Zotero", so keeps the system easy to maintain.
Which is what I wanted.
Your suggestions are appreciated!
Zotero-4.0.28.ebuild
Code: |
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
if [ "${ARCH}" = "amd64" ] ; then
LNXARCH="linux-x86_64"
else
LNXARCH="linux-i686"
fi
DESCRIPTION="Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
HOMEPAGE="https://www.zotero.org/"
SRC_URI="https://download.zotero.org/standalone/${PV}/Zotero-${PV}_${LNXARCH}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64? ( https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-x86_64.tar.bz2 ) x86? ( https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-i686.tar.bz2 ) "
RESTRICT="mirror strip"
RDEPEND=""
S="${WORKDIR}/${PN}_${LNXARCH}"
ZOTERO_INSTALL_DIR="/opt/${PN}"
src_install() {
# install zotero files to /opt/Zotero
dodir ${ZOTERO_INSTALL_DIR}
cp -a ${S}/. ${D}${ZOTERO_INSTALL_DIR} || die "Installing files failed"
# symlink the zotero binary
dosym /opt/${PN}/run-zotero.sh /opt/bin/zotero
}
|
|
|
Back to top |
|
|
russellD n00b
Joined: 07 Oct 2014 Posts: 55 Location: 28.5797S,153.338 E
|
Posted: Thu Nov 05, 2015 6:54 am Post subject: New Zotero ebuild! |
|
|
I rewrote this ebuild as it didn't start zotero from the cli, so I got the ebuild to write a simple shell script to start the zotero executable.
Is this a consistent with Gentoo approach?
Not being a programmer or dev, I'm unsure of the correct way to do this.
I welcome your comments!!
the new code which now installed and runs zotero from the cli:
Code: |
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
if [ "${ARCH}" = "amd64" ] ; then
LNXARCH="linux-x86_64"
else
LNXARCH="linux-i686"
fi
DESCRIPTION="Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources."
HOMEPAGE="https://www.zotero.org/"
SRC_URI="https://download.zotero.org/standalone/${PV}/Zotero-${PV}_${LNXARCH}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64? ( https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-x86_64.tar.bz2 ) x86? ( https://download.zotero.org/standalone/${PV}/Zotero-${PV}_linux-i686.tar.bz2 ) "
RESTRICT="mirror strip"
RDEPEND=""
S="${WORKDIR}/${PN}_${LNXARCH}"
ZOTERO_INSTALL_DIR="/opt/${PN}"
src_install() {
# install zotero files to /opt/Zotero
dodir ${ZOTERO_INSTALL_DIR}
cp -a ${S}/. ${D}${ZOTERO_INSTALL_DIR} || die "Installing files failed"
# install zotero-start.sh in /opt/Zotero
touch $D${ZOTERO_INSTALL_DIR}/zotero-start.sh
# give it some instructions to start zotero
echo "#!/bin/sh" >> $D${ZOTERO_INSTALL_DIR}/zotero-start.sh
echo "exec "/opt/Zotero/zotero"" >> $D${ZOTERO_INSTALL_DIR}/zotero-start.sh
# make zotero-start.sh executable
fperms +x ${ZOTERO_INSTALL_DIR}/zotero-start.sh
# sym link /opt/Zotero/zotero-start.sh to /opt/bin/zotero
dosym ${ZOTERO_INSTALL_DIR}/zotero-start.sh /opt/bin/zotero
}
|
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
|
Back to top |
|
|
russellD n00b
Joined: 07 Oct 2014 Posts: 55 Location: 28.5797S,153.338 E
|
Posted: Sat Nov 07, 2015 6:07 am Post subject: |
|
|
Thanks krinn!
I never would have looked or considered that this existed as a bug!
Done as you suggested. |
|
Back to top |
|
|
|