aboutsummaryrefslogtreecommitdiffstats
path: root/www/youtube_dl/Makefile
blob: 00398d5b769d3695398e11eda0d2f21efe563f1d (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
# $FreeBSD$

PORTNAME=   youtube_dl
PORTVERSION=    2016.12.12
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   https://yt-dl.org/downloads/${PORTVERSION}/
DISTNAME=   youtube-dl-${PORTVERSION}

MAINTAINER= araujo@FreeBSD.org
COMMENT=    Program for downloading videos from YouTube.com

LICENSE=    UNLICENSE
LICENSE_NAME=   The Unlicense
LICENSE_FILE=   ${WRKSRC}/LICENSE
LICENSE_PERMS=  dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

BUILD_DEPENDS=  zip:archivers/zip

ALL_TARGET= youtube-dl
MAKE_ARGS=  PYTHON=${PYTHON_CMD}
USES=       python
NO_ARCH=    yes
WRKSRC=     ${WRKDIR}/youtube-dl

OPTIONS_DEFINE= BASH FISH RTMPDUMP FFMPEG ZSH
OPTIONS_DEFAULT=BASH FISH RTMPDUMP ZSH
OPTIONS_SUB=    yes
FISH_DESC=  Install programmable completions for Fish
RTMPDUMP_DESC=  Use RTMPDUMP to download rtmp video streams

PLIST_FILES=    bin/youtube-dl \
        man/man1/youtube-dl.1.gz \
        %%BASH%%etc/bash_completion.d/youtube-dl.sh \
        %%FISH%%share/fish/completions/youtube-dl.fish \
        %%ZSH%%share/zsh/site-functions/_youtube-dl

FFMPEG_RUN_DEPENDS= ${LOCALBASE}/bin/ffprobe:multimedia/ffmpeg
RTMPDUMP_RUN_DEPENDS=   ${LOCALBASE}/bin/rtmpdump:multimedia/rtmpdump

post-extract:
    @# remove tarball provided version, build our own
    @${RM} ${WRKSRC}/youtube-dl

post-patch:
    @${REINPLACE_CMD} -e 's|python devscripts/|${PYTHON_CMD} devscripts/|' ${WRKSRC}/Makefile

.include <bsd.port.mk>