mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
50 lines
2.0 KiB
Bash
50 lines
2.0 KiB
Bash
# Contributions from AUR: https://aur.archlinux.org/packages/kde-servicemenus-dropbox/
|
|
|
|
pkgname=dropbox-servicemenu
|
|
pkgver=0.16.1
|
|
pkgrel=7
|
|
pkgdesc="A servicemenu for KDE4 (patched for Frameworks 5) which allows easy access to most of Dropbox features."
|
|
url="http://kde-apps.org/content/show.php?content=124416"
|
|
license=('GPL')
|
|
arch=('x86_64')
|
|
depends=('dropbox' 'python2' 'kdialog' 'python2-m2crypto' 'xdg-utils' 'sharutils' 'recode' 'perl' 'sqlite3')
|
|
categories=('network')
|
|
source=("https://dl.opendesktop.org/api/files/download/id/1466690475/124416-DropboxServiceMenu-${pkgver}.tar.gz"
|
|
"kde5.patch")
|
|
md5sums=('3c0186649311611abfbb8ac016a67791'
|
|
'a6945d04da03a52d88d8117f785035a3')
|
|
|
|
prepare() {
|
|
cd "$srcdir"
|
|
|
|
# Apply the patch given by "swyear" in the comments section of the kde-look.org page
|
|
patch -s -p0 < kde5.patch
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/DropboxServiceMenu-${pkgver}/"
|
|
sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/python2/' dropbox-scripts/dropbox.py
|
|
sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/python2/' dropbox-scripts/dropbox-notify.py
|
|
sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/env python2/' dropbox-scripts/pyndexer.py
|
|
|
|
_SCRIPT_PATH="/usr/"
|
|
_PATTERN="\$HOME/.local"
|
|
|
|
sed -i "s,${_PATTERN},${_SCRIPT_PATH}," dropbox-scripts/dropbox_menu.sh
|
|
sed -i "s,${_PATTERN},${_SCRIPT_PATH}," dropbox_all.desktop
|
|
sed -i "s,${_PATTERN},${_SCRIPT_PATH}," dropbox_files.desktop
|
|
sed -i "s,${_PATTERN},${_SCRIPT_PATH}," dropbox_directories.desktop
|
|
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/DropboxServiceMenu-${pkgver}/"
|
|
|
|
mkdir -p "${pkgdir}/usr/share/kservices5/ServiceMenus/dropbox-scripts"
|
|
install -m 644 dropbox_all.desktop "${pkgdir}/usr/share/kservices5/ServiceMenus/"
|
|
install -m 644 dropbox_files.desktop "${pkgdir}/usr/share/kservices5/ServiceMenus/"
|
|
install -m 644 dropbox_directories.desktop "${pkgdir}/usr/share/kservices5/ServiceMenus/"
|
|
install -m 755 dropbox-scripts/* "${pkgdir}/usr/share/kservices5/ServiceMenus/dropbox-scripts/"
|
|
|
|
}
|