53 lines
1.5 KiB
Bash
53 lines
1.5 KiB
Bash
# Template file for 'dtkcore'
|
|
pkgname=dtkcore
|
|
version=2.1.1
|
|
revision=1
|
|
build_style=qmake
|
|
configure_args="LIB_INSTALL_DIR=/usr/lib/ VERSION=${version}"
|
|
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 <me@johnnynator.dev>"
|
|
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=16685953ea0dff2270a5ba04f23b77abe98f0cb798b07f882eb66e7148eb1f57
|
|
python_version=2 #unverified
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" qt5-devel"
|
|
fi
|
|
|
|
pre_install() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# 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}" \
|
|
-qtconf ${wrksrc}/qt.conf
|
|
make CC="$CC" CXX="$CXX" LINK="$CXX"
|
|
cd ${wrksrc}
|
|
fi
|
|
}
|
|
|
|
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/libdtk-*"
|
|
vmove usr/lib/cmake
|
|
vsed -e 's/libs = .*/libs = $$QT_MODULE_LIB_BASE/g' \
|
|
-i ${PKGDESTDIR}/usr/lib/qt5/mkspecs/modules/qt_lib_dtkcore.pri
|
|
}
|
|
}
|