From f564fa1aec5fbc57e92b39ab88649e29fbb309b6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 29 Oct 2013 21:22:05 -0400 Subject: Initial commit. --- (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..187f72e --- /dev/null +++ b/debian/rules @@ -0,0 +1,68 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + # Uncomment when python3-cssselect is built. + #dh $@ --with python2,python3,sphinxdoc + dh $@ --with python2,sphinxdoc + +override_dh_auto_build: + # Uncomment when python3-cssselect is built. + #set -ex; for python in $$(py3versions -r); do \ + # $$python setup.py build; \ + #done + dh_auto_build + +override_dh_auto_install: + # Uncomment when python3-cssselect is built. + #set -ex; for python in $$(py3versions -r); do \ + # $$python setup.py install --root=$$(pwd)/debian/tmp \ + # --install-layout=deb; \ + #done + dh_auto_install + rm -Rf debian/tmp/usr/share/pyshared/weasyprint/tests/ + +override_dh_installdocs: + python setup.py build_sphinx + dh_installdocs + +override_dh_compress: + dh_compress -X.rst + +override_dh_auto_clean: + dh_auto_clean + rm -Rf build/ docs/_build/ + +get-orig-source: + uscan --noconf --verbose --rename --force-download \ + --download-current-version + +unpack-orig-source: get-orig-source + # Remove currently unpacked source. + for f in * .[!.] .??*; do \ + if [ -e $${f} ] && [ $${f} != debian ] && \ + [ $${f} != .gitignore ]; then \ + rm -Rf $${f}; \ + fi; \ + done + # Unpack source archive. + set -e; \ + source=$$(dpkg-parsechangelog | sed -n 's/^Source: //p'); \ + version=$$(dpkg-parsechangelog | \ + sed -n 's/^Version: \([^-]*\).*$$/\1/p'); \ + tar -xzf ../$${source}_$${version}.orig.tar.gz + # Find directory containing unpacked source files. Move source files + # into the top-level directory. + set -e; \ + for f in */ .[!.]/ .??*/; do \ + if [ -d $${f} ] && [ $${f} != debian ]; then \ + for ff in $${f}/* $${f}/.[!.] $${f}/.??*; do \ + if [ -e $${ff} ]; then \ + mv $${ff} .; \ + fi; \ + done; \ + rmdir $${f}/; \ + fi; \ + done -- cgit v0.9.1