7
7
# version is marked as being modified.
9
9
# Uncomment this to turn on verbose mode.
12
12
# Magic debhelper rule.
14
dh $@ --with python2,python3
14
dh $@ --with python2,python3,autoreconf
16
16
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
17
17
LIBDIR:=/lib/$(DEB_HOST_MULTIARCH)
20
20
PYVERS:=$(shell pyversions --supported)
21
21
PY3VERS:=$(shell py3versions --supported)
23
PYTHON2=$(shell pyversions -r debian/control)
24
PYTHON3=$(shell py3versions -r debian/control)
26
23
ifeq ($(DEB_HOST_ARCH_OS),hurd)
42
39
# remove autogenerated files
43
40
rm -rf Makefile config.h* config.log config.status .depend libnewt.pc \
44
configure install-sh po/*.mo python* tutorial libnewt_pic.a
41
configure install-sh po/*.mo python* tutorial libnewt_pic.a po/newt.pot
45
42
rm -f debian/shlibs.local
46
43
rm -f debian/python*-newt*.examples
48
45
override_dh_auto_configure:
50
46
# Nasty hack. why is it necessary?
51
cp /usr/share/automake-1.11/install-sh ./install-sh
47
cp /usr/share/automake-1.*/install-sh ./install-sh
52
48
dh_auto_configure -- $(GPMSUPPORT) $(NOSTRIP) $(COLORSFILE) CFLAGS="-I/usr/include/tcl8.5 $(CFLAGS)" \
53
49
CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" FFLAGS="$(FFLAGS)"
69
65
pylib=usr/lib/$$v/dist-packages ; \
70
66
mkdir -p debian/python-newt/$$pylib ; \
71
67
mkdir -p debian/python-newt-dbg/$$pylib ;\
72
mv $$v/_snack_d.* debian/python-newt-dbg/$$pylib; \
68
mv $$v-dbg/_snackmodule.so debian/python-newt-dbg/$$pylib/_snackmodule_d.so; \
73
69
cp snack.py $$v/* debian/python-newt/$$pylib; \
75
71
for v in $(PY3VERS); do \
76
pylib=usr/lib/python3/dist-packages ; \
77
abitag=.$$($$v-dbg -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
78
mkdir -p debian/python3-newt/$$pylib ; \
79
mkdir -p debian/python3-newt-dbg/$$pylib ;\
80
mv $$v/_snack$$abitag.so debian/python3-newt-dbg/$$pylib/; \
81
cp snack.py $$v/* debian/python3-newt/$$pylib; \
72
pylib=usr/lib/python3/dist-packages ; \
73
abitag=.$$($$v -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
74
abitagdbg=.$$($$v-dbg -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"); \
75
mkdir -p debian/python3-newt/$$pylib ; \
76
mkdir -p debian/python3-newt-dbg/$$pylib ;\
77
mv $$v/_snackmodule.so $$v/_snack$$abitag.so; \
78
mv $$v-dbg/_snackmodule.so debian/python3-newt-dbg/$$pylib/_snack$$abitagdbg.so; \
79
cp snack.py $$v/* debian/python3-newt/$$pylib; \
83
81
-find debian/python-* debian/python3-* -name '*.o' | xargs rm -f
85
82
dh_install -p libnewt-dev libnewt.a $(USRLIBDIR)
86
83
mkdir -p debian/libnewt-pic/$(USRLIBDIR)
87
84
cp newt*.ver debian/libnewt-pic/$(USRLIBDIR)/libnewt_pic.map