File: rules

package info (click to toggle)
beancount 3.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,180 kB
  • sloc: python: 22,344; yacc: 753; ansic: 586; lex: 494; cpp: 44; makefile: 34
file content (47 lines) | stat: -rwxr-xr-x 1,684 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
47
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export PYBUILD_AFTER_BUILD=chmod +x {build_dir}/beancount/tools/treeify.py

# Failing tests, need to be solved later
export PYBUILD_TEST_ARGS=-v -k "not test_export_basic"
export PYBUILD_BEFORE_TEST=cp -r $(CURDIR)/beancount {build_dir}/beancount;
export PYBUILD_AFTER_TEST=:;

%:
	dh $@ --buildsystem pybuild

override_dh_python3:
	dh_python3 --recommends bottle --suggests google-api-python-client --suggests beautifulsoup4 --suggests requests

# Skip generation of specific tools for now, need to be solved later
execute_after_dh_auto_build:
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	cd $(CURDIR)/bin; \
	  for binary in *; do \
	    if [ "X$$binary" = "XBUILD" ]; then continue; fi ; \
	    if [ "X$$binary" = "Xbean-check" ]; then continue; fi ; \
	    if [ "X$$binary" = "Xbean-doctor" ]; then continue; fi ; \
	    if [ "X$$binary" = "Xbean-example" ]; then continue; fi ; \
	    if [ "X$$binary" = "Xbean-format" ]; then continue; fi ; \
	    PYTHONPATH=$$(cd $(CURDIR); pybuild --print build_dir --interpreter python3) \
	      help2man \
	        --name "$$(grep $$binary $(CURDIR)/debian/manpages/whatis.txt | cut -f 2)" \
	        --no-info \
	        --help-option=-h \
	        --version-string=$(DEB_VERSION_UPSTREAM) \
	        ./$$binary > $(CURDIR)/debian/manpages/$$binary.1 ; \
	  done
endif

execute_after_dh_auto_clean:
	rm -f debian/manpages/*.1

override_dh_installexamples:
	dh_installexamples -X __pycache__ -X .picklecache

execute_after_dh_fixperms:
	find debian/*/usr/lib/python*/*-packages/beancount/* -type f -name '*.py' -exec chmod -x {} +