summaryrefslogblamecommitdiff
path: root/user/kunitconversion/APKBUILD
blob: 031a2b8179469d3c5fdec2241132bda495217edb (plain) (tree)












































                                                                                                                                                                            
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=kunitconversion
pkgver=5.38.0
pkgrel=0
pkgdesc="Convert between metric and imperial"
url="https://www.kde.org/"
arch="all"
license="LGPL-2.1"
options="!check"  # Tests require downloading currency information from internet.
depends=""
depends_dev="qt5-qtbase-dev"
makedepends="$depends_dev cmake extra-cmake-modules"
install=""
subpackages="$pkgname-dev $pkgname-lang"
source="http://download.kde.org/stable/frameworks/5.38/kunitconversion-$pkgver.tar.xz"
builddir="$srcdir/kunitconversion-$pkgver"

build() {
	cd "$builddir"
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS}
	make
}

check() {
	cd "$builddir"
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="421dbf9e84904d14065c8f72ddbd61892ec060627c4eb3e03a98a03ff998ca1f137a133a34a8bde823538d3a7554b0fea8a72dbfe9154d79d6dcc8dcddf413c2  kunitconversion-5.38.0.tar.xz"