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
|
#! /usr/bin/make -f
include /usr/share/dpkg/architecture.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CONFIGURE_FLAGS = --without-python2 --enable-easy-bindings
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
CONFIGURE_FLAGS += --with-python3=yes
PY3VERS=$(shell py3versions -vr)
else
CONFIGURE_FLAGS += --with-python3=no
endif
ifeq ($(filter noperl,$(DEB_BUILD_PROFILES)),)
CONFIGURE_FLAGS += --with-perl-installdirs=vendor
else
CONFIGURE_FLAGS += --with-perl=no
endif
ifneq ($(filter noruby,$(DEB_BUILD_PROFILES)),)
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
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
PERLVER=$(shell perl -MConfig -e 'print $$Config{version}')
export PERLLIB=/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER)
RUBYVER=$(shell ruby -e "puts RbConfig::CONFIG['ruby_version']")
export RUBYLIB=/usr/lib/$(DEB_HOST_MULTIARCH)/ruby-crossbuild/$(RUBYVER)
endif
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_FLAGS)
override_dh_auto_build: build-core $(PY3VERS:%=build-python%)
build-core:
dh_auto_build
build-python%:
cd bindings/python && python$* setup.py build
override_dh_autoreconf-arch:
env GTKDOCIZE="echo DISABLED running gtkdocize" dh_autoreconf --verbose -a
override_dh_auto_install: install-core $(PY3VERS:%=install-python%)
install-core:
dh_auto_install -- DEB_PYTHON_INSTALL_LAYOUT=deb
find . -name "__pycache__" -exec rm -rvf {} +
find . -name "*.la" -exec sed -i -e 's/^dependency_libs=.*$$/dependency_libs=/g' {} +
mkdir -pv $(CURDIR)/debian/tmp/usr/share/doc/libprelude-doc
ln -s /usr/share/gtk-doc/html/libprelude $(CURDIR)/debian/tmp/usr/share/doc/libprelude-doc/html
install-python%:
cd bindings/python && python$* setup.py install --root $(CURDIR)/debian/tmp --install-layout=deb
%:
dh $@
|