summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a07d8fc47ddd3d4cbfbddd4595aa2816e40f9094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer: Ricardo Gonçalves <ricardompgoncalves@gmail.com>

pkgname=qmmp-plugin-youtube
pkgver=0.3.2
pkgrel=2
pkgdesc="Plugin for Qt-based Multimedia Player (Qmmp) to search and play musics directly from YouTube"
arch=('i686' 'x86_64')
url="https://github.com/rigon/qmmp-plugin-youtube"
license=('GPL')
depends=('qmmp' 'python>=3.6' 'youtube-dl' 'qjson' 'pythonqt>=3.1-2')
makedepends=('qt5-tools' 'qt5-base' 'make' 'gcc' 'fakeroot')
source=("https://github.com/rigon/$pkgname/archive/v${pkgver}.tar.gz")
md5sums=('3fffbdf110c847942f7ce05fe373e57f')

build() {
	cd "${pkgname}-${pkgver}"/

	# Fix missing libPythonQt.so
	if [ ! -e "/usr/lib/libPythonQt.so" ]; then
		libpython=$(find /usr/lib/ -type f -iname libpythonqt* ! -iname libPythonQt_QtAll*)
		ln -svf "${libpython}" libPythonQt.so

		qmake QMAKE_LIBDIR_FLAGS="-L $PWD"
	else
		qmake
	fi

	make -j4
}

package() {
	mkdir -pv "${pkgdir}/usr/lib/qmmp/Transports" "${pkgdir}/usr/lib/qmmp/General"
	cp "${pkgname}-${pkgver}/youtube/libyoutube.so" "${pkgdir}/usr/lib/qmmp/Transports/"
	cp "${pkgname}-${pkgver}/youtubeui/libyoutubeui.so" "${pkgdir}/usr/lib/qmmp/General/"
}