archrelease: copy trunk to extra-x86_64
[arch-packages.git] / deluge / trunk / PKGBUILD
blobb2b5a4145ea9c29c32e6936226f42ccfdbf74338
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=1
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 _commit=0b5f45b486e8e974ba8a0b1d6e8edcd124fca62a  # tags/deluge-2.1.1^0
48 source=("git+https://git.deluge-torrent.org/deluge#commit=$_commit")
49 sha256sums=('SKIP')
51 pkgver() {
52   cd deluge
53   git describe --tags | sed 's/^deluge-//;s/\.dev0-/dev/;s/-/+/g'
56 prepare() {
57   cd deluge
60 build() {
61   cd deluge
62   python setup.py build
65 _pick() {
66   local p="$1" f d; shift
67   for f; do
68     d="$srcdir/$p/${f#$pkgdir/}"
69     mkdir -p "$(dirname "$d")"
70     mv "$f" "$d"
71     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
72   done
75 package_deluge() {
76   cd deluge
77   python setup.py install --root="$pkgdir" --optimize=1 --skip-build
79   install -Dt "$pkgdir/usr/lib/systemd/system" \
80     -m644 packaging/systemd/*.service
81   install -Dt "$pkgdir/usr/lib/systemd/user" \
82     -m644 packaging/systemd/user/*.service
83   install -Dt "$pkgdir/usr/lib/systemd/system/deluged.service.d" \
84     -m644 packaging/systemd/user.conf
85   install -Dt "$pkgdir/usr/lib/systemd/system/deluge-web.service.d" \
86     -m644 packaging/systemd/user.conf
88   echo 'u deluge - "Deluge BitTorrent daemon" /srv/deluge' |
89     install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
90   echo 'd /srv/deluge 0770 deluge deluge' |
91     install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
93   cd "$pkgdir"
95   _pick gtk usr/bin/deluge-gtk usr/share/man/man1/deluge-gtk.1
96   _pick gtk usr/share/{appdata,applications,icons,pixmaps}
97   _pick gtk usr/lib/python3.10/site-packages/deluge/ui/gtk3
100 package_deluge-gtk() {
101   pkgdesc="GTK UI for Deluge"
102   depends=(
103     "deluge=$epoch:$pkgver-$pkgrel"
104     gtk3
105     librsvg
106     python-cairo
107     python-gobject
108     xdg-utils
109   )
110   optdepends=(
111     'libappindicator-gtk3: appindicator notifications'
112     'python-pygame: audible notifications'
113     'libnotify: desktop notifications'
114   )
115   replaces=('deluge<2.0.4.dev23+g2f1c008a2-2')
117   mv gtk/* "$pkgdir"
120 # vim:set sw=2 et: