Import security/gpgme version 1.3.2
[dports.git] / security / gpgme / Makefile
1 # New ports collection makefile for:    gpgme
2 # Date created:         15 June 2001
3 # Whom:                 teramoto@comm.eng.osaka-u.ac.jp
4 #
5 # $FreeBSD: ports/security/gpgme/Makefile,v 1.73 2012/11/17 06:01:04 svnexp Exp $
6 #
7
8 PORTNAME=       gpgme
9 PORTVERSION=    1.3.2
10 CATEGORIES=     security
11 MASTER_SITES=   ${MASTER_SITE_GNUPG}
12 MASTER_SITE_SUBDIR=     gpgme
13 DISTFILES=      ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
14 EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
15
16 MAINTAINER=     jhale@FreeBSD.org
17 COMMENT=        A library to make access to GnuPG easier
18
19 LICENSE=        LGPL21
20
21 LIB_DEPENDS=    assuan.0:${PORTSDIR}/security/libassuan \
22                 gpg-error.0:${PORTSDIR}/security/libgpg-error
23
24 OPTIONS_DEFINE=         DOCS UISERVER
25 OPTIONS_SINGLE=         GNUPG
26 OPTIONS_SINGLE_GNUPG=   GNUPG1 GNUPG2
27 OPTIONS_DEFAULT=        GNUPG2
28
29 GNUPG1_DESC=            Build gpgme library for GnuPG 1.x
30 GNUPG2_DESC=            Build gpgme library for GnuPG 2.x
31 UISERVER_DESC=          GnuPG UI server support
32
33 USE_BZIP2=      yes
34 USE_AUTOTOOLS=  libtool
35 USE_GMAKE=      yes
36 USE_LDCONFIG=   yes
37 MAKE_JOBS_SAFE= yes
38
39 CONFIGURE_ARGS= --includedir=${PREFIX}/include/gpgme \
40                 --with-g13=no
41
42 INFO=           gpgme
43 PORTDOCS=       AUTHORS ChangeLog COPYING COPYING.LESSER INSTALL \
44                 NEWS README THANKS TODO
45
46 .include <bsd.port.options.mk>
47
48 .if ${PORT_OPTIONS:MGNUPG1}
49 BUILD_DEPENDS+= gpgv:${PORTSDIR}/security/gnupg1
50 RUN_DEPENDS+=   gpgv:${PORTSDIR}/security/gnupg1
51 CONFIGURE_ARGS+=--with-gpg=${LOCALBASE}/bin/gpg \
52                 --with-gpgsm=no \
53                 --with-gpgconf=no
54 .endif
55
56 .if ${PORT_OPTIONS:MGNUPG2}
57 BUILD_DEPENDS+= gpg2:${PORTSDIR}/security/gnupg
58 RUN_DEPENDS+=   gpg2:${PORTSDIR}/security/gnupg
59 CONFIGURE_ARGS+=--with-gpg=${LOCALBASE}/bin/gpg2 \
60                 --with-gpgconf=${LOCALBASE}/bin/gpgconf
61 .if exists(${LOCALBASE}/bin/gpgsm)
62 CONFIGURE_ARGS+=--with-gpgsm=${LOCALBASE}/bin/gpgsm
63 .else
64 CONFIGURE_ARGS+=--with-gpgsm=no
65 .endif
66 .endif
67
68 .if ${PORT_OPTIONS:MUISERVER}
69 CONFIGURE_ARGS+=--enable-fd-passing
70 .endif
71
72 verify: checksum
73         gpg --verify ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}.sig
74
75 post-patch:
76         @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
77                                         ${WRKSRC}/${CONFIGURE_SCRIPT} \
78                                         ${WRKSRC}/src/Makefile.in \
79                                         ${WRKSRC}/src/gpgme-config.in \
80                                         ${WRKSRC}/tests/gpg/Makefile.in
81         @${REINPLACE_CMD} -e 's|^clfilesdir.*|clfilesdir=$$\(libdir\)/common-lisp/gpgme|g' \
82                                         ${WRKSRC}/lang/cl/Makefile.in
83
84 post-install:
85 .if ${PORT_OPTIONS:MDOCS}
86         ${MKDIR} ${DOCSDIR}
87         ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
88 .endif
89
90 .include <bsd.port.mk>