File: rules

package info (click to toggle)
ofxstatement-plugins 20181208
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,064 kB
  • sloc: python: 7,004; xml: 1,027; makefile: 135; sh: 84
file content (46 lines) | stat: -rwxr-xr-x 1,448 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/make -f
#DH_VERBOSE = 1

export PYBUILD_NAME = ofxstatement-plugins

%:
	dh $@ --with python3

PLUGINS=$(wildcard ofxstatement-*) $(wildcard banking.statements.*)

plugin_clean_% : %
	cd $< && python3 setup.py clean
	rm -f $</$<.README.rst

plugin_build_% : %
	cd $< && python3 setup.py build
	test ! -e $</README.rst || cp $</README.rst $</$<.README.rst

plugin_install_% : %
	cd $< && python3 setup.py install \
		--force --root=$(CURDIR)/debian/ofxstatement-plugins \
		--no-compile -O0 --install-layout=deb
	test ! -e $</$<.README.rst || dh_installdocs $</$<.README.rst
	# Don't install tests
	find $(CURDIR)/debian/ofxstatement-plugins -type d -name 'tests' -print0 | \
		xargs -0r rm -rf
	# Don't install nspkg.pth
	find $(CURDIR)/debian/ofxstatement-plugins -name '*-nspkg.pth' -print0 | \
		xargs -0r rm -rf

plugin_test_% : %
	cd $< && python3 setup.py test


override_dh_auto_clean: $(addprefix plugin_clean_,$(PLUGINS))
	rm -rf ofxstatement-postfinance/build \
		ofxstatement-postfinance/src/ofxstatement_postfinance.egg-info
override_dh_auto_build: $(addprefix plugin_build_,$(PLUGINS))
override_dh_auto_install: $(addprefix plugin_install_,$(PLUGINS))
#override_dh_auto_test: $(addprefix plugin_test_,$(PLUGINS))

sync:
	git submodule update --init
	git submodule foreach git fetch
	git submodule foreach git rebase origin/master
	git commit ofxstatement-* banking.* -s -m "Update submodules" -m "$$(git submodule summary)"