summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5c1f4f513adbc92baadb30b4b5524b9e383c4097 (plain)
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
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=dolphin-megasync-git
pkgver=4.10.0.0.4.gf718e54ba
pkgrel=1
pkgdesc="Upload your files to your Mega account from Dolphin file manager. (GIT Version)"
arch=('x86_64')
url='https://mega.co.nz/sync'
license=('custom:MEGA')
depends=(
  'gcc-libs' # libstdc++.so 
  'glibc' # libc.so 
  'qt5-base' # ibQt5Core.so libQt5Gui.so libQt5Network.so libQt5Widgets.so
  'kcoreaddons5' # libKF5CoreAddons.so
  'kio5' # libKF5KIOCore.so libKF5KIOWidgets.so
  'kwidgetsaddons5'
  'megasync'
  'hicolor-icon-theme'
)
makedepends=(
  'extra-cmake-modules'
  'qt5-tools'
  'git'
)
provides=('dolphin-megasync')
conflicts=('dolphin-megasync')
source=(
  'git+https://github.com/meganz/MEGAsync.git'
  'kf5.patch'
)
sha256sums=(
  'SKIP'
  'cb2f352e3c036f521c9cf48787a556f73ab4136951e2dd9099f0f7b3f0a05044'
)
options=('!lto')

pkgver() {
  cd MEGAsync
  echo "$(git describe --long --tags | tr - . | tr _ . | sed 's|OSX\.||' | sed 's|Win\.||' | sed 's|Linux\.||' | sed 's|\.Ubuntu\.18\.10build||g' | sed 's|CentOS7\.||g' | tr -d v)"
}

prepare() {
  patch -p1 -i "${srcdir}/kf5.patch"
}

build() {
  cmake -S MEGAsync/src/MEGAShellExtDolphin -B build \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib

  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build

  install -Dm644 MEGAsync/LICENCE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE.md"
}