Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Contributor: Christopher Schwaab -- christopher.schwaab gmail
- pkgname=mendeleydesktop
- pkgver=0.9.7.1
- pkgrel=1
- url="http://www.mendeley.com/"
- pkgdesc="The desktop client for managing and sharing research papers."
- license=('custom:mendeley_eula')
- arch=('i686' 'x86_64')
- [ $CARCH = 'x86_64' ] && _arch='x86_64'
- [ $CARCH = 'i686' ] && _arch='i486'
- source=("http://www.mendeley.com/downloads/linux/$pkgname-$pkgver-linux-$_arch.tar.bz2")
- [ $CARCH = 'x86_64' ] && md5sums=('24c7dfd13209e4f781e0fd01f1c7aa03')
- [ $CARCH = 'i686' ] && md5sums=('df77272d6503e67386812790f53fd73f')
- depends=('qt' 'openssl' 'sqlite3' 'openssl-compatibility' 'libpng12')
- makedepends=('cpio')
- _use_sys_libs=""
- #_use_sys_libs="libQtCore.so.4
- # libQtSvg.so.4
- # libQtGui.so.4
- # libQtXml.so.4
- # libQtNetwork.so.4
- # libQtSql.so.4"
- build() {
- cd $srcdir/$pkgname-$pkgver-linux-$_arch
- mkdir -p $pkgdir/opt/mendeleydesktop/{bin,lib,plugins}
- mkdir -p $pkgdir/usr/{bin,lib}
- rm -f INSTALL README
- # install libs
- pushd lib && rm -f $_use_sys_libs && popd || return 1
- mv lib/libMendeley.so lib/libMendeley.so.0.9 \
- $pkgdir/usr/lib/ || return 1
- install -m755 lib/libMendeley.so.0.9.7.1 \
- lib/libPDFNetC.so \
- $pkgdir/usr/lib/ || return 1
- install -m755 lib/libpng.so.3 lib/libssl.so.0 \
- lib/libQtGui.so.4 \
- lib/libQtSvg.so.4 \
- lib/libQtNetwork.so.4 \
- lib/libQtXml.so.4 \
- lib/libQtCore.so.4 \
- lib/libQtSql.so.4 \
- $pkgdir/opt/mendeleydesktop/lib || return 1
- # install actual executables with pointer to sqlite plugin
- cat > $pkgdir/opt/mendeleydesktop/bin/qt.conf <<__EOF__
- [Paths]
- plugins=/opt/mendeleydesktop/plugins
- __EOF__
- install -m755 \
- lib/mendeleydesktop/libexec/{Updater,mendeleydesktop.$_arch} \
- $pkgdir/opt/mendeleydesktop/bin || return 1
- tar -cf - -C lib/mendeleydesktop/plugins . | \
- tar -C $pkgdir/opt/mendeleydesktop/plugins/ -xpf - || return 1
- ln -s /usr/share/mendeleydesktop/ $pkgdir/opt/mendeleydesktop/bin/share
- # install launcher and fix up path
- sed -i "s~\"\$LOCAL_LIB_PATH\"/mendeleydesktop/libexec/~LD_LIBRARY_PATH=/opt/mendeleydesktop/lib:\$LD_LIBRARY_PATH /opt/mendeleydesktop/bin/~" \
- bin/mendeleydesktop || return 1
- install -D -m755 bin/mendeleydesktop \
- $pkgdir/usr/bin/mendeleydesktop || return 1
- # install license and resources
- install -D -m644 LICENSE \
- $pkgdir/usr/share/licenses/$pkgname/LICENSE || return 1
- rm -f LICENSE
- find share/ | cpio -p -dum $pkgdir/usr || return 1
- install -Dm644 share/icons/hicolor/48x48/apps/mendeleydesktop.png \
- $pkgdir/usr/share/pixmaps/mendeleydesktop.png || return 1
- rm -rf share/{applications,icons}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement