From: Carlos Maddela Date: Mon, 29 Feb 2016 15:59:45 +0000 (+1100) Subject: Install support files via debhelper instead of setup.py. X-Git-Url: https://git.rapsys.eu/youtubedl/commitdiff_plain/b74522ed28ebcae6e0e351f94735a3e7a70b3665?ds=inline Install support files via debhelper instead of setup.py. --- diff --git a/debian/control b/debian/control index aa4d618..51ea9b4 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: web Priority: extra Maintainer: Rogério Brito Build-Depends: + bash-completion, debhelper (>= 9), dh-python, pandoc, @@ -18,6 +19,7 @@ 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, ${misc:Depends}, diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..4813c5b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +skip_support_file_installation.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 +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 +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..9c645f1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,27 +1,13 @@ #!/usr/bin/make -f %: - dh $@ --with python2 --buildsystem=python_distutils + dh $@ --with python2 --buildsystem=python_distutils \ + --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 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 100644 index 0000000..5512653 --- /dev/null +++ b/debian/youtube-dl.install @@ -0,0 +1 @@ +youtube-dl.fish usr/share/fish/completions 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 similarity index 100% rename from debian/manpages rename to debian/youtube-dl.manpages