mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
56 lines
2.0 KiB
Bash
56 lines
2.0 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# Maintainer: Giuseppe Calà <jiveaxe@gmail.com>
|
|
#
|
|
|
|
|
|
pkgname=mendeleydesktop
|
|
pkgver=1.3.1
|
|
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')
|
|
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=('9a733e695c49c348759a8493a07d8910'
|
|
'16358cd53dc258a72efcaeab5a415217')
|
|
sha256sums=('b58feabbb62e93104f0277ad792d2ef81e55f828c5ba8b42c036a1d0e9d44a61'
|
|
'5484716ec4adf29a7bfc5ecb45c8ed4d6a5e253b8c72fccea12662454d398b85')
|
|
|
|
if [[ $CARCH = x86_64 ]]; then
|
|
md5sums[0]='18715f40a084d99ff35141488aa0fd45'
|
|
sha256sums[0]='15fab4130f560e420a6de803e4174a107c0fe720f4f53f84e4e18b91a586b693'
|
|
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"
|
|
|
|
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
|
|
}
|