File: rules

package info (click to toggle)
beancount 2.3.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,976 kB
  • sloc: python: 42,325; ansic: 997; yacc: 737; lex: 424; javascript: 339; makefile: 209; xml: 32; sh: 4
file content (43 lines) | stat: -rwxr-xr-x 1,584 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

export PYBUILD_AFTER_BUILD=chmod +x {build_dir}/beancount/tools/treeify.py {build_dir}/beancount/tools/sheets_upload.py; rm {build_dir}/beancount/scripts/setup_test.py
export PYBUILD_TEST_ARGS=-v
export PYBUILD_BEFORE_TEST=cp -r $(CURDIR)/beancount/utils/file_type_testdata {build_dir}/beancount/utils; cd $(CURDIR)/beancount/parser; cp lexer.l grammar.y parser.h parser.c {build_dir}/beancount/parser
export PYBUILD_AFTER_TEST=rm -r {build_dir}/beancount/utils; cd {build_dir}/beancount/parser; rm lexer.l grammar.y parser.h parser.c

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

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

override_dh_auto_build:
	dh_auto_build

ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	cd $(CURDIR)/bin; \
	  for binary in *; do \
	    if [ "X$$binary" = "XBUILD" ]; 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

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/manpages/*.1

override_dh_installexamples:
	dh_installexamples -X __pycache__ -X .picklecache

override_dh_missing:
	dh_missing --fail-missing