aboutsummaryrefslogtreecommitdiffstats
path: root/net/libsrtp/Makefile
blob: b7da387f093265684f60bf5d29d4c066994b3f07 (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
# Created by: Alexander Brovikov <alexander@brovikov.ru>
# $FreeBSD$

PORTNAME=   libsrtp
DISTVERSIONPREFIX=  v
DISTVERSION=    1.5.0
PORTREVISION=   1
CATEGORIES= net

MAINTAINER= alexander@brovikov.ru
COMMENT=    Secure RTP (SRTP) Reference Implementation

LICENSE=    BSD3CLAUSE
LICENSE_FILE=   ${WRKSRC}/LICENSE

USE_GITHUB= yes
GH_ACCOUNT= cisco
WRKSRC=     ${WRKDIR}/${GH_PROJECT}-${DISTVERSION}

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-openssl
CFLAGS+=    -fPIC   # Taken from configure script
USES=       gmake pathfix pkgconfig
USE_LDCONFIG=   yes
USE_OPENSSL=    yes
WITH_OPENSSL_PORT=  yes

.if ! defined(WITH_DEBUG)
CONFIGURE_ARGS+=--disable-debug
.endif

post-patch:
    @${REINPLACE_CMD} \
        -e 's/@LDFLAGS@ -L\./-L. @LDFLAGS@/' \
        -e 's/libsrtp.so/&.0/g' \
        ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} '/pkg-config/s/openssl/libcrypto/' \
        ${WRKSRC}/configure

post-build:
    @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
        ${MAKEFILE} ${MAKE_ARGS} libsrtp.so.0)

post-install:
    ${LN} -s libsrtp.so.0 ${STAGEDIR}${PREFIX}/lib/libsrtp.so

.include <bsd.port.mk>