aboutsummaryrefslogtreecommitdiffstats
path: root/testing/crypto++/APKBUILD
blob: 6632f7c894d50b55885bb63237918b28e8d5da5f (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
# Contributor: August Klein <amatcoder_at_gmail.com>
# Maintainer: August Klein <amatcoder_at_gmail.com>
pkgname=crypto++
pkgver=5.6.2
pkgrel=2
pkgdesc="A free C++ class library of cryptographic schemes"
url="http://www.cryptopp.com"
arch="all"
license="Boost"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="http://downloads.sourceforge.net/cryptopp/cryptopp562.zip
	CVE-2015-2141.patch"

_builddir="$srcdir"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile || return 1
	export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC"
	make libcryptopp.so || return 1
}

package() {
	cd "$_builddir"
	install -Dm644 libcryptopp.so "$pkgdir"/usr/lib/libcryptopp.so || return 1
	install -Dm644 License.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1

	mkdir -p "$pkgdir"/usr/include/cryptopp || return 1
	cp *.h "$pkgdir"/usr/include/cryptopp || return 1
}

md5sums="7ed022585698df48e65ce9218f6c6a67  cryptopp562.zip
7ff9a215b9244b4f8a17c7185e27beda  CVE-2015-2141.patch"
sha256sums="5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574  cryptopp562.zip
611980b01fd4292bc40b929e62a0cdecf1ea87c8b4639bca7c286b83c8c948fc  CVE-2015-2141.patch"
sha512sums="016ca7ebad1091d67ad0bc5ccb7549d96d4af6b563d9d5a612cae27b3d1a3514c41b954e319fed91c820e8c701e3aa43da186e0864bf959ce4afd1539248ebbe  cryptopp562.zip
4407833fbfb44c3571edccd916323a97427ee3c0f37b49d5a6851a196e6913954801cb9df3b01b956e8d990904fb710a0a57918c44596e8218b4c08b1b729bf1  CVE-2015-2141.patch"