aboutsummaryrefslogtreecommitdiff
path: root/www/yt-dlp/Makefile
blob: bad8cadb0a6c40a581fbc7228d9452d65f30c1dc (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
PORTNAME=	yt-dlp
DISTVERSION=	2021.12.01
CATEGORIES=	www

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Command-line program for downloading videos from various platforms

LICENSE=	UNLICENSE
LICENSE_FILE=	${WRKSRC}/LICENSE

PY_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mutagen>0:audio/py-mutagen@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pycryptodome>0:security/py-pycryptodome@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}websockets>0:devel/py-websockets@${PY_FLAVOR}
BUILD_DEPENDS=	${PY_DEPENDS}
RUN_DEPENDS=	${PY_DEPENDS}

USES=		gmake python:3.7+ shebangfix
SHEBANG_GLOB=	devscripts/*.py

USE_GITHUB=	yes

MAKE_ARGS=	PYTHON=${PYTHON_CMD}

NO_ARCH=	yes

OPTIONS_DEFINE=		FFMPEG RTMPDUMP SYMLINK
OPTIONS_DEFAULT=	FFMPEG RTMPDUMP SYMLINK
OPTIONS_SUB=		yes

FFMPEG_RUN_DEPENDS=	ffprobe:multimedia/ffmpeg

RTMPDUMP_DESC=		Use rtmpdump to download rtmp video streams
RTMPDUMP_RUN_DEPENDS=	rtmpdump:multimedia/rtmpdump

SYMLINK_DESC=		Install youtube-dl symbolic link for executable
SYMLINK_CONFLICTS=	youtube_dl

post-install-SYMLINK-on:
	@${RLN} ${STAGEDIR}${PREFIX}/bin/yt-dlp ${STAGEDIR}${PREFIX}/bin/youtube-dl

.include <bsd.port.mk>