summaryrefslogtreecommitdiff
path: root/testing/sqlcipher/APKBUILD
blob: c92c2048f0e52e34bf433b590a8ec6e8b3c255ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=sqlcipher
pkgver=4.4.3
pkgrel=0
pkgdesc="SQLCipher is an SQLite extension that provides 256 bit AES encryption of database files."
url="https://www.zetetic.net/sqlcipher/"
arch="all"
license="BSD-3-clause"
makedepends="openssl-dev tcl-dev readline-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/sqlcipher/sqlcipher/archive/v$pkgver.tar.gz"
# block by https://github.com/sqlcipher/sqlcipher/issues/368#issuecomment-669984195
# options="!check"

build() {
	export CFLAGS="$CFLAGS -DSQLITE_HAS_CODEC -DSQLCIPHER_TEST"
	export LDFLAGS="$LDFLAGS -lcrypto"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-tempstore=yes \
		--enable-fts5

	make
}

check() {
	make testfixture
	./testfixture test/sqlcipher.test
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm0644 sqlcipher.1 \
		"$pkgdir"/usr/share/man/man1/sqlcipher.1
}

libs() {
	pkgdesc="SQLCipher library"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}

sha512sums="d80177cf658c145f7328bafac14bc2779afa463fc94ef0a5e99b6654cf2eece3088ac296949130e7263f52948913ffeac253c47e33d91816e90caf1788301a9a  sqlcipher-4.4.3.tar.gz"