File: rules

package info (click to toggle)
efl 1.28.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 369,516 kB
  • sloc: ansic: 1,078,016; cpp: 45,806; cs: 21,172; asm: 3,739; python: 3,733; javascript: 3,069; objc: 1,514; sh: 771; pascal: 431; xml: 349; makefile: 88
file content (123 lines) | stat: -rwxr-xr-x 3,579 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# -O3 is used by default with the meson build.  -O2 triggers cxx weak
# -symbols in libephysics1 that shouldn't be there.
export DEB_CFLAGS_MAINT_APPEND = -fvisibility=hidden -O3 -std=gnu17
export DEB_CXXFLAGS_MAINT_APPEND = -fvisibility=hidden -O3
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed

ifneq (,$(filter $(DEB_HOST_ARCH), armhf armel))
	arch_flags += -Dnative-arch-optimization=false
endif

BINPKGS := $(shell dh_listpackages | paste -sd " ")

ifeq (linux,$(DEB_HOST_ARCH_OS))
	fb_flags += -Dfb=true
endif

# upstream's default is to not build the docs.  Enable it, unless:
# 1) efl-doc binary pkg was suppressed (e.g. due to an only-arch-any build)
# 2) nodoc is specified in the build options
ifeq ($(filter efl-doc,$(BINPKGS)),efl-doc)
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	doc_flags += -Ddocs=true
endif
endif

%:
	dh $@

override_dh_auto_configure:
# cross-builds need host eolian_gen, but ensure the versions match
ifneq (,$(filter cross,$(DEB_BUILD_PROFILES)))
	test "`dpkg-query -f '$${Version}' -W libedje-bin | sed 's/+b[0-9]*$$//'`" = "$(DEB_VERSION)"
	test "`dpkg-query -f '$${Version}' -W libeet-bin | sed 's/+b[0-9]*$$//'`" = "$(DEB_VERSION)"
	test "`dpkg-query -f '$${Version}' -W libelementary-bin | sed 's/+b[0-9]*$$//'`" = "$(DEB_VERSION)"
	test "`dpkg-query -f '$${Version}' -W libeolian-bin | sed 's/+b[0-9]*$$//'`" = "$(DEB_VERSION)"
endif

	$(CURDIR)/debian/validate_symvers.sh

	dh_auto_configure --verbose -- \
		-Dcrypto=openssl \
		-Dtslib=false \
		-Dembedded-lz4=false \
		-Dembedded-libunibreak=false \
		-Devas-loaders-disabler=json,avif \
		-Dnetwork-backend=none \
		-Dwl=true \
		-Ddrm=true \
		-Dbuild-tests=false \
		-Dlua-interpreter=lua \
		-Dbindings= \
		$(arch_flags) \
		$(fb_flags) \
		$(doc_flags)

override_dh_auto_build:
	# ensure shaders are rebuilt from sources
	find -name '*shader*.x' -exec rm {} \;
	cd src && lib/ector/gl/shader/gen_shaders.sh
	cd src && modules/evas/engines/gl_common/shader/gen_shaders.sh

	dh_auto_build --verbose
ifeq ($(filter efl-doc,$(BINPKGS)),efl-doc)
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_auto_build -- doc
endif
endif

override_dh_auto_build-indep:
ifeq ($(filter efl-doc,$(BINPKGS)),efl-doc)
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_auto_build -- doc
endif
endif

execute_before_dh_install:
	# dh_fixperms misses this one for some reason
	chmod -x debian/tmp/usr/share/elementary/images/animated_webp_image.webp

execute_after_dh_install:
	# remove unused file, fail otherwise
	rm -f obj-$(DEB_HOST_GNU_TYPE)/html/jquery.js
	if grep -qr jquery.js obj-$(DEB_HOST_GNU_TYPE)/html/ ; \
		then echo jquery is used ; false ; fi
	# this is shipped under /usr/share/docs
	rm -f debian/libelementary-data/usr/share/icons/Enlightenment-X/README

override_dh_makeshlibs:
	dh_makeshlibs -Xmodule.so

override_dh_shlibdeps:
	dh_shlibdeps -Nlibefreet1a
	dh_shlibdeps -plibefreet1a -- -xlibefreet-bin

override_dh_clean:
	dh_clean
	find -name '*.luac' -exec rm {} \;

override_dh_installexamples:
	dh_installexamples -X.gitignore

override_dh_auto_test-indep:

override_dh_auto_test-arch:

override_dh_installman:
	dh_installman
ifeq ($(filter efl-doc,$(BINPKGS)),efl-doc)
	dh_installman -pefl-doc --sourcedir obj-$(DEB_HOST_GNU_TYPE)
endif

override_dh_installdocs:
	dh_installdocs
ifeq ($(filter efl-doc,$(BINPKGS)),efl-doc)
	dh_installdocs -pefl-doc --doc-main-package=efl-doc obj-$(DEB_HOST_GNU_TYPE)/html
endif