Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Request] Zotero ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
russellD
n00b
n00b


Joined: 07 Oct 2014
Posts: 55
Location: 28.5797S,153.338 E

PostPosted: Mon Oct 26, 2015 7:24 am    Post subject: [Request] Zotero ebuild Reply with quote

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! :D
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon Oct 26, 2015 4:09 pm    Post subject: Reply with quote

+1

packaging an ebuild around https://github.com/smathot/zotero_installer probably is even easier
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue Oct 27, 2015 12:39 am    Post subject: Reply with quote

kernelOfTruth wrote:
+1

Huh? You can do it, ffs, by now..
Back to top
View user's profile Send private message
russellD
n00b
n00b


Joined: 07 Oct 2014
Posts: 55
Location: 28.5797S,153.338 E

PostPosted: Tue Oct 27, 2015 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Oct 27, 2015 1:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
russellD
n00b
n00b


Joined: 07 Oct 2014
Posts: 55
Location: 28.5797S,153.338 E

PostPosted: Wed Oct 28, 2015 10:54 am    Post subject: Reply with quote

Hi khay

thanks for the tips, and adjusted the code.

cheers rd
Back to top
View user's profile Send private message
russellD
n00b
n00b


Joined: 07 Oct 2014
Posts: 55
Location: 28.5797S,153.338 E

PostPosted: Fri Oct 30, 2015 12:17 pm    Post subject: Reply with quote

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. :D

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
View user's profile Send private message
russellD
n00b
n00b


Joined: 07 Oct 2014
Posts: 55
Location: 28.5797S,153.338 E

PostPosted: Thu Nov 05, 2015 6:54 am    Post subject: New Zotero ebuild! Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Nov 05, 2015 9:42 am    Post subject: Reply with quote

you should bump https://bugs.gentoo.org/show_bug.cgi?id=340955 with that ebuild, you may get more help and a dev may test and adopt it.
Back to top
View user's profile Send private message
russellD
n00b
n00b


Joined: 07 Oct 2014
Posts: 55
Location: 28.5797S,153.338 E

PostPosted: Sat Nov 07, 2015 6:07 am    Post subject: Reply with quote

Thanks krinn!

I never would have looked or considered that this existed as a bug!

Done as you suggested.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum