blob: 2bb849e0ba0388f86afff9b6d8fa60c922f9e49e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit desktop
MY_PN="Zotero"
LNXARCH="linux-x86_64"
DESCRIPTION="A tool to help you collect, organize, cite, and share your research sources."
HOMEPAGE="https://www.zotero.org/"
SRC_URI="https://www.zotero.org/download/client/dl?channel=release&platform=${LNXARCH}&version=${PV} -> ${MY_PN}-${PV}_${LNXARCH}.tar.bz"
MY_P="${MY_PN}-${PV}"
S="${WORKDIR}/${MY_PN}_${LNXARCH}"
IUSE=""
LICENSE="GPL-3"
KEYWORDS="~amd64"
SLOT="0"
DEPEND=""
RDEPEND="${DEPEND}"
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/${PN}/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
newicon -s 48 chrome/icons/default/default48.png zotero.png
newicon chrome/icons/default/default48.png zotero.png
newicon -s 32 chrome/icons/default/default32.png zotero.png
newicon -s 16 chrome/icons/default/default16.png zotero.png
make_desktop_entry "/opt/bin/zotero" Zotero zotero Science
}
|