File: rules

package info (click to toggle)
alembic 1.13.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,976 kB
  • sloc: python: 37,768; makefile: 100; sh: 5
file content (26 lines) | stat: -rwxr-xr-x 940 bytes parent folder | download | duplicates (3)
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
#!/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 -rf {build_dir}/scratch ; rm -f {build_dir}/test_schema.db

%:
	dh $@ --with 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

	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