1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export PYBUILD_NAME=alembic
export PYBUILD_BEFORE_TEST=cp {dir}/setup.cfg {build_dir}
export PYBUILD_AFTER_TEST=rm {build_dir}/setup.cfg ; rm -r {build_dir}/scratch ; rm {build_dir}/test_schema.db
%:
dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
python3 -m sphinx -b html docs/build $(CURDIR)/debian/alembic/usr/share/doc/alembic/html
dh_sphinxdoc
rm $(CURDIR)/debian/alembic/usr/share/doc/alembic/html/_static/site_custom_css.css
endif
override_dh_auto_install:
dh_auto_install
rm -rf debian/python-alembic/usr/bin
mkdir -p debian/alembic/usr
mv $(CURDIR)/debian/python3-alembic/usr/bin $(CURDIR)/debian/alembic/usr/
help2man:
help2man --version-string=$(DEB_VERSION_UPSTREAM) -n "lightweight database migration tool for usage with the SQLAlchemy" -N alembic > debian/alembic.1
sed -i "s/,\(\w\)/, \1/g" debian/alembic.1
|