archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libetpan / repos / extra-x86_64 / PKGBUILD
blob24bc3273451300e1ad2ab6a1c053a014495c0cf7
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
3 pkgname=libetpan
4 pkgver=1.9.4
5 pkgrel=3
6 pkgdesc="A portable middleware for email access"
7 arch=('x86_64')
8 url="https://www.etpan.org/libetpan.html"
9 license=("custom:etpan")
10 depends=('libgcrypt' 'gnutls' 'libsasl' 'zlib')
11 makedepends=('expat')
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'
19             'SKIP'
20             'SKIP'
21             'SKIP'
24 prepare() {
25   cd "${pkgname}"-${pkgver}
26   
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
35 #  aclocal -I m4
36 #  autoheader
37 #  autoconf
38 #  automake --add-missing --foreign --force --copy
39   NOCONFIGURE=1 ./autogen.sh
42 build() {
43   cd "${pkgname}"-${pkgver}
44   ./configure --prefix=/usr \
45     --disable-static \
46     --disable-db \
47     --with-openssl=no \
48     --with-gnutls=yes
49   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
50   make
53 check() {
54   cd "${pkgname}"-${pkgver}
55   make check
56   cd tests
57   make imap-sample
60 package() {
61   cd "${pkgname}"-${pkgver}
62   make DESTDIR="${pkgdir}" install
63   install -Dm644 COPYRIGHT "${pkgdir}"/usr/share/licenses/$pkgname/license.txt