# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan Magnus Brevik <janmbrevik@gmail.com>

pkgname=gpodder
pkgver=3.11.5
pkgrel=1
pkgdesc='Podcast client written in Python using GTK'
arch=('any')
url='https://gpodder.github.io/'
license=('GPL3')
depends=('gtk3' 'python-cairo' 'dbus-python' 'python-gobject' 'python-mygpoclient'
         'python-podcastparser' 'python-requests')
makedepends=('intltool' 'python-build' 'python-installer' 'python-setuptools')
optdepends=('libnotify: Gtk+ Desktop Notifications extension'
            'python-mutagen: Tag downloaded files, Remove cover art from OGG files extensions'
            'webkit2gtk: HTML show notes'
            'yt-dlp: Youtube-dl extension')
source=("https://github.com/gpodder/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('c09de56290589f5d66592d79acdfb8b70e76deab6df590715e4556c6d2d2068c')

prepare() {
  cd $pkgname-$pkgver
  # Use gio open directly instead of xdg-open
  sed -i "s/\['xdg-open', filename\]/['gio', 'open', filename]/" src/gpodder/util.py
}

build() {
  cd $pkgname-$pkgver
  make messages
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
