void-packages/srcpkgs/dtkcore/template

54 lines
1.5 KiB
Bash

# Template file for 'dtkcore'
pkgname=dtkcore
version=2.0.10
revision=1
build_style=qmake
configure_args="LIB_INSTALL_DIR=/usr/lib/"
hostmakedepends="qt5-qmake pkg-config"
makedepends="qt5-devel gsettings-qt-devel"
short_desc="Base devlopment tool of all C++/Qt work on Deepin"
maintainer="John <johnz@posteo.net>"
license="GPL-3.0-or-later"
homepage="https://github.com/linuxdeepin/dtkcore"
changelog="https://github.com/linuxdeepin/dtkcore/blob/${version}/CHANGELOG.md"
distfiles="https://github.com/linuxdeepin/dtkcore/archive/${version}.tar.gz"
checksum=fcbb8dc7c400cb9e8b9ce20414594f526322646ddfa83a11a5b82723b7c45434
if [ "$CROSS_BUILD" ];then
hostmakedepends+=" qt5-devel gsettings-qt-devel"
fi
pre_build() {
# This is needed for musl, does somehow not get build there automatically
make sub-tools-qmake_all
make -C tools sub-deepin-os-release-all
}
pre_install() {
# Replace the host arch binary with target arch one
cd tools/deepin-os-release
rm *.o
qmake ${configure_args} \
PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \
QMAKE_CFLAGS="${CFLAGS}" \
QMAKE_CXXFLAGS="${CXXFLAGS}" \
QMAKE_LFLAGS="${LDFLAGS}"
make CC="$CC" CXX="$CXX" LINK="$CXX"
cd ${wrksrc}
}
dtkcore-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/qt5
vmove usr/lib/pkgconfig
vmove usr/lib/dtk2
vmove usr/lib/cmake
}
}