1 # Build recipe for libetpan.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 # Define a category for the output of the package name
25 tarname=${program}-${version}.tar.gz
28 fetch=http://github.com/dinhviethoa/libetpan/archive/${version}/$tarname
31 A library that will handle all kind of mailbox access.
33 The purpose of this mail library is to provide a portable, efficient
34 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP.
36 It provides an API for C language.
39 homepage=http://www.etpan.org/libetpan.html
40 license="3-clause BSD"
42 # Source documentation
43 docs="AUTHORS COPYRIGHT NEWS README.md"
44 docsdir="${docdir}/${program}-${version}"
50 unpack "${tardir}/$tarname"
54 # Reported on http://github.com/dinhviethoa/libetpan/issues/336
55 patch -Np1 -i "${worktree}/patches/libetpan/clientid_missing-header.patch"
57 # Set sane permissions
58 chmod -R u+w,go-w,a+rX-s .
60 # TODO: SASL support for build against `--with-sasl'.
62 sh ./autogen.sh CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
64 --libdir=/usr/lib${libSuffix} \
73 --with-openssl=no --with-gnutls=yes \
74 --build="$(cc -dumpmachine)"
77 make -j${jobs} DESTDIR="$destdir" install-strip
79 # Compress and link man pages (if needed)
80 if test -d "${destdir}/$mandir"
83 cd "${destdir}/$mandir"
84 find . -type f -exec lzip -9 '{}' +
85 find . -type l | while read -r file
87 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
94 mkdir -p "${destdir}${docsdir}"
95 cp -p $docs "${destdir}${docsdir}/"