desktop/mendeleydesktop/PKGBUILD

64 lines
2.6 KiB
Bash
Raw Normal View History

2014-01-31 00:22:06 +08:00
#
# Part of chakra-project.org
#
# Maintainer: Francesco Marinucci <franzmari[at]chakra-project[dot]it>
2012-06-20 16:54:22 +08:00
2011-11-23 12:51:50 +08:00
pkgname=mendeleydesktop
2014-12-09 05:02:50 +08:00
pkgver=1.12.3
2011-11-23 12:51:50 +08:00
pkgrel=1
url="http://www.mendeley.com/"
pkgdesc="The desktop client for managing and sharing research papers."
license=('custom:mendeley_eula')
2012-10-17 06:16:55 +08:00
depends=('python2' 'qt')
categories=('education')
2012-11-28 20:44:05 +08:00
arch=('x86_64')
screenshot=('http://www.timelordz.com/blog/wp-content/uploads/2010/08/MendeleyClient.png')
source=("http://download.mendeley.com/linux/$pkgname-$pkgver-linux-x86_64.tar.bz2"
2012-01-19 01:51:52 +08:00
'mendeleydesktop.install')
2014-12-09 05:02:50 +08:00
md5sums=('da8bc0de6790bae30991c6f37da7dbab'
2013-04-01 17:12:21 +08:00
'4f510b0f3e6369cd506cf9e4b3d4f9cd')
2012-01-19 01:51:52 +08:00
package() {
cd "$pkgname-$pkgver-linux-x86_64"
2012-10-17 06:16:55 +08:00
rm -f share/doc/mendeleydesktop/*.txt
install -dm755 "$pkgdir/opt/$pkgname/"
mv bin lib share "$pkgdir/opt/$pkgname/"
#ln -s "../lib/mendeleydesktop/libexec/mendeleydesktop.x86_64" "$pkgdir/opt/$pkgname/bin/$pkgname"
2012-10-17 06:16:55 +08:00
cd "$pkgdir"
sed -i '1s@^#!/usr/bin/python$@&2@' opt/"$pkgname"/bin/mendeleydesktop
#install -Dm755 "bin/mendeleydesktop" "$pkgdir/usr/bin/mendeleydesktop"
install -dm755 "$pkgdir"/usr/bin
ln -s /opt/"$pkgname"/bin/mendeleydesktop "$pkgdir/usr/bin/mendeleydesktop"
cd "$srcdir/$pkgname-$pkgver-linux-x86_64"
2012-10-17 06:16:55 +08:00
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -dm755 "$pkgdir"/usr/share/applications
ln -s /opt/"$pkgname"/share/applications/mendeleydesktop.desktop "$pkgdir"/usr/share/applications/
#Romove bundled Qt from package
cat << __EOF__
Removing bundled Qt library.
If you used "--force-bundled-qt" to start mendeley,
make sure you remove any old versions of ".desktop" file of mendeley in ~/.local/share/applications/,
because mendeley will automatically create one there.
__EOF__
rm -rf "$pkgdir"/opt/"$pkgname"/lib/qt
#Remove unneeded lines if gconf is not installed.
if ! which gconftool-2 &>/dev/null;then
sed -i '6d;74d;75d' \
"$pkgdir"/opt/"$pkgname"/bin/install-mendeley-link-handler.sh
fi
#force mendeley to use bundled qt because which under qt 4.8 crashes at start point
#make sure you remove any old versions of ".desktop" file of mendeley in ~/.local/share/applications/
# sed -i 's/^Exec.*$/& --force-bundled-qt/' "$pkgdir"/opt/"$pkgname"/share/applications/mendeleydesktop.desktop
for size in 16 22 32 48 64 128;do
install -dm755 "$pkgdir"/usr/share/icons/hicolor/${size}x${size}/apps
ln -s /opt/"$pkgname"/share/icons/hicolor/${size}x${size}/apps/"${pkgname}".png \
"$pkgdir"/usr/share/icons/hicolor/${size}x${size}/apps
done
2012-11-19 04:31:09 +08:00
}