| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
-include /usr/share/dpkg/pkg-info.mk |
| 5 |
|
| 6 |
-include /usr/share/dpkg/architecture.mk |
| 7 |
|
| 8 |
export DEB_CFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS) |
| 9 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 10 |
|
| 11 |
|
| 12 |
MA_DESTDIR ?= debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) |
| 13 |
MA_DEV_DESTDIR ?= debian/libjim-dev/usr/lib/$(DEB_HOST_MULTIARCH) |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ |
| 17 |
|
| 18 |
|
| 19 |
autosetup/jimsh0.c: make-bootstrap-jim |
| 20 |
./$< > $@ |
| 21 |
|
| 22 |
override_dh_autoreconf: |
| 23 |
|
| 24 |
|
| 25 |
override_dh_auto_configure: autosetup/jimsh0.c |
| 26 |
dh_auto_configure --builddirectory=static/ -- |
| 27 |
dh_auto_configure --builddirectory=shared/ -- --shared |
| 28 |
|
| 29 |
override_dh_auto_build: |
| 30 |
dh_auto_build --builddirectory=static/ |
| 31 |
dh_auto_build --builddirectory=shared/ |
| 32 |
|
| 33 |
override_dh_auto_test: |
| 34 |
ifeq ($(DEB_HOST_ARCH), ppc64el) |
| 35 |
@echo "test on ppc64el are flaky" |
| 36 |
dh_auto_test --builddirectory=static/ || true |
| 37 |
dh_auto_test --builddirectory=shared/ || true |
| 38 |
else |
| 39 |
dh_auto_test --builddirectory=static/ |
| 40 |
dh_auto_test --builddirectory=shared/ |
| 41 |
endif |
| 42 |
|
| 43 |
override_dh_auto_install: |
| 44 |
dh_auto_install --builddirectory=static/ |
| 45 |
dh_auto_install --builddirectory=shared/ |
| 46 |
|
| 47 |
|
| 48 |
override_dh_install: |
| 49 |
dh_install |
| 50 |
set -e; rootdir=`pwd` ;\ |
| 51 |
cd ${MA_DESTDIR}; libfile=`ls *.so.*`; cd $${rootdir};\ |
| 52 |
cd ${MA_DEV_DESTDIR}; ln -sf $${libfile} libjim.so |
| 53 |
|
| 54 |
override_dh_missing: |
| 55 |
dh_missing --list-missing |
| 56 |
|
| 57 |
override_dh_auto_clean: |
| 58 |
dh_auto_clean |
| 59 |
rm -f autosetup/jimsh0.c |
| 60 |
rm -f libjim.so* |
| 61 |
rm -f tests/exec.tmp1 |
| 62 |
rm -Rf static/ |
| 63 |
rm -Rf shared/ |