From 6c279b73c4a42b772a63780de408733b042a87ed Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Mon, 27 Jan 2014 23:16:07 -0800 Subject: Bring back a waf-compatible deiban build system For override_dh_auto_install, just tell waf to install the files under debian/mpv. The main problem was that the script names clean,build,install in the root directory collided with makefile targets in debian/rules which lead make to do nothing since they appeared already up-to-date. .PHONY wasn't enough since the targets are implicit via the % operator. I had to explicitly declare the problematic targets AND list them as .PHONY --- debian/rules | 32 +++++++++++++++++++++++++++++--- scripts/libass-clean | 4 +++- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 9ad668a..2bff34f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,39 @@ #! /usr/bin/make -f +# make .PHONY all the targets that have name collisions with the scripts +# see http://www.debian.org/doc/manuals/maint-guide/dreq.en.html#rules +.PHONY: clean build install +# Apparently, the above isn't enough because of the "%" target. Make the problematic targets explicit +clean: + exec dh $@ --parallel +build: + exec dh $@ --parallel +install: + exec dh $@ --parallel +# handle all other targets in the usual way %: exec dh $@ --parallel -override_dh_auto_build: +ffmpeg_config: scripts/ffmpeg-config - scripts/ffmpeg-build +ffmpeg_build:ffmpeg_config + scripts/ffmpeg-build +libass_config: scripts/libass-config +libass_build:libass_config scripts/libass-build - scripts/mpv-config --prefix=/usr + +# the dependencies must be built before mpv is configured +override_dh_auto_configure:ffmpeg_build libass_build + scripts/mpv-config --prefix=/usr --confdir=/etc/mpv + +override_dh_auto_build: scripts/mpv-build +override_dh_auto_install: + (cd mpv;python ./waf -v install --destdir=../debian/mpv) + +override_dh_auto_clean: + scripts/mpv-clean + scripts/ffmpeg-clean + scripts/libass-clean diff --git a/scripts/libass-clean b/scripts/libass-clean index 2a2efce..d2a431c 100755 --- a/scripts/libass-clean +++ b/scripts/libass-clean @@ -1,3 +1,5 @@ #!/bin/sh -make -C libass distclean +if [ -f libass/Makefile ];then + make -C libass distclean +fi -- cgit v1.2.3