2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2017.09.11
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://yt-dl.org
/downloads
/$(PKG_VERSION
)/
16 PKG_HASH
:=8b6defdd7cb9a8228eca2ef03a8c203a3ccba1ed97cb700f11b40a3af548212a
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)
19 PKG_LICENSE
:=Unlicense
20 PKG_LICENSE_FILES
:=LICENSE
21 PKG_MAINTAINER
:=Adrian Panella
<ianchi74@outlook.com
>
23 PKG_BUILD_DEPENDS
:=python
/host zip
/host
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/youtube-dl
30 TITLE
:=utility to download videos from YouTube.com
31 DEPENDS
:=+python-openssl
+python-email
+python-xml
+python-codecs
+python-ctypes
+ca-certificates
32 URL
:=https
://youtube-dl.org
35 define Package
/youtube-dl
/description
36 youtube-dl is a small command-line program to download videos
37 from YouTube.com and a few more sites.
38 It requires the Python interpreter.
41 define Package
/youtube-dl
/install
42 $(INSTALL_DIR
) $(1)/usr
/bin
44 python
-m compileall
$(PKG_BUILD_DIR
)/youtube_dl
/
45 cd
$(PKG_BUILD_DIR
) && zip
--quiet youtube-dl-c.zip youtube_dl
/*.pyc youtube_dl
/*/*.pyc
46 cd
$(PKG_BUILD_DIR
) && zip
--quiet
--junk-paths youtube-dl-c.zip youtube_dl
/__main__.pyc
47 echo
'#!/usr/bin/env python' > $(PKG_BUILD_DIR
)/youtube-dl-c
48 cat
$(PKG_BUILD_DIR
)/youtube-dl-c.zip
>> $(PKG_BUILD_DIR
)/youtube-dl-c
50 $(INSTALL_BIN
) -T
$(PKG_BUILD_DIR
)/youtube-dl-c
$(1)/usr
/bin
/youtube-dl
53 $(eval
$(call BuildPackage
,youtube-dl
))