1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
6 pkgdesc="A portable middleware for email access"
8 url="https://www.etpan.org/libetpan.html"
9 license=("custom:etpan")
10 depends=('libgcrypt' 'gnutls' 'libsasl' 'zlib')
12 provides=('libetpan.so')
13 source=($pkgname-$pkgver.tar.gz::https://github.com/dinhviethoa/${pkgname}/archive/${pkgver}.tar.gz
14 CVE-2020-15953_1.diff::https://github.com/dinhvh/libetpan/commit/1002a0121a8f5a9aee25357769807f2c519fa50b.patch
15 CVE-2020-15953_2.diff::https://github.com/dinhvh/libetpan/commit/298460a2adaabd2f28f417a0f106cb3b68d27df9.patch
16 avoid_user_LDFLAGS_into_Libs.diff::https://github.com/dinhvh/libetpan/commit/8e904aa1c92bd0993123dd46d5a10a58f0516721.patch
18 sha256sums=('82ec8ea11d239c9967dbd1717cac09c8330a558e025b3e4dc6a7594e80d13bb1'
25 cd "${pkgname}"-${pkgver}
27 # CVE-2020-15953 - https://bugs.archlinux.org/task/69284
28 patch -Np1 -i ../CVE-2020-15953_1.diff
29 patch -Np1 -i ../CVE-2020-15953_2.diff
31 # Don't put user LDFLAGS into Libs
32 patch -Np1 -i ../avoid_user_LDFLAGS_into_Libs.diff
34 # libtoolize --force --copy
38 # automake --add-missing --foreign --force --copy
39 NOCONFIGURE=1 ./autogen.sh
43 cd "${pkgname}"-${pkgver}
44 ./configure --prefix=/usr \
49 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
54 cd "${pkgname}"-${pkgver}
61 cd "${pkgname}"-${pkgver}
62 make DESTDIR="${pkgdir}" install
63 install -Dm644 COPYRIGHT "${pkgdir}"/usr/share/licenses/$pkgname/license.txt