summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: e55e84c364ff98c13b798e080317cc865d437709 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --buildsystem=pybuild --verbose --with python3

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) test.unit
endif

clean:
	dh_clean asciinema.egg-info/ asciinema/commands/__pycache__/ tests/__pycache__/ asciinema/__pycache__/ .pybuild/ pybuild/ .mypy_cache/

# taken from openstack-pkg-tools
gen-orig-gz:
	git tag -v v$(DEB_VERSION_UPSTREAM)
	if [ ! -f ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz ] ; then \
		git archive --prefix=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/ v$(GIT_TAG) | gzip >../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz ; \
	fi