void-packages/srcpkgs/dtkcore/template
2019-01-26 12:55:37 -02:00

53 lines
1.5 KiB
Bash

# Template file for 'dtkcore'
pkgname=dtkcore
version=2.0.9.15
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=87d793f42cf5426ff566973de6fe9943e8485aa06dd3b17b54900a8053eb14c7
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
}
}