db-move: moved gdm from [testing] to [extra] (x86_64)
[arch-packages.git] / deluge / trunk / PKGBUILD
blobaf9f6661a055422186cf0e471bf9070c429df405
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
3 # Contributor: Hugo Doria <hugo@archlinux.org>
5 pkgbase=deluge
6 pkgname=(deluge deluge-gtk)
7 pkgver=2.1.1
8 pkgrel=4
9 epoch=1
10 pkgdesc="BitTorrent client with multiple user interfaces in a client/server model"
11 url="https://deluge-torrent.org/"
12 arch=(any)
13 license=(GPL3)
14 depends=(
15   # Follows DEPENDS.md
16   'python-twisted>=17.1' python-service-identity python-idna
17   'openssl>=1.0.1'
18   python-pyopenssl
19   'python-rencode>=1.0.2'
20   python-xdg
21   'python-zope-interface>=4.4.2' 
22   python-chardet 
23   python-setproctitle 
24   python-pillow
25   python-dbus
26   python-ifaddr
27   python-distro
28   'libtorrent-rasterbar>=1.1.1'
29   python-geoip
30   python-mako
32 makedepends=(
33   git
34   python-setuptools
35   python-wheel
36   intltool
37   python-rjsmin
38   gtk3
39   python-gobject
40   python-cairo
41   librsvg
42   xdg-utils
43   libappindicator-gtk3
44   python-pygame
45   libnotify
47 _tag=bad29eb302ebaae8306fc2ecf4a953926d401173  # tags/deluge-2.1.1
48 source=("git+https://git.deluge-torrent.org/deluge?signed#tag=$_tag")
49 b2sums=('SKIP')
50 validpgpkeys=(EA01185D0E8AA00D6323A30890597A687B836BA3) # Calum Lind <calumlind@gmail.com>
52 pkgver() {
53   cd deluge
54   git describe --tags | sed 's/^deluge-//;s/\.dev0-/dev/;s/[^-]*-g/r&/;s/-/+/g'
57 prepare() {
58   cd deluge
61 build() {
62   cd deluge
63   python setup.py build
66 _pick() {
67   local p="$1" f d; shift
68   for f; do
69     d="$srcdir/$p/${f#$pkgdir/}"
70     mkdir -p "$(dirname "$d")"
71     mv "$f" "$d"
72     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
73   done
76 package_deluge() {
77   cd deluge
78   python setup.py install --root="$pkgdir" --optimize=1 --skip-build
80   install -Dt "$pkgdir/usr/lib/systemd/system" \
81     -m644 packaging/systemd/*.service
82   install -Dt "$pkgdir/usr/lib/systemd/user" \
83     -m644 packaging/systemd/user/*.service
84   install -Dt "$pkgdir/usr/lib/systemd/system/deluged.service.d" \
85     -m644 packaging/systemd/user.conf
86   install -Dt "$pkgdir/usr/lib/systemd/system/deluge-web.service.d" \
87     -m644 packaging/systemd/user.conf
89   echo 'u deluge - "Deluge BitTorrent daemon" /srv/deluge' |
90     install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
91   echo 'd /srv/deluge 0770 deluge deluge' |
92     install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
94   cd "$pkgdir"
96   _pick gtk usr/bin/deluge-gtk usr/share/man/man1/deluge-gtk.1
97   _pick gtk usr/share/{appdata,applications,icons,pixmaps}
99   local sitedir="$(python -c 'import site; print(site.getsitepackages()[0])')"
100   _pick gtk "${sitedir#/}"/deluge/ui/gtk3
103 package_deluge-gtk() {
104   pkgdesc="GTK UI for Deluge"
105   depends=(
106     "deluge=$epoch:$pkgver-$pkgrel"
107     gtk3
108     librsvg
109     python-cairo
110     python-gobject
111     xdg-utils
112   )
113   optdepends=(
114     'libappindicator-gtk3: appindicator notifications'
115     'python-pygame: audible notifications'
116     'libnotify: desktop notifications'
117   )
118   replaces=('deluge<2.0.4.dev23+g2f1c008a2-2')
120   mv gtk/* "$pkgdir"
123 # vim:set sw=2 sts=-1 et: