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
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for libsbml
### define the VARS ###
### part 1 of a dirty hack for octave bindings ###
OCTAVE_PATH ?= usr$(shell grep LOCALOCTFILEDIR config/makefile-common-vars.mk | tr -s ' ' ' ' | cut -d\ -f3)
version := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d- -f1)
major := $(shell dpkg-parsechangelog | grep Version | cut -d\ -f2 | cut -d. -f1)
libpack := libsbml
debtmp := $(CURDIR)/debian/tmp
dbgpack := $(libpack)$(major)-dbg
SRC_TMP := $(CURDIR)/SRC_TMP
# Test for matlab
CMAKE_OPTS := $(shell sed '/MATLAB/d' debian/cmake_opts)
BIND_MATLAB := $(shell which matlab | grep -q matlab && echo 'yes')
ifdef BIND_MATLAB
CMAKE_OPTS := $(shell cat debian/cmake_opts)
endif
### let's do it ###
DEB_COMPRESS_EXCLUDE = .pdf
%:
dh $@ --with-python2 --dbg-package=${dbgpack}
get-orig-source:
uscan --verbose --download-current-version --force-download --repack --compression xz
override_dh_auto_clean:
### the clean target of the libsbml makefile is highly b0rken ###
### the switch to cmake didn't result in great approvements ###
### still inline changes of files ###
### very ugly ###
rm -rf build docs/formatted changelog docs/src/doxygen-version-specific.txt docs/src/doxygen-config-cpp.txt \
docs/src/doxygen-config-csharp.txt docs/src/doxygen-config-perl.txt docs/src/doxygen-config-python.txt \
docs/src/java-substitutions/libsbmlConstants.java docs/src/libsbml-installation.html docs/src/perlmod/DoxyDocs.pm \
docs/src/perlmod/DoxyStructure.pm docs/src/perlmod/Makefile docs/src/perlmod/doxyrules.make \
src/bindings/matlab/runTests.log docs/src/doxygen-config-c.txt src/bindings/matlab/*.mex*
find src/bindings -name "*.pyc" -delete
override_dh_auto_configure:
ifdef BIND_MATLAB
sed -e 's/^#//' debian/control.in > debian/control || true
else
grep -v ^# debian/control.in > debian/control
endif
mkdir -p build
cd build ; cmake $(CMAKE_OPTS) ../
/bin/sh debian/bin/python_fix.sh
override_dh_auto_build:
cd build ; make
cp NEWS.txt changelog
override_dh_auto_test:
echo "no tests"
override_dh_auto_install:
cd build ; DESTDIR=../debian/tmp make install
dh_auto_install
pyclean $(debtmp)/usr/lib/python*
find $(debtmp)/usr -type f -name "*.js" -delete
find $(debtmp)/usr -type f -exec chmod 644 {} +
test -e $(debtmp)/usr/lib/python2.7/site-packages && mv $(debtmp)/usr/lib/python2.7/site-packages $(debtmp)/usr/lib/python2.7/dist-packages || true
find $(debtmp)/usr/lib -name "*.mex*" -exec strip --strip-unneeded {} + || true
find $(debtmp)/usr/lib -name "*.mex*" -exec strip --remove-section=.comment {} + || true
dpkg-shlibdeps $(debtmp)/usr/lib/*/*/*/*/*.mex -Tdebian/libsbml5-octave.substvars
ifdef BIND_MATLAB
dpkg-shlibdeps $(debtmp)/usr/lib/*.mex* -Tdebian/libsbml5-matlab.substvars
endif
|