diff options
author | Rogério Brito <rbrito@gmail.com> | 2016-11-30 17:13:30 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-30 17:13:30 -0200 |
commit | e2cfcb2a7ff312228a25442500a885832a1829af (patch) | |
tree | 33082a56d730d1467636ba1dbeb6796287637eae | |
parent | 77f319061b1661d04f5f4674aac40c72b824d665 (diff) | |
parent | cb7160687b01e550b387edbd5518ac9fd1791e29 (diff) | |
download | youtube-dl-e2cfcb2a7ff312228a25442500a885832a1829af.zip youtube-dl-e2cfcb2a7ff312228a25442500a885832a1829af.tar.gz youtube-dl-e2cfcb2a7ff312228a25442500a885832a1829af.tar.bz2 |
Merge pull request #1 from e7appew/python3
Revamp packaging and add migrate to Python 3.
Thanks to Carlos Maddela for the changes.
-rw-r--r-- | debian/changelog | 11 | ||||
-rw-r--r-- | debian/clean | 3 | ||||
-rw-r--r-- | debian/control | 15 | ||||
-rw-r--r-- | debian/patches/fix_libav_compat_outdated.patch | 41 | ||||
-rw-r--r-- | debian/patches/series | 2 | ||||
-rw-r--r-- | debian/patches/skip_support_file_installation.patch | 34 | ||||
-rwxr-xr-x | debian/rules | 27 | ||||
-rwxr-xr-x | debian/utils/python | 2 | ||||
-rwxr-xr-x | debian/utils/pyversions | 2 | ||||
-rw-r--r-- | debian/youtube-dl.bash-completion | 1 | ||||
-rw-r--r-- | debian/youtube-dl.docs | 1 | ||||
-rwxr-xr-x | debian/youtube-dl.install | 3 | ||||
-rw-r--r-- | debian/youtube-dl.maintscript | 2 | ||||
-rw-r--r-- | debian/youtube-dl.manpages (renamed from debian/manpages) | 0 |
14 files changed, 117 insertions, 27 deletions
diff --git a/debian/changelog b/debian/changelog index 18efafd..ad3008d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,20 @@ youtube-dl (2016.08.17-1~1.gbp99b46a) UNRELEASED; urgency=medium + [ Rogério Brito ] ** SNAPSHOT build @99b46abf79266c2bf5eabc291dc4f366e61b5dde ** * Revert "debian/watch: Add back pgpsigurlmangle." * Imported Upstream version 2016.08.17 + * debian/patches: Remove unneeded patches. + + [ Carlos Maddela ] + * Install support files via debhelper instead of setup.py. + * Tidy up cleanup rule and keep lintian happy. + * Rebuild with only Python 3 support. (Closes: #723990) + * Update Standards-Version to 3.9.8 (no changes required). + * Stop libav compatibility links from being considered as genuine. + (Closes: #798936) + * Add support for zsh completion. (Closes: #816412) -- Rogério Brito <rbrito@ime.usp.br> Wed, 17 Aug 2016 10:25:56 -0300 diff --git a/debian/clean b/debian/clean index 82c5780..ae3b470 100644 --- a/debian/clean +++ b/debian/clean @@ -1,2 +1 @@ -debian/youtube-dl.1 -youtube_dl/*.pyc +youtube_dl.egg-info/ diff --git a/debian/control b/debian/control index aa4d618..6b66975 100644 --- a/debian/control +++ b/debian/control @@ -3,25 +3,28 @@ Section: web Priority: extra Maintainer: Rogério Brito <rbrito@ime.usp.br> Build-Depends: + bash-completion, debhelper (>= 9), + dh-exec, dh-python, pandoc, - python-pkg-resources, + python3-pkg-resources, zip Build-Depends-Indep: - python -X-Python-Version: >= 2.6 -Standards-Version: 3.9.7 + python3 +X-Python3-Version: >= 3.2 +Standards-Version: 3.9.8 Homepage: https://rg3.github.com/youtube-dl/ Vcs-Git: https://anonscm.debian.org/git/collab-maint/youtube-dl.git Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/youtube-dl.git Package: youtube-dl Architecture: all +Pre-Depends: dpkg (>= 1.15.7.2) Depends: - python-pkg-resources, + python3-pkg-resources, ${misc:Depends}, - ${python:Depends} + ${python3:Depends}, Recommends: aria2 | wget | curl, ca-certificates, diff --git a/debian/patches/fix_libav_compat_outdated.patch b/debian/patches/fix_libav_compat_outdated.patch new file mode 100644 index 0000000..f86a0b0 --- /dev/null +++ b/debian/patches/fix_libav_compat_outdated.patch @@ -0,0 +1,41 @@ +From: Carlos Maddela <e7appew@gmail.com> +Date: Wed, 2 Mar 2016 04:20:06 +1100 +Subject: Stop libav compatibility links from being considered as genuine. + +Description: Stop libav compatibility links from being considered as genuine. + Don't register version numbers for compatibility links, so that + youtube-dl stops complaining about avconv being outdated. +Author: Carlos Maddela <e7appew@gmail.com> +Origin: vendor +Bug: https://github.com/rg3/youtube-dl/pull/8720 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798936 +Last-Update: 2016-06-27 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- + youtube_dl/postprocessor/ffmpeg.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py +index fa99b0c..29beb48 100644 +--- a/youtube_dl/postprocessor/ffmpeg.py ++++ b/youtube_dl/postprocessor/ffmpeg.py +@@ -98,11 +98,16 @@ class FFmpegPostProcessor(PostProcessor): + self._paths = dict( + (p, os.path.join(location, p)) for p in programs) + self._versions = dict( +- (p, get_exe_version(self._paths[p], args=['-version'])) ++ (p, get_exe_version(self._paths[p], args=['-version'], ++ version_re=r'%s\s+version\s+([-0-9._a-zA-Z]+)' % p, ++ unrecognized=False)) + for p in programs) + if self._versions is None: + self._versions = dict( +- (p, get_exe_version(p, args=['-version'])) for p in programs) ++ (p, get_exe_version(p, args=['-version'], ++ version_re=r'%s\s+version\s+([-0-9._a-zA-Z]+)' % p, ++ unrecognized=False)) ++ for p in programs) + self._paths = dict((p, p) for p in programs) + + if prefer_ffmpeg: diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..21895fb --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +skip_support_file_installation.patch +fix_libav_compat_outdated.patch diff --git a/debian/patches/skip_support_file_installation.patch b/debian/patches/skip_support_file_installation.patch new file mode 100644 index 0000000..1e5506f --- /dev/null +++ b/debian/patches/skip_support_file_installation.patch @@ -0,0 +1,34 @@ +From: Carlos Maddela <e7appew@gmail.com> +Date: Tue, 1 Mar 2016 02:31:47 +1100 +Subject: Don't install support files via setup.py + +Description: Don't install support files via setup.py + for better control over where they should be installed. +Author: Carlos Maddela <e7appew@gmail.com> +Origin: vendor +Forwarded: not-needed +Last-Update: 2016-06-27 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- + setup.py | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/setup.py b/setup.py +index 508b27f..7b13ef7 100644 +--- a/setup.py ++++ b/setup.py +@@ -58,12 +58,7 @@ py2exe_params = { + if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe': + params = py2exe_params + else: +- files_spec = [ +- ('etc/bash_completion.d', ['youtube-dl.bash-completion']), +- ('etc/fish/completions', ['youtube-dl.fish']), +- ('share/doc/youtube_dl', ['README.txt']), +- ('share/man/man1', ['youtube-dl.1']) +- ] ++ files_spec = [] + root = os.path.dirname(os.path.abspath(__file__)) + data_files = [] + for dirname, files in files_spec: diff --git a/debian/rules b/debian/rules index 8700969..82d26cb 100755 --- a/debian/rules +++ b/debian/rules @@ -1,31 +1,20 @@ #!/usr/bin/make -f + +#export DH_VERBOSE = 1 +export PYBUILD_NAME = youtube_dl +export PATH := $(CURDIR)/debian/utils:$(PATH) + %: - dh $@ --with python2 --buildsystem=python_distutils + dh $@ --with python3 --buildsystem=pybuild --with bash-completion override_dh_auto_configure: PREFIX=/usr SYSCONFDIR=/etc make mv Makefile Makefile.inactive rm youtube-dl -override_dh_install: - mv debian/youtube-dl/usr/etc debian/youtube-dl/ -# # For the future (similarly for fish): -# # dpkg-maintscript-helper rm_conffile /etc/youtube-dl.bash-completion \ -# # etc. -# -# mv debian/youtube-dl/usr/etc/bash_completion.d/youtube-dl.bash-completion \ -# debian/usr/share/bash-completion/completions/youtube-dl - dh_install - -override_dh_installdocs: - dh_installdocs - mv debian/youtube-dl/usr/share/doc/youtube_dl/* debian/youtube-dl/usr/share/doc/youtube-dl - rmdir debian/youtube-dl/usr/share/doc/youtube_dl - override_dh_clean: - -mv Makefile.inactive Makefile - -make clean + test -f Makefile || mv Makefile.inactive Makefile + make clean dh_clean - rm -rf youtube_dl.egg-info override_dh_auto_test: diff --git a/debian/utils/python b/debian/utils/python new file mode 100755 index 0000000..1c65bd1 --- /dev/null +++ b/debian/utils/python @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/bin/python3 "$@" diff --git a/debian/utils/pyversions b/debian/utils/pyversions new file mode 100755 index 0000000..54e34e2 --- /dev/null +++ b/debian/utils/pyversions @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/bin/py3versions "$@" diff --git a/debian/youtube-dl.bash-completion b/debian/youtube-dl.bash-completion new file mode 100644 index 0000000..78fb192 --- /dev/null +++ b/debian/youtube-dl.bash-completion @@ -0,0 +1 @@ +youtube-dl.bash-completion youtube-dl diff --git a/debian/youtube-dl.docs b/debian/youtube-dl.docs new file mode 100644 index 0000000..71dfd5b --- /dev/null +++ b/debian/youtube-dl.docs @@ -0,0 +1 @@ +README.txt diff --git a/debian/youtube-dl.install b/debian/youtube-dl.install new file mode 100755 index 0000000..123cc7d --- /dev/null +++ b/debian/youtube-dl.install @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec +youtube-dl.fish usr/share/fish/completions +youtube-dl.zsh => usr/share/zsh/vendor-completions/_youtube-dl diff --git a/debian/youtube-dl.maintscript b/debian/youtube-dl.maintscript new file mode 100644 index 0000000..0086247 --- /dev/null +++ b/debian/youtube-dl.maintscript @@ -0,0 +1,2 @@ +rm_conffile /etc/bash_completion.d/youtube-dl.bash-completion 2016.08.17-1~ +rm_conffile /etc/fish/completions/youtube-dl.fish 2016.08.17-1~ diff --git a/debian/manpages b/debian/youtube-dl.manpages index c536488..c536488 100644 --- a/debian/manpages +++ b/debian/youtube-dl.manpages |