#!/usr/bin/make -f export LC_ALL=C.UTF-8 SASS_OPTIONS := --load-path debian/missing-sources/bourbon/dist \ --load-path debian/missing-sources/neat/app/assets/stylesheets \ --load-path /usr/share/fonts-font-awesome/scss \ --load-path debian/missing-sources/wyrm/sass \ --style compressed \ --sourcemap=none COMMON_PATH = debian/sphinx-rtd-theme-common/usr/share/sphinx_rtd_theme PY2_PATH = debian/python-sphinx-rtd-theme/usr/lib/python2.7/dist-packages/sphinx_rtd_theme PY3_PATH = debian/python3-sphinx-rtd-theme/usr/lib/python3/dist-packages/sphinx_rtd_theme %: dh $@ --with python2,python3 --buildsystem=pybuild override_dh_auto_build: mkdir -p sphinx_rtd_theme/static/css sass $(SASS_OPTIONS) sass/theme.sass sphinx_rtd_theme/static/css/theme.css sass $(SASS_OPTIONS) sass/badge_only.sass sphinx_rtd_theme/static/css/badge_only.css mkdir -p sphinx_rtd_theme/static/js sed s/module.exports.ThemeNav/_ThemeNav/ js/theme.js > sphinx_rtd_theme/static/js/theme.js mkdir -p sphinx_rtd_theme/static/fonts cp /usr/share/fonts/truetype/lato/Lato-Bold.ttf sphinx_rtd_theme/static/fonts/ cp /usr/share/fonts/truetype/lato/Lato-BoldItalic.ttf sphinx_rtd_theme/static/fonts/ cp /usr/share/fonts/truetype/lato/Lato-Italic.ttf sphinx_rtd_theme/static/fonts/ cp /usr/share/fonts/truetype/lato/Lato-Regular.ttf sphinx_rtd_theme/static/fonts/ cp /usr/share/fonts/truetype/roboto/slab/RobotoSlab-Bold.ttf sphinx_rtd_theme/static/fonts/ cp /usr/share/fonts/truetype/roboto/slab/RobotoSlab-Regular.ttf sphinx_rtd_theme/static/fonts/ set -ex; cd sphinx_rtd_theme/static/fonts/; for ttf in *.ttf; do woff2_compress $$ttf; done dh_auto_build override_dh_link: dh_link -p sphinx-rtd-theme-common rm -rf $(PY2_PATH)/static $(PY3_PATH)/static set -ex; for d in static/css static/fonts static/js; do \ mkdir -p $(PY2_PATH)/$$d; \ mkdir -p $(PY3_PATH)/$$d; \ done set -ex; for f in `cd $(COMMON_PATH) && find -type f -or -type l | sed "s,^\./,,"`; do \ ln -sf /usr/share/sphinx_rtd_theme/$$f $(PY2_PATH)/$$f; \ ln -sf /usr/share/sphinx_rtd_theme/$$f $(PY3_PATH)/$$f; \ done dh_link --remaining-packages # To make the created symlinks relative touch debian/sphinx-rtd-theme-common/usr/share/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf touch debian/sphinx-rtd-theme-common/usr/share/sphinx_rtd_theme/static/fonts/Inconsolata-Regular.ttf