aboutsummaryrefslogtreecommitdiffstats
path: root/main/gnupg1/APKBUILD
blob: 1b1305671f925986906c232b637c19ed37af81d4 (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnupg1
pkgver=1.4.23
pkgrel=2
pkgdesc="GNU Privacy Guard 1 - a PGP replacement tool"
url="https://www.gnupg.org/"
arch="all"
license="GPL-3.0-or-later"
depends="pinentry"
makedepends="curl-dev libassuan libksba-dev libgcrypt-dev libgpg-error-dev
	zlib-dev libassuan-dev"
subpackages="$pkgname-doc"
source="https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-$pkgver.tar.bz2"

# secfixes:
#   1.4.23-r0:
#     - CVE-2017-7526
#   1.4.22-r1:
#     - CVE-2018-12020

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

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

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

check() {
	make check
}

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

sha512sums="78dc52a2010202a4afc8814b29fda657a6c9fe230d5e7db11ae040edd2b0ca819e1baa4dbd6c0d04d36cd353df484e83f52d17759d2891c2cf7025c0b5d36612  gnupg-1.4.23.tar.bz2"