aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/avbin/Makefile
blob: a1bbb0990cb3eb26e6d51e34ef2348076fc1d495 (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
# New ports collection makefile for:    avbin
# Date created:     03 Apr 2009
# Whom:         Dmitry Marakasov <amdmi3@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   avbin
PORTVERSION=    7
PORTREVISION=   1
CATEGORIES= multimedia
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE} \
        http://mirror.amdmi3.ru/distfiles/
DISTNAME=   ${PORTNAME}-src-${PORTVERSION}

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    FFmpeg wrapper

LIB_DEPENDS=    avcodec.1:${PORTSDIR}/multimedia/ffmpeg

LIBNAME=    libavbin.so.${PORTVERSION}
PLIST_FILES=    lib/${LIBNAME} include/avbin.h
USE_LDCONFIG=   yes

PORTDOCS=   *

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS+=    -fPIC
.endif

do-build:
    cd ${WRKSRC} && \
        ${CC} ${CFLAGS} -shared -soname ${LIBNAME} -o ${LIBNAME} \
        src/avbin.c -Iinclude -I${LOCALBASE}/include \
        -DAVBIN_VERSION=${PORTVERSION} -DFFMPEG_REVISION=0 \
        -L${LOCALBASE}/lib -lavcodec -lavformat

do-install:
    ${INSTALL_DATA} ${WRKSRC}/${LIBNAME} ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}/include/avbin.h ${PREFIX}/include

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    cd ${WRKSRC}/doc && ${COPYTREE_SHARE} '*' ${DOCSDIR}/
.endif

.include <bsd.port.post.mk>