File: rules

package info (click to toggle)
expeyes 4.8.8%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 85,276 kB
  • sloc: python: 33,528; ansic: 9,754; xml: 1,010; makefile: 828; javascript: 824; sh: 580; asm: 202; php: 1
file content (66 lines) | stat: -rwxr-xr-x 2,078 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_BUILD_MAINT_OPTIONS=reproducible=-timeless

LD_LIBRARY_PATH += debian/libexpeyes1/usr/lib
export DEB_BUILD_HARDENING=1
#export CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2"

export QT_SELECT := 5

%:
	dh $@ --with python3

BUILD_DIR = $(CURDIR)/debian/build
override_dh_auto_build-arch:
	mkdir $(CURDIR)/debian/build
	$(MAKE) all_arch HOME=$(BUILD_DIR)
	rm -rf $(CURDIR)/debian/build

override_dh_auto_build-indep:
	$(MAKE) all_indep
	cd eyes17/helpFiles; $(MAKE) fixTheLinks; $(MAKE) userManual

override_dh_auto_clean:
	dh_auto_clean
	# the clean process compiles a few Python scripts
	find . -name __pycache__ | xargs rm -rf
	rm -rf $(BUILD_DIR)
	# remove broken symlinks which can be in the source
	find eyes17/helpFiles -xtype l | xargs rm -f

DOCDIR_17 = debian/eyes17/usr/share/eyes17/doc

override_dh_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
	find $(CURDIR)/debian/tmp -name "*.pdf" -exec chmod -x {} \;
	dh_install
	make -C po install DESTDIR=$(CURDIR)/debian/expeyes
	make -C microhope/po install DESTDIR=$(CURDIR)/debian/microhope
	# remove python files .gitignore, and doctrees from helpFiles subdirectory
	for d in $$(find $(CURDIR)/debian -type d -name helpFiles); do \
	  for f in $$(find $$d -name '*.py' -o -name '.gitignore'); do \
	    rm -f $$f; \
	  done; \
	  for f in $$(find $$d -type d -name 'doctrees'); do \
	    rm -rf $$f; \
	  done; \
	done
	# install eyes17 documents
	for lang in en fr es ml; do \
	  mkdir -p $(DOCDIR_17)/$${lang}; \
	  for ext in pdf epub; do \
	    cp $$(find eyes17/helpFiles/$${lang} -name expEYES-17.$${ext}) \
	       $(DOCDIR_17)/$${lang}/eyes17.$${ext}; \
	  done; \
	done