File: rules

package info (click to toggle)
gramps 6.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 102,968 kB
  • sloc: python: 220,782; xml: 1,452; sh: 462; makefile: 183; javascript: 24
file content (45 lines) | stat: -rwxr-xr-x 1,446 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
#!/usr/bin/make -f

# Turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v

export PYBUILD_NAME=gramps
# export PYBUILD_INSTALL_ARGS_python3=--resourcepath=/usr/share --force

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

# Override auto_test to set HOME to find Gramps resources
override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p "$(CURDIR)/build/.gramps"
	HOME=$(CURDIR)/build \
	python3 setup.py test
endif

execute_before_dh_auto_build:
	@echo "blhc: ignore-line-regexp: ^.*Compiling\\s+po/\\S+\\.po\\s.*"
	@echo "blhc: ignore-line-regexp: ^.*Compiling\\s+data/\\S+\\.in\\s.*"

# Override of auto_install to remove information from package
override_dh_auto_install:
	dh_installchangelogs NEWS
	dh_auto_install
	# Remove install file as it is not needed by package users
	rm $(CURDIR)/debian/gramps/usr/share/doc/gramps/INSTALL
	# Remove NEWS file as it is now installed as the changelog
	rm $(CURDIR)/debian/gramps/usr/share/doc/gramps/NEWS
	#Remove license information in COPYING file & link to system license
	rm $(CURDIR)/debian/gramps/usr/share/doc/gramps/COPYING
	ln -s /usr/share/common-licenses/GPL-2 $(CURDIR)/debian/gramps/usr/share/doc/gramps/COPYING

# Fix clean target
override_dh_clean:
	rm -rf gramps/plugins/lib/holidays.xml
	rm -rf po/.intltool-merge-cache
	dh_clean

# Don't compress example files
override_dh_compress:
	dh_compress -X sample.ged -X data.gramps -X example.gramps