public
Last active — forked from sseemayer/PKGBUILD

mendeleydesktop 1.7.1-1 PKGBUILD

  • Download Gist
PKGBUILD
Shell
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
##maintainer Meow < meow at linux dot cn >
 
pkgname=mendeleydesktop
pkgver=1.7.1
pkgrel=1
pkgdesc="Academic software for managing and sharing research papers (desktop client)"
url=http://www.mendeley.com/release-notes/
arch=(i686 x86_64)
depends=(python2 qtwebkit)
license=(custom:mendeley_eula)
install=mendeleydesktop.install
md5sums=('' '16358cd53dc258a72efcaeab5a415217')
 
 
if [[ $CARCH = i686 ]];then
_arch=i486
md5sums[0]='3a98e64c231ecb91143426af1a0fd23a'
 
else
_arch=$CARCH
md5sums[0]='2ae61cfd704763df589fe9a2cd0a6cd2'
fi
 
if which gconftool-2 &>/dev/null;then
depends=(${depends[@]} gconf)
fi
 
source=("http://download.mendeley.com/linux/$pkgname-$pkgver-linux-$_arch.tar.bz2"
'mendeleydesktop.install')
 
package() {
cd "$pkgname-$pkgver-linux-$_arch"
 
rm -f share/doc/mendeleydesktop/*.txt
 
install -dm755 "$pkgdir/opt/$pkgname/"
mv bin lib share "$pkgdir/opt/$pkgname/"
#ln -s "../lib/mendeleydesktop/libexec/mendeleydesktop.$_arch" "$pkgdir/opt/$pkgname/bin/$pkgname"
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-$_arch"
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
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.