summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9cccb7f66a92a9e170f82f6b6f829fb7e83f4f34 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer : Daniel Bermond < gmail-com: danielbermond >
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# PKGBUILD based on extra\deluge's PKGBUILD, adapted for -git version by Berseker

pkgname=deluge-git
_srcname=deluge
pkgver=2.0.0b2.dev342.g72d363968
pkgrel=1
epoch=1
pkgdesc="A BitTorrent client with multiple user interfaces in a client/server model (git version, 'develop' branch)"
arch=('any')
url='https://deluge-torrent.org/'
license=('GPL3')
depends=('desktop-file-utils' 'hicolor-icon-theme' 'libtorrent-rasterbar'
         'python2-twisted' 'python2-pyasn1' 'python2-rencode' 'python2-pyopenssl'
         'python2-xdg' 'python2-pillow' 'python2-mako' 'python2-chardet' 'python2-six'
         'python2-setproctitle' 'python2-zope-interface' 'python2-service-identity'
         'python2-setuptools' 'xdg-utils')
optdepends=('librsvg: gtk ui'
            'pygtk: gtk ui'
            'python2-gobject: gtk ui'
            'python2-notify: libnotify notifications'
            'python2-pygame: audible notifications'
            'python2-dbus: show item location in filemanager'
            'geoip: display peer locations')
makedepends=(
    # binary repositories:
        'git' 'intltool' 'librsvg' 'pygtk' 'python2-mako'
    # AUR:
        'slimit2'
)
provides=('deluge')
conflicts=('deluge')
source=('git://deluge-torrent.org/deluge.git#branch=develop'               # official repository
        #'git+https://github.com/deluge-torrent/deluge.git#branch=develop' # mirror
        'deluged.service'
        'deluge-web.service')
sha256sums=('SKIP'
            '58a451bb6cf4fe6ff78a4fb71d51c5910340a2de032ff435c3c7365015ab538f'
            '26e4d01003804afb197c570175d44ed4dddd443cc1b88ab2d0230ceacfac90c5')

pkgver() {
    cd "$_srcname"
    
    local _internalver
    local _shorthash
    
    _internalver="$(python2 version.py)"
    _shorthash="$(git rev-parse --short HEAD)"
    
    printf '%s.g%s' "$_internalver" "$_shorthash"
}

build() {
    cd "$_srcname"
    
    python2 setup.py build
}

package() {
    cd "$_srcname"
    
    python2 setup.py install --prefix='/usr' --root="$pkgdir" --skip-build --optimize='1'
    
    sed -i '1s/$/2/' "${pkgdir}/usr/lib/python2.7/site-packages/deluge/path_chooser_common.py"
    sed -i '1s/$/2/' "${pkgdir}/usr/lib/python2.7/site-packages/deluge/ui/gtk3/path_combo_chooser.py"
    
    install -D -m644 "${srcdir}/deluged.service"    "${pkgdir}/usr/lib/systemd/system/deluged.service"
    install -D -m644 "${srcdir}/deluge-web.service" "${pkgdir}/usr/lib/systemd/system/deluge-web.service"
    
    ln -s deluge.png "${pkgdir}/usr/share/pixmaps/deluge-panel.png"
    
    printf '%s\n' 'u deluge - "Deluge BitTorrent daemon" /srv/deluge' |
        install -D -m644 /dev/stdin "${pkgdir}/usr/lib/sysusers.d/deluge.conf"
    
    printf '%s\n' 'd /srv/deluge 0775 deluge deluge' |
        install -D -m644 /dev/stdin "${pkgdir}/usr/lib/tmpfiles.d/deluge.conf"
}