# Maintainer: Christian Hesse <arch@eworm.de>
# Contributor:  TDY <tdy@gmx.com>
# Contributor: Marc St-Laurent <mstlaurent@canada.com>

pkgname=xfmpc
_tag='58f79c46a632f321b8ac8c3d7fdcf6c8e0369dd0' # git rev-parse ${pkgver}
pkgver=0.3.0
pkgrel=4
pkgdesc="A graphical GTK+ MPD client focusing on low footprint"
arch=('x86_64')
url="https://goodies.xfce.org/projects/applications/xfmpc/"
license=('GPL')
depends=('libxfce4ui' 'libmpd')
makedepends=('git' 'xfce4-dev-tools' 'vala')
source=("git+https://gitlab.xfce.org/apps/${pkgname}.git#tag=${_tag}")
sha256sums=('SKIP')

prepare() {
	cd "${srcdir}/${pkgname}"

	commits=(
	  # Use 'multimedia-player' icon instead of 'stock_volume' (Bug #15636)
	  'cf6986a4fbc34203f8ca52ccb9c11dd2eb7c8def'
	  # add parenthesis around expression
	  '1efd29280029a997ff96631fdbafd75094557615'
	  # Call methods from GtkDialog instead of XfceTitleDialog (#8)
	  '79f35336bab6a5db395b67048bdf3d7c9fdbbe63'
	  # use Gtk MenuButton for context button
	  'a6ef47e9e80a52330fe25c44aa2bf5b47c8dff3f'
	)

	git cherry-pick -n "${commits[@]}"
}

build() {
	cd "${srcdir}/${pkgname}"

	./autogen.sh \
		--prefix=/usr
	make
}

package() {
	cd "${srcdir}/${pkgname}"

	make DESTDIR="${pkgdir}" install
}

