description="A cross-platform application and UI framework, QtConnectivity files"
url="http://qt-project.org/"

license="FDL, GPL3, LGPL3, custom"

packager="tnut <tnut@nutyx.org>"
contributors="Pierre,Rems,Spiky"

makedepends=(qtbase qtdeclarative bluez)

name=qtconnectivity
version=5.15.12
_name="${name}-everywhere-opensource-src"

source=(kf5-1.patch
        https://download.qt.io/official_releases/qt/${version:0:4}/$version/submodules/${_name}-${version}.tar.xz)

prepare() {
 cd ${_name/-opensource/}-${version}
 patch -Np1 -i ../kf5-1.patch
}
build() {
mkdir build
cd    build

qmake ../${_name/-opensource/}-${version}

make
make INSTALL_ROOT=$PKG install

# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
  find "$PKG/usr/lib" -type f -name '*.prl' \
       -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
# Obsolet Libs
rm $PKG/usr/lib/libQt5{Bluetooth,Nfc}.la
}
