summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 49c1906aa68daeb0699d4f072cbbd1ba054756e2 (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
# Maintainer: Batuhan Baserdem <lastname dot firstname at gmail>

_name=maestral
_srcname="${_name}-dropbox"

pkgname="${_name}-git"
provides=("${_name}")
conflicts=("${_name}")
pkgver=0.5.0.r0.g43c3e73
pkgrel=1
pkgdesc='A light-weight and open-source Dropbox client.'
arch=('any')
url="https://github.com/SamSchott/${_srcname}"
license=('MIT')
source=("git+${url}")
makedepends=('git' 'python-setuptools' 'gendesk')
depends=(
    'python-click>=7.0'
    'python-dropbox>=9.4.0'
    'python-watchdog'
    'python-blinker'
    'python-requests'
    'python-u-msgpack'
    'python-keyring>=19.0.0'
    'python-keyrings-alt>=3.0.0'
    'python-pyro5'
    'python-systemd'
    'python-sdnotify')
    optdepends=('python-pyqt5: GUI support (runtime)')
md5sums=('SKIP')

prepare() {
    gendesk -q -n \
        --pkgname="${_name}" \
        --exec="${_name} gui" \
        --comment="${pkgdesc}" \
        --categories=Network
}

pkgver() {
    cd "${srcdir}/${_srcname}"
    git describe --long --tags | sed 's|\([^-]*-g\)|r\1|;s|-|.|g;s|^v||g'
}

build() {
    cd "${srcdir}/${_srcname}"
    python setup.py build
}

package() {
    cd "${srcdir}/${_srcname}"
    python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
    install -Dm644 "${srcdir}/${_name}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${_name}/LICENSE"
    install -Dm644 "${_name}/gui/resources/maestral.png" "${pkgdir}/usr/share/pixmaps/${_name}.png"
}