# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=qtkeychain
pkgver=0.8.0
pkgrel=0
pkgdesc="Qt API to store passwords and other secret data"
url="https://github.com/frankosterfeld/qtkeychain"
arch="all"
license="BSD"
depends=
depends_dev="qt-dev"
makedepends="$depends_dev cmake"
install=
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/frankosterfeld/qtkeychain/archive/v$pkgver.tar.gz"


_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_LIBEXECDIR=lib/${pkgname} \
		-DCMAKE_BUILD_TYPE=Release
	make || return 1
}

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

sha512sums="be83ebc665a7916e96a2fd9990c72cd29373196591cf557fa6f9691f332ab67cc5475cab240c3e50e76cb37e0b7f189f0a1f2c3a70a6f655918e1d2465ed2f33  qtkeychain-0.8.0.tar.gz"
