aboutsummaryrefslogtreecommitdiffstats
path: root/main/gnupg1/APKBUILD
blob: f2dd7f14d189db9ecbcebcb50b693620e77415f8 (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
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnupg1
pkgver=1.4.22
pkgrel=1
pkgdesc="GNU Privacy Guard 1 - a PGP replacement tool"
url="http://www.gnupg.org/"
arch="all"
license="GPL"
depends="pinentry"
makedepends="curl-dev libassuan libksba-dev libgcrypt-dev libgpg-error-dev
	zlib-dev libassuan-dev"
subpackages="$pkgname-doc"
provides="gnupg=$pkgver-r$pkgrel"
replaces="gnupg"
source="ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-$pkgver.tar.bz2
	0001-gpg-Sanitize-diagnostic-with-the-original-file-name.patch"

# secfixes:
#   1.4.22-r1:
#     - CVE-2018-12020

builddir="$srcdir/gnupg-$pkgver"
prepare() {
	default_prepare
	cd "$builddir"

	# Fix PIC definitions
	sed -i -e 's:PIC:__PIC__:' \
		mpi/i386/mpih-add1.S \
		mpi/i386/mpih-sub1.S \
		intl/relocatable.c \
		|| return 1
}

build() {
	cd "$builddir"
	export CFLAGS="$CFLAGS -g"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-nls \
		--enable-noexecstack \
		|| return 1
	make || return 1
}

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

doc() {
	default_doc
	provides="gnupg-doc=$pkgver-r$pkgrel"
}

sha512sums="c03acac0fa55761470bb085d78a44e2b99ebb187e8396cbb031a184b1e40bef2a40c91da07755d1a20610a3daa6aa1eefea2d12a0dbd5a79a45466166419c708  gnupg-1.4.22.tar.bz2
0fecf8735ed56380699d91ff739aac3cf4a8b0fc2b248e403fb8c1411b05ac701eaebed6898f37a13e45df53cab3c319deac05b18a74d40c19409652a500d32b  0001-gpg-Sanitize-diagnostic-with-the-original-file-name.patch"