aboutsummaryrefslogtreecommitdiffstats
path: root/security/polarssl/Makefile
blob: b1890903328221b407fbb66053771d55f3d6ad8a (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $FreeBSD$

PORTNAME=   polarssl
PORTVERSION=    1.2.10
DISTVERSIONSUFFIX=  -gpl
CATEGORIES= security devel
MASTER_SITES=   http://polarssl.org/download/

MAINTAINER= jase@FreeBSD.org
COMMENT=    Open Source embedded SSL/TLS cryptographic library

LICENSE=    GPLv2

# bypass the HTML "now downloading..." splash site, code below
# .include <bsd.port.pre.mk>
URL_SUFFIX= ?do=yes
FETCH_ARGS= -pRro ${DISTFILES}
ALL_TARGET= no_test

USES=   gmake tar:tgz
USE_LDCONFIG=   yes

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}

# PolarSSL 1.3 branch introduces API changes that would best be served at this
# time by a new/seperate polarssl13 port. Therefore, limit Portscout to the
# 1.2 branch for this port.
PORTSCOUT=  limit:^1\.2\.

DOCFILES=   ChangeLog README
BINFILES=   aescrypt2 benchmark dh_client dh_genprime dh_server hello \
        md5sum mpi_demo rsa_genkey rsa_sign rsa_verify selftest \
        sha1sum sha2sum ssl_cert_test ssl_client1 ssl_client2 \
        ssl_server ssl_test

# cmake install is broken, so we do it by hand
do-install:
    @cd ${WRKSRC}/include && ${COPYTREE_SHARE} ${PORTNAME} ${STAGEDIR}${PREFIX}/include "! -name *.orig"
    ${INSTALL_DATA} ${WRKSRC}/library/libpolarssl.a ${STAGEDIR}${PREFIX}/lib/
    ${INSTALL_DATA} ${WRKSRC}/library/libpolarssl.so  ${STAGEDIR}${PREFIX}/lib/libpolarssl.so.0
    cd ${STAGEDIR}${PREFIX}/lib/ && ${LN} -sf libpolarssl.so.0 libpolarssl.so
.for i in ${BINFILES}
    ${INSTALL_PROGRAM} ${WRKSRC}/programs/*/${i} ${STAGEDIR}${PREFIX}/bin/polarssl_${i}
.endfor

OPTIONS_DEFINE= DOCS

.include <bsd.port.options.mk>

post-install:
.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${DOCFILES}
    ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.endif

.include <bsd.port.pre.mk>

FETCH_CMD=  ${SH} ${FILESDIR}/fetchwrapper.sh \
            ${URL_SUFFIX} ${FETCH_BINARY} ${FETCH_ARGS}

.if ${ARCH} == "powerpc"
BROKEN=     Does not compile on powerpc
.endif

.include <bsd.port.post.mk>