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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
#!/usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build
PYVERS := $(shell pyversions -vr debian/control)
# The directories below are versioned. We only support the packages for the
# stable version of Octave
mpath = $(shell octave-config -p LOCALFCNFILEDIR)/nlopt
bpath = $(shell octave-config -p LOCALOCTFILEDIR)/nlopt
%:
dh $@ --buildsystem=autoconf --builddirectory=$(BUILDDIR) --with python2
override_dh_auto_reconf:
[ -e bin/scripts ] || mkdir -p bin/scripts
cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub bin/scripts
libtoolize --force --automake
aclocal -Im4
autoreconf -i
automake
override_dh_auto_configure: override_dh_auto_reconf
for v in $(PYVERS); do \
dh_auto_configure --builddirectory=$(BUILDDIR)$$v \
-- $(extra_flags) \
--prefix=/usr \
--srcdir=$(CURDIR) \
--enable-shared \
PYTHON=/usr/bin/python$$v \
OCT_INSTALL_DIR=$(bpath) M_INSTALL_DIR=$(mpath) \
GUILE=guile GUILE_CONFIG=guile-config; \
done
override_dh_auto_build:
for v in $(PYVERS); do \
dh_auto_build --builddirectory=$(BUILDDIR)$$v; \
done
override_dh_clean:
dh_clean --exclude='*.orig'
for v in $(PYVERS); do \
rm -rf $(BUILDDIR)$$v; \
done
override_dh_auto_build:
# to prevent bug in install due to build-%/config.status being deleted after build target is done
mkdir -p $(CURDIR)/debian/tmp
for v in $(PYVERS); do \
dh_auto_build --builddirectory=$(BUILDDIR)$$v; \
done
override_dh_strip:
dh_strip
find debian/octave-nlopt/usr/lib -name *.oct | \
xargs strip --strip-unneeded --remove-section=.comment
override_dh_makeshlibs:
dh_makeshlibs $(shell for v in $(PYVERS); do printf -- "-X/usr/lib/python$$v/dist-packages "; done)
override_dh_shlibdeps:
dh_shlibdeps -- \
debian/libnlopt0/usr/lib/*/libnlopt.so.* \
-Tdebian/libnlopt0.substvars
dh_shlibdeps -- \
debian/libnlopt-guile0/usr/lib/*/libnlopt_guile.so.* \
-Tdebian/libnlopt-guile0.substvars
dh_shlibdeps -- \
debian/octave-nlopt/usr/lib/*/octave/site/oct/*/nlopt/*.oct \
-Tdebian/octave-nlopt.substvars
dh_shlibdeps -- \
debian/python-nlopt/usr/lib/python*/dist-packages/*.so* \
-Tdebian/python-nlopt.substvars
override_dh_auto_install:
for v in $(PYVERS); do \
dh_auto_install --builddirectory=$(BUILDDIR)$$v; \
done
dh_numpy
find debian/tmp/usr/lib/python* \
-name '*.pyc' -o -name '*.pyo' \
-o -name '*.la' -o -name '*.a' | xargs rm
override_dh_link:
for package in libnlopt-dev libnlopt-guile0 octave-nlopt python-nlopt; do \
rm -rf debian/$$package/usr/share/doc/$$package; \
done
dh_link
override_dh_auto_test:
for v in $(PYVERS); do \
dh_auto_test --builddirectory=$(BUILDDIR)$$v \
-- $(extra_flags); \
done
|