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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# magic debhelper rule
%:
dh $@ --with python2,python3
PYTHON2=$(shell pyversions -vr)
PYTHON3=$(shell py3versions -vr)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_build:
cp debian/aliases.ld Src/aliases.ld
$(MAKE) -C Src all
dh_auto_build
# For some reason, dh_strip isn't stripping this properly, according to lintian
strip Src/libsphere.a
override_dh_auto_install: $(PYTHON3:%=install-python%)
$(MAKE) -C Src install DESTDIR=`pwd`/debian/tmp PREFIX=/usr LIBDIR=$(LIBDIR)
dh_auto_install
dh_link -p libsphere-dev $(LIBDIR)/libsphere.so.0d $(LIBDIR)/libsphere.so
dh_numpy
dh_numpy3
override_dh_auto_clean:
dh_clean
$(MAKE) -C Src clean || echo "No clean target in original Makefile"
rm -rf build Src/aliases.ld
build-python%:
python$* setup.py build
install-python%:
python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
|