name       : megasync
version    : 3.7.1.0
release    : 9
source     :
    - https://github.com/meganz/MEGAsync/archive/v3.7.1.0_Win.tar.gz : 56c4a3462666cf72b91e544e04e419d7d465a65b9df9eabc03e337635b301c06
    - https://github.com/meganz/sdk/archive/v3.4.3.tar.gz :  ffd4799069648719069dff9f10e0d125f2e74523749f6f13ee82307fc96a3e33
license    : MEGA LIMITED CODE REVIEW LICENCE
component  : network.clients
summary    : Sync your files to your Mega account.
description: |
    Easy automated syncing between your computers and your MEGA Cloud Drive.
builddeps  :
    - pkgconfig(gl)
    - pkgconfig(libcares)
    - pkgconfig(libcurl)
    - pkgconfig(libmediainfo)
    - pkgconfig(libraw_r)
    - pkgconfig(libsodium)
    - pkgconfig(libuv)
    - pkgconfig(Qt5Core)
    - pkgconfig(Qt5UiTools)
    - pkgconfig(Qt5Svg)
    - pkgconfig(sqlite3)
    - pkgconfig(zlib)
    - bzip2-devel
    - cryptopp-devel
setup      : |
    cd $workdir/src/MEGASync/mega
    tar -xf $sources/v3.4.3.tar.gz --strip 1 -C .
    %autogen --without-freeimage  \
     --without-termcap \
     --without-ffmpeg
    cd $workdir/src
    %configure
build      : |
    cd $workdir/src
    %qmake MEGA.pro
    lrelease MEGASync/MEGASync.pro
    %make
install    : |
    install -Dm 644 $workdir/LICENCE.md $installdir/usr/share/licenses/megasync/LICENCE.md
    install -Dm 644 $workdir/installer/terms.txt $installdir/usr/share/licenses/megasync/terms.txt
    install -Dm 755 $workdir/src/MEGASync/megasync $installdir/usr/bin/megasync
    install -Dm 644 $workdir/src/MEGASync/platform/linux/data/megasync.desktop $installdir/usr/share/applications/megasync.desktop
    for size in 16x16 32x32 48x48 128x128 256x256
    do
    install -Dm 644 $workdir/src/MEGASync/platform/linux/data/icons/hicolor/$size/apps/mega.png $installdir/usr/share/icons/hicolor/$size/apps/mega.png
    done
