You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
2.6 KiB
123 lines
2.6 KiB
10 years ago
|
# Copyright 1999-2015 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
9 years ago
|
# $Id$
|
||
13 years ago
|
|
||
10 years ago
|
EAPI=5
|
||
13 years ago
|
|
||
9 years ago
|
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
|
||
9 years ago
|
|
||
|
inherit eutils fdo-mime multilib python-single-r1
|
||
13 years ago
|
|
||
|
MY_P_AMD64="${P}-linux-x86_64"
|
||
|
MY_P_X86="${P}-linux-i486"
|
||
|
|
||
9 years ago
|
DESCRIPTION="Research management tool for desktop and web"
|
||
13 years ago
|
HOMEPAGE="http://www.mendeley.com/"
|
||
9 years ago
|
SRC_URI="
|
||
|
amd64? ( ${MY_P_AMD64}.tar.bz2 )
|
||
13 years ago
|
x86? ( ${MY_P_X86}.tar.bz2 )
|
||
|
amd64-linux? ( ${MY_P_AMD64}.tar.bz2 )
|
||
|
x86-linux? ( ${MY_P_X86}.tar.bz2 )"
|
||
|
|
||
10 years ago
|
LICENSE="Mendeley-terms"
|
||
13 years ago
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
IUSE=""
|
||
|
|
||
9 years ago
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||
|
|
||
13 years ago
|
RESTRICT="fetch"
|
||
|
|
||
|
DEPEND=""
|
||
9 years ago
|
RDEPEND="${PYTHON_DEPS}
|
||
10 years ago
|
dev-qt/qtcore:4
|
||
|
dev-qt/qtgui:4
|
||
|
dev-qt/qtsvg:4
|
||
|
dev-qt/qtwebkit:4
|
||
9 years ago
|
dev-qt/qtxmlpatterns:4
|
||
|
x11-libs/libX11
|
||
|
"
|
||
13 years ago
|
|
||
10 years ago
|
QA_PREBUILT="/opt/mendeleydesktop/.*"
|
||
13 years ago
|
|
||
|
pkg_nofetch() {
|
||
12 years ago
|
elog "Please download ${A} from:"
|
||
12 years ago
|
elog "http://www.mendeley.com/download-mendeley-desktop/"
|
||
13 years ago
|
elog "and move it to ${DISTDIR}"
|
||
|
}
|
||
|
|
||
12 years ago
|
src_unpack() {
|
||
|
unpack ${A}
|
||
|
|
||
10 years ago
|
cd "${WORKDIR}" || die
|
||
12 years ago
|
|
||
|
if use amd64 || use amd64-linux ; then
|
||
10 years ago
|
mv -f "${MY_P_AMD64}" "${P}" || die
|
||
12 years ago
|
else
|
||
10 years ago
|
mv -f "${MY_P_X86}" "${P}" || die
|
||
12 years ago
|
fi
|
||
|
}
|
||
|
|
||
13 years ago
|
src_prepare() {
|
||
|
# remove bundled Qt libraries
|
||
10 years ago
|
rm -r lib/mendeleydesktop/plugins \
|
||
13 years ago
|
|| die "failed to remove plugin directory"
|
||
10 years ago
|
rm -r lib/qt || die "failed to remove qt libraries"
|
||
13 years ago
|
|
||
|
# force use of system Qt libraries
|
||
|
sed -i "s:sys\.argv\.count(\"--force-system-qt\") > 0:True:" \
|
||
|
bin/mendeleydesktop || die "failed to patch startup script"
|
||
|
|
||
|
# fix library paths
|
||
|
sed -i \
|
||
|
-e "s:lib/mendeleydesktop:$(get_libdir)/mendeleydesktop:g" \
|
||
|
-e "s:MENDELEY_BASE_PATH + \"/lib/\":MENDELEY_BASE_PATH + \"/$(get_libdir)/\":g" \
|
||
|
bin/mendeleydesktop || die "failed to patch library path"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
# install menu
|
||
|
domenu share/applications/${PN}.desktop
|
||
|
|
||
|
# install application icons
|
||
|
insinto /usr/share/icons
|
||
|
doins -r share/icons/hicolor
|
||
|
|
||
|
# install default icon
|
||
|
insinto /usr/share/pixmaps
|
||
|
doins share/icons/hicolor/48x48/apps/${PN}.png
|
||
|
|
||
|
# install documentation, but no license file
|
||
|
dodoc share/doc/${PN}/Readme.txt
|
||
|
|
||
|
# install binary
|
||
9 years ago
|
python_fix_shebang bin/${PN}
|
||
13 years ago
|
into /opt/${PN}
|
||
|
dobin bin/*
|
||
|
|
||
|
# install libraries
|
||
|
dolib.so lib/lib*.so*
|
||
|
|
||
|
# install programs
|
||
|
exeinto /opt/mendeleydesktop/$(get_libdir)/mendeleydesktop/libexec
|
||
|
doexe lib/mendeleydesktop/libexec/*
|
||
|
|
||
|
# install shared files
|
||
|
insinto /opt/${PN}/share
|
||
|
doins -r share/mendeleydesktop
|
||
|
|
||
11 years ago
|
# install launch script
|
||
10 years ago
|
into /opt
|
||
|
make_wrapper ${PN} "/opt/${PN}/bin/${PN} --unix-distro-build"
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
fdo-mime_desktop_database_update
|
||
|
fdo-mime_mime_database_update
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
fdo-mime_desktop_database_update
|
||
|
fdo-mime_mime_database_update
|
||
13 years ago
|
}
|