File: rules

package info (click to toggle)
exactimage 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,040 kB
  • sloc: cpp: 35,940; ansic: 1,952; xml: 1,447; makefile: 338; perl: 138; sh: 110; python: 45; php: 37; ruby: 12
file content (55 lines) | stat: -rwxr-xr-x 2,427 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all abi=+lfs
export DEB_CFLAGS_MAINT_APPEND=-fopenmp -ffunction-sections -fdata-sections -fpermissive
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--gc-sections
PERL_ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')

MAKEOPTIONS = X_SYSTEM=Linux Q=

MAKE := $(MAKE) X_SYSTEM=Linux Q=

binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep:
	dh $@ --with=python3

override_dh_auto_configure:
	./configure --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --with-ruby=no --with-php=no --with-evas=no

override_dh_auto_clean:
	touch config.make
	dh_auto_clean -- $(MAKEOPTIONS)

override_dh_auto_test:

override_dh_auto_build:
	mkdir -p objdir/api/python/
	touch objdir/api/python/_ExactImage.so # prevent from being built this time
	dh_auto_build -- all $(MAKEOPTIONS)
	set -e; \
	for python in $(shell py3versions -r); do \
		rm -f objdir/api/python/_ExactImage.so; \
		dh_auto_build -- $(MAKEOPTIONS) objdir/api/python/_ExactImage.so PYTHONINCS=`$$python-config --includes`; \
		mkdir -p objdir/api/$$python; \
		PYEXT=$$($${python} -c 'from distutils.sysconfig import get_config_var; print(get_config_var("EXT_SUFFIX"))'); \
		cp objdir/api/python/_ExactImage.so objdir/api/$$python/_ExactImage$${PYEXT}; \
		cp objdir/api/python/ExactImage.py objdir/api/$$python/; \
		chmod a-x objdir/api/$$python/*; \
	done
	$(MAKE) -C debian/manpages/

override_dh_auto_install:
	sed -e 's,$${perl_archlib},$(PERL_ARCHLIB),g' debian/libexactimage-perl.install.in > debian/libexactimage-perl.install
	dh_auto_install -- $(MAKEOPTIONS) WITHPYTHON=0
	set -e; \
	for python in $(shell py3versions -r); do \
		PYDIR=$$($${python} -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'); \
		mkdir -p debian/tmp/$${PYDIR}; \
		cp -a objdir/api/$$python/* debian/tmp/$${PYDIR}; \
	done

override_dh_shlibdeps:
	dh_shlibdeps
	sed -i -e '/shlibs:Depends.*\(libevas[^ ]*\).*/ { p; s//evas:Depends=\1-engines-x/; b }; /^evas:Depends=/d' debian/*.substvars

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \
	override_dh_auto_configure override_dh_auto_build override_dh_auto_install override_dh_shlibdeps override_dh_auto_clean override_dh_auto_test