void-packages/srcpkgs/phonon/template

81 lines
2.1 KiB
Bash

# Template file for 'phonon'
pkgname=phonon
version=4.12.0
revision=2
build_style=cmake
configure_args="$(vopt_bool designerplugin PHONON_BUILD_DESIGNER_PLUGIN)"
hostmakedepends="extra-cmake-modules qt5-host-tools qt5-devel
qt6-base qt6-tools qt6-tools"
makedepends="glib-devel qt5-devel pulseaudio-devel qt6-qt5compat-devel"
depends="phonon-locale"
short_desc="Multimedia framework for KDE"
maintainer="John <me@johnnynator.dev>"
license="LGPL-2.1-or-later"
homepage="https://phonon.kde.org/"
distfiles="${KDE_SITE}/${pkgname%-*}/${version}/${pkgname%-*}-${version}.tar.xz"
checksum=3287ffe0fbcc2d4aa1363f9e15747302d0b080090fe76e5f211d809ecb43f39a
build_options="designerplugin"
build_options_default=""
if [ -z "$CROSS_BUILD" ]; then
build_options_default="designerplugin"
fi
if [ "$build_option_designerplugin" ]; then
makedepends+=" qt6-tools-devel qt5-tools-devel"
nocross="yes"
fi
post_install() {
if [ "$build_option_designerplugin" ]; then
vmkdir usr/lib/qt6/plugins/designer
mv "${DESTDIR}/usr/lib/qt5/plugins/designer/phonon4qt6widgets.so" \
"${DESTDIR}/usr/lib/qt6/plugins/designer/phonon4qt6widgets.so"
fi
}
phonon-locale_package() {
short_desc+=" - locale files"
pkg_install() {
vmove usr/share/locale
}
}
phonon-devel_package() {
short_desc+=" - development files"
depends="qt6-base-devel phonon>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmake/phonon4qt6
vmove usr/include/phonon4qt6
vmove usr/lib/pkgconfig/phonon4qt6.pc
vmove "usr/lib/libphonon4qt6*.so"
if [ "$build_option_designerplugin" ]; then
vmove usr/lib/qt6/plugins/designer
fi
}
}
phonon-qt5-devel_package() {
short_desc+=" (Qt5) - development files"
depends="qt5-devel phonon-qt5>=${version}_${revision}"
pkg_install() {
vmove usr/include/phonon4qt5
vmove usr/lib/qt5/mkspecs
vmove usr/lib/cmake/phonon4qt5
vmove usr/lib/pkgconfig/phonon4qt5.pc
vmove "usr/lib/libphonon4qt5*.so"
if [ "$build_option_designerplugin" ]; then
vmove usr/lib/qt5/plugins/designer
fi
}
}
phonon-qt5_package() {
short_desc+=" (Qt5)"
depends="phonon-locale>=${version}_${revision}"
pkg_install() {
vmove "usr/lib/libphonon4qt5*.so.*"
}
}