mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
58 lines
2.2 KiB
Bash
58 lines
2.2 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Giuseppe Calà <jiveaxe@gmail.com>
|
|
#
|
|
|
|
|
|
pkgname=mendeleydesktop
|
|
pkgver=1.3.2
|
|
pkgrel=1
|
|
url="http://www.mendeley.com/"
|
|
pkgdesc="The desktop client for managing and sharing research papers."
|
|
license=('custom:mendeley_eula')
|
|
depends=('python2' 'qt' 'libpng12')
|
|
categories=('education')
|
|
arch=(i686 x86_64)
|
|
_filearch=$CARCH
|
|
[[ $CARCH = i686 ]] && _filearch=i486
|
|
|
|
source=("http://download.mendeley.com/linux/$pkgname-$pkgver-linux-${_filearch}.tar.bz2"
|
|
'mendeleydesktop.install')
|
|
md5sums=('d56add2266a982fe3bea905f4e34ae0b'
|
|
'16358cd53dc258a72efcaeab5a415217')
|
|
sha256sums=('6714159688a8304bc058271853aa4ee3415cbe68fb36ff7b1878dd8c779df139'
|
|
'5484716ec4adf29a7bfc5ecb45c8ed4d6a5e253b8c72fccea12662454d398b85')
|
|
|
|
if [[ $CARCH = x86_64 ]]; then
|
|
md5sums[0]='766e7f94a49943064a8a8d06559bf222'
|
|
sha256sums[0]='869e5df39b5af17b89af49e602d3a2a919b600a33c2e98678fef8ae3569be2f7'
|
|
fi
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver-linux-${_filearch}"
|
|
|
|
find share/doc/mendeleydesktop/ -iname "*.txt" -delete
|
|
install -dm755 "$pkgdir/opt/$pkgname/bin"
|
|
mv lib share "$pkgdir/opt/$pkgname/"
|
|
|
|
sed -i 's@^\s*subprocess\.Popen(\[MENDELEY_BASE_PATH+"/bin/install-mendeley-link-handler\.sh".*$@#&@' "bin/$pkgname"
|
|
install -Dm755 "bin/$pkgname" "$pkgdir/opt/$pkgname/bin/$pkgname"
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -dm755 "$pkgdir/usr/bin/"
|
|
ln -s "/opt/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
|
|
|
install -dm755 "$pkgdir/usr/share/applications"
|
|
ln -s "/opt/$pkgname/share/applications/mendeleydesktop.desktop" "$pkgdir/usr/share/applications/"
|
|
|
|
# force bundled qt since mendeley crashes when using qt 4.8
|
|
#sed -i 's/^Exec.*$/& --force-bundled-qt/' "$pkgdir/opt/$pkgname/share/applications/mendeleydesktop.desktop"
|
|
sed -e 's/^Exec.*$/& --force-bundled-qt/g' -i "$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
|
|
}
|