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

pkgname=gpodder
pkgver=3.10.21
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')
optdepends=('libnotify: Gtk+ Desktop Notifications extension'
            'python-mutagen: Tag downloaded files, Remove cover art from OGG files extensions'
            'webkit2gtk: HTML show notes'
            'youtube-dl: Youtube-dl extension')
source=("http://github.com/gpodder/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('014e619de64d3e3dc8493929af8007b3caf09dd77e153bf778f1708d55946878')

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
}
