File: rules

package info (click to toggle)
beancount 2.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 8,080 kB
  • sloc: python: 44,026; yacc: 741; ansic: 649; lisp: 506; makefile: 215; xml: 32; sh: 4
file content (48 lines) | stat: -rwxr-xr-x 1,721 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
48
#!/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 {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,elpa --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

	sed s/#VERSION#/$(DEB_VERSION_UPSTREAM)/g $(CURDIR)/debian/beancount-pkg.el.in > $(CURDIR)/editors/emacs/beancount-pkg.el

ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
	cd $(CURDIR)/bin; \
	  for binary in *; do \
	    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_auto_install:
	dh_auto_install
	rm -r $(CURDIR)/debian/tmp/usr/elisp

override_dh_installexamples:
	dh_installexamples -X __pycache__ -X .picklecache

override_dh_missing:
	dh_missing --fail-missing