void-packages/srcpkgs/dtkcore/template
2019-01-02 20:22:40 +01:00

53 lines
1.5 KiB
Bash

# Template file for 'dtkcore'
pkgname=dtkcore
version=2.0.9.14
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=85bf79513e785509e9680913717127de2976dd8a09ff2ea5bd29ee8511a736db
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
}
}