summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8cc52c116a15178d9a0681293da36f667179ced5 (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
# Maintainer: William Giokas <1007380@gmail.com>
# 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-stable-git
_gitname="deluge"
_gitbranch="1.3-stable"
epoch=1
pkgver=1.3.12.r57.g90a22af
pkgrel=1
pkgdesc="A bittorrent client written with python and pygtk - Git Stable branch Version"
arch=('any')
url="http://deluge-torrent.org/"
license=('GPL3')
depends=('python2-xdg'
         'twisted'
         'python2-pyopenssl'
         'xdg-utils'
         'python2-chardet'
         'desktop-file-utils'
         'hicolor-icon-theme'
         'python2-distribute')
makedepends=('intltool'
             'pygtk'
             'librsvg'
             'python2-mako'
             'git'
             'python2-distribute'
             'libtorrent-rasterbar')
optdepends=('libtorrent-rasterbar: deluge daemon, including local daemon'
            'python2-notify: libnotify notifications'
            'pygtk: needed for gtk ui'
            'librsvg: needed for gtk ui'
            'python2-mako: needed for web ui')
provides=('deluge')
conflicts=('deluge' 'deluge-svn' 'deluge-stable' 'deluge-git')
replaces=('deluge-svn' 'deluge-stable')
source=("git://github.com/deluge-torrent/deluge#branch=$_gitbranch"
        deluge.tmpfiles.conf
        deluged.service
        deluge-web.service
        deluged.conf)
install=deluge-stable.install
md5sums=('SKIP'
         'c50385d32a2db0ef3f46b8caadb0e988'
         '6b831c889f365f58317dc4b78c167a62'
         'b3fff6601a5971bba89fa9a85dcf9ce8'
         '75e591b738cf9f858af2de8665a3b3e7')

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

build() {
  cd "${srcdir}/${_gitname}"
  python2 setup.py build
}

package() {
  cd "${srcdir}/$_gitname"

  python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
  
  cd "${srcdir}"
  install -Dm644 deluge.tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/deluge.conf"
  install -Dm644 deluged.service "$pkgdir/usr/lib/systemd/system/deluged.service"
  install -Dm644 deluge-web.service "$pkgdir/usr/lib/systemd/system/deluge-web.service"
  install -Dm644 deluged.conf "$pkgdir/etc/conf.d/deluged"

  install -d "$pkgdir/srv"
  install -d -m 664 -o 125 -g 125 "$pkgdir/srv/deluge"
}