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
|
#!/usr/bin/make -f
export DEB_CXXFLAGS_MAINT_APPEND=-pthread -Wall -std=c++17
export DEB_LDFLAGS_MAINT_APPEND=-pthread
export CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS | sed s/-O2/-O3/)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIB_PKG = libre2-11
ABI_PKG = $(LIB_PKG)-absl$(shell pkgconf --modversion absl_base)
%:
dh $@ --with python3
execute_after_dh_auto_clean:
dh_auto_clean --sourcedir=python --buildsystem pybuild
execute_after_dh_auto_configure:
dh_auto_configure --sourcedir=python --buildsystem pybuild
override_dh_auto_build:
rm -f re2/perl_groups.cc re2/unicode_casefold.cc re2/unicode_groups.cc
dh_auto_build -- REBUILD_TABLES=1
dh_auto_build --sourcedir=python --buildsystem pybuild
override_dh_auto_install:
dh_auto_install -- prefix=/usr libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
dh_auto_install --sourcedir=python --buildsystem pybuild
execute_after_dh_auto_test:
dh_auto_test --sourcedir=python --buildsystem pybuild -- \
--test-custom \
--test-args="cd {build_dir} && cp {dir}/re2_test.py . && LD_LIBRARY_PATH=$(CURDIR)/obj/so {interpreter} re2_test.py; rm -f re2_test.py"
override_dh_makeshlibs:
echo "re2:Provides=$(ABI_PKG)" >> debian/$(LIB_PKG).substvars
dh_makeshlibs -p$(LIB_PKG) -V "$(ABI_PKG)"
dh_makeshlibs --remaining-packages
override_dh_installdocs:
dh_installdocs --link-doc=$(LIB_PKG)
override_dh_gencontrol:
dh_gencontrol -- -VBuilt-Using='$(shell dpkg-query -f'$${source:Package} (= $${source:Version})' -W unicode-data)'
|