File: rules

package info (click to toggle)
efl 1.25.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 264,272 kB
  • sloc: ansic: 1,078,087; cpp: 45,750; cs: 21,136; asm: 3,739; python: 3,733; javascript: 3,069; objc: 1,514; sh: 787; pascal: 431; xml: 401; makefile: 90
file content (126 lines) | stat: -rwxr-xr-x 3,745 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
124
125
126
#!/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
export DEB_CXXFLAGS_MAINT_APPEND = -fvisibility=hidden -O3
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,--as-needed

ifneq (,$(filter $(DEB_HOST_ARCH), alpha arm64 hppa ia64 m68k powerpc riscv64 s390x sh4 sparc64 x32))
	lua_flags = -Dlua-interpreter=lua -Delua=false -Dbindings=
	dhinstallflags += --exclude=elua
else
	lua_flags = -Delua=true -Dbindings=lua

endif

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

%:
	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=gnutls \
		-Dtslib=false \
		-Dembedded-lz4=false \
		-Devas-loaders-disabler=json,avif \
		-Dnetwork-backend=none \
		-Dwl=true \
		-Ddrm=true \
		-Dbuild-tests=false \
		$(arch_flags) \
		$(fb_flags) \
		$(lua_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

	$(CURDIR)/debian/fake_home.sh env \
		dh_auto_build --verbose
ifeq ($(filter efl-doc,$(BINPKGS)),efl-doc)
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	$(CURDIR)/debian/fake_home.sh dh_auto_build -- doc
endif
endif

override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	$(CURDIR)/debian/fake_home.sh dh_auto_build -- doc
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

override_dh_install:
	dh_install $(dhinstallflags)

	# 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

execute_before_dh_missing:
ifneq ($(filter libelua1,$(BINPKGS)),libelua1)
	# upstream installs some elua files even if elua is disabled
	echo 'usr/share/elua*' >> debian/not-installed
endif

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 -XVera.ttf

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