- @echo "Despite the warnings from dh_shlibdeps, this should complete dependencies:"
- echo "mozilla:Depends=mozilla-browser (= $$(dpkg-query -W --showformat='$${version}' mozilla-browser))" >> debian/videolink.substvars
+ # VideoLink relies on some "internal" APIs which we cannot trust
+ # Mozilla.org not to break between releases or even with security
+ # patches. So we add a dependendency on the exact same version
+ # of the library that we're building against.
+ if pkg-config --exists xulrunner-gtkmozembed; then \
+ MOZ_VERSION=$$(dpkg-query -W --showformat='$${version}' libxul0d | sed 's/+b[0-9]*$$//') \
+ && echo "mozilla:Depends=libxul0d (>= $$MOZ_VERSION), libxul0d (<< $${MOZ_VERSION}+b99)" >> debian/videolink.substvars ; \
+ else \
+ MOZ_VERSION=$$(dpkg-query -W --showformat='$${version}' mozilla-browser | sed 's/+b[0-9]*$$//') \
+ && echo "mozilla:Depends=mozilla-browser (>= $$MOZ_VERSION), mozilla-browser (<< $${MOZ_VERSION}+b99)" >> debian/videolink.substvars ; \
+ fi