File: rules

package info (click to toggle)
libprelude 4.1.0-4.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 21,452 kB
  • sloc: ansic: 103,807; cpp: 64,944; sh: 13,563; perl: 679; makefile: 674; awk: 343; yacc: 241; lex: 178; python: 89; xml: 65
file content (64 lines) | stat: -rwxr-xr-x 1,654 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
#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CONFIGURE_FLAGS = --enable-easy-bindings

ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
	PY2VERS=$(shell pyversions -vr)
	PY3VERS=$(shell py3versions -vr)
	DH_ADDONS += --with python2 --with python3
else
	CONFIGURE_FLAGS += --with-python2=no --with-python3=no
endif

ifeq ($(filter noperl,$(DEB_BUILD_PROFILES)),)
	CONFIGURE_FLAGS += --with-perl-installdirs=vendor
else
	CONFIGURE_FLAGS += --with-perl=no
endif

ifeq ($(filter noruby,$(DEB_BUILD_PROFILES)),)
	DH_ADDONS += --with ruby
else
	CONFIGURE_FLAGS += --with-ruby=no
endif

ifneq ($(filter nolua,$(DEB_BUILD_PROFILES)),)
	CONFIGURE_FLAGS += --with-lua=no
endif

ifneq ($(filter libprelude-doc,$(shell dh_listpackages)),)
	CONFIGURE_FLAGS += --enable-gtk-doc
endif

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_auto_build: build-core $(PY2VERS:%=build-python%) $(PY3VERS:%=build-python%)

build-core:
	dh_auto_build

build-python%:
	cd bindings/python && python$* setup.py build

override_dh_auto_install: install-core $(PY2VERS:%=install-python%) $(PY3VERS:%=install-python%)
install-core:
	dh_auto_install
	find . -name "*.la" -exec sed -i -e 's/^dependency_libs=.*$$/dependency_libs=/g' {} +
install-python%:
	cd bindings/python && python$* setup.py install --root $(CURDIR)/debian/tmp

override_dh_python2:
	dh_python2 -ppython-prelude

override_dh_python3:
	dh_python3 -ppython3-prelude

override_dh_makeshlibs:
	# For new symbols when compiled with GCC 7
	dh_makeshlibs -plibpreludecpp8 -V'libpreludecpp8 (>= 3.1.0-0.5~)'
	dh_makeshlibs --remaining-packages

%:
	dh $@ $(DH_ADDONS)