Date: Friday, February 21, 2020 @ 15:19:51 Author: heftig Revision: 375989
2.0.4.dev23+g2f1c008a2-2: FS#64947: Split GTK UI and move xdg-utils dep Modified: deluge/trunk/PKGBUILD ----------+ PKGBUILD | 66 +++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 19 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-02-21 13:54:53 UTC (rev 375988) +++ PKGBUILD 2020-02-21 15:19:51 UTC (rev 375989) @@ -2,12 +2,13 @@ # Contributor: Ionut Biru <[email protected]> # Contributor: Hugo Doria <[email protected]> -pkgname=deluge +pkgbase=deluge +pkgname=(deluge deluge-gtk) pkgver=2.0.4.dev23+g2f1c008a2 -pkgrel=1 -pkgdesc="A BitTorrent client with multiple user interfaces in a client/server model" +pkgrel=2 +pkgdesc="BitTorrent client with multiple user interfaces in a client/server model" +url="https://deluge-torrent.org/" arch=(any) -url="https://deluge-torrent.org/" license=(GPL3) depends=( # Follows DEPENDS.md @@ -16,7 +17,6 @@ python-pyopenssl 'python-rencode>=1.0.2' python-xdg - xdg-utils python-six 'python-zope-interface>=4.4.2' python-chardet @@ -35,40 +35,42 @@ python-gobject python-cairo librsvg + xdg-utils libappindicator-gtk3 #python-pygame libnotify git ) -optdepends=( - 'gtk3: gtk ui' - 'python-gobject: gtk ui' - 'python-cairo: gtk ui' - 'librsvg: gtk ui' - 'libappindicator-gtk3: appindicator notifications' - #'python-pygame: audible notifications' - 'libnotify: desktop notifications' -) _commit=2f1c008a26b50ab3487bd03bcabb39347d441f23 # develop source=("git://git.deluge-torrent.org/deluge.git#commit=$_commit") sha256sums=('SKIP') pkgver() { - cd $pkgname + cd deluge git describe --tags | sed 's/^deluge-//;s/dev0-/dev/;s/-/+/g' } prepare() { - cd $pkgname + cd deluge } build() { - cd $pkgname + cd deluge python setup.py build } -package() { - cd $pkgname +_pick() { + local p="$1" f d; shift + for f; do + d="$srcdir/$p/${f#$pkgdir/}" + mkdir -p "$(dirname "$d")" + mv "$f" "$d" + rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")" + done +} + +package_deluge() { + cd deluge python setup.py install --root="$pkgdir" --optimize=1 --skip-build install -Dt "$pkgdir/usr/lib/systemd/system" \ @@ -82,6 +84,32 @@ install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" echo 'd /srv/deluge 0770 deluge deluge' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" + + cd "$pkgdir" + + _pick gtk usr/bin/deluge-gtk usr/share/man/man1/deluge-gtk.1 + _pick gtk usr/share/{appdata,applications,icons,pixmaps} + _pick gtk usr/lib/python3.8/site-packages/deluge/ui/gtk3 } +package_deluge-gtk() { + pkgdesc="GTK UI for Deluge" + depends=( + "deluge=$pkgver-$pkgrel" + gtk3 + librsvg + python-cairo + python-gobject + xdg-utils + ) + optdepends=( + 'libappindicator-gtk3: appindicator notifications' + #'python-pygame: audible notifications' + 'libnotify: desktop notifications' + ) + replaces=('deluge<2.0.4.dev23+g2f1c008a2-2') + + mv gtk/* "$pkgdir" +} + # vim:set sw=2 et:
