node-hid: Correct multiple DEPENDS lines
[feed/packages.git] / multimedia / youtube-dl / Makefile
1 #
2 # Copyright (C) 2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=youtube-dl
11 PKG_VERSION:=2017.06.05
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://yt-dl.org/downloads/$(PKG_VERSION)/
16 PKG_HASH:=b54ca848490285909d0830c04c19376c2d78da74d8de0056387b11ba34234e8c
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
18
19 PKG_LICENSE:=Unlicense
20 PKG_LICENSE_FILES:=LICENSE
21 PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>
22
23 PKG_BUILD_DEPENDS:=python/host
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/youtube-dl
28 SECTION:=multimedia
29 CATEGORY:=Multimedia
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
33 endef
34
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.
39 endef
40
41 define Package/youtube-dl/install
42 $(INSTALL_DIR) $(1)/usr/bin
43
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
49
50 $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/youtube-dl-c $(1)/usr/bin/youtube-dl
51 endef
52
53 $(eval $(call BuildPackage,youtube-dl))