upgpkg: ocaml-integers 0.5.0-1
[arch-packages.git] / deluge / trunk / PKGBUILD
blobdc929792a20d4c303d7eb8a319607c33f07d646f
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.0.4.dev56+g2e466101f
8 pkgrel=2
9 pkgdesc="BitTorrent client with multiple user interfaces in a client/server model"
10 url="https://deluge-torrent.org/"
11 arch=(any)
12 license=(GPL3)
13 depends=(
14   # Follows DEPENDS.md
15   'python-twisted>=17.1' python-service-identity python-idna
16   'openssl>=1.0.1'
17   python-pyopenssl
18   'python-rencode>=1.0.2'
19   python-xdg
20   python-six
21   'python-zope-interface>=4.4.2' 
22   python-chardet 
23   python-setproctitle 
24   python-pillow
25   python-dbus
26   python-distro
27   'libtorrent-rasterbar>=1.1.1'
28   python-geoip
29   python-mako
31 makedepends=(
32   python-setuptools
33   python-wheel
34   intltool
35   gtk3
36   python-gobject
37   python-cairo
38   librsvg
39   xdg-utils
40   libappindicator-gtk3
41   #python-pygame
42   libnotify
43   git
45 _commit=2e466101fc20aa4314049d942d56e2be75fd70ae  # develop
46 source=("git://git.deluge-torrent.org/deluge.git#commit=$_commit"
47         user-agent-override.diff)
48 sha256sums=('SKIP'
49             '10ed8beaafa4b014162efacfa7c5a2d92ee0260aa03c48764c71de41a48450b3')
51 pkgver() {
52   cd deluge
53   git describe --tags | sed 's/^deluge-//;s/dev0-/dev/;s/-/+/g'
56 prepare() {
57   cd deluge
59   # Pretend to be stable deluge
60   patch -Np1 -i ../user-agent-override.diff
63 build() {
64   cd deluge
65   python setup.py build
68 _pick() {
69   local p="$1" f d; shift
70   for f; do
71     d="$srcdir/$p/${f#$pkgdir/}"
72     mkdir -p "$(dirname "$d")"
73     mv "$f" "$d"
74     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
75   done
78 package_deluge() {
79   cd deluge
80   python setup.py install --root="$pkgdir" --optimize=1 --skip-build
82   install -Dt "$pkgdir/usr/lib/systemd/system" \
83     -m644 packaging/systemd/*.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}
98   _pick gtk usr/lib/python3.10/site-packages/deluge/ui/gtk3
101 package_deluge-gtk() {
102   pkgdesc="GTK UI for Deluge"
103   depends=(
104     "deluge=$pkgver-$pkgrel"
105     gtk3
106     librsvg
107     python-cairo
108     python-gobject
109     xdg-utils
110   )
111   optdepends=(
112     'libappindicator-gtk3: appindicator notifications'
113     #'python-pygame: audible notifications'
114     'libnotify: desktop notifications'
115   )
116   replaces=('deluge<2.0.4.dev23+g2f1c008a2-2')
118   mv gtk/* "$pkgdir"
121 # vim:set sw=2 et: