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
|
#!/usr/bin/make -f
%:
dh "$@" --with autoreconf
# Use ccache if pkg.giac.ccache build-profile is active.
# Your rebuilds will be *much quicker*.
ifneq (,$(filter pkg.giac.ccache,$(DEB_BUILD_PROFILES)))
export PATH := /usr/lib/ccache:$(PATH)
export CCACHE_DIR := $(CURDIR)/debian/ccache
#export CCACHE_BASEDIR := $(CURDIR)/debian/build
$(shell mkdir -p "$(CCACHE_DIR)")
endif
# ~/.xcasrc sometimes interferes with doc/test targets, causing failures
export HOME=/nonexistent
execute_before_dh_auto_clean:
# Remove Makefile if it exists because it contains wrong hard-coded paths
if [ -f ./Makefile ]; then\
rm -f ./Makefile;\
fi
# Remove configure generated files
if [ -f ./config.log ]; then\
rm -f ./config.log;\
fi
if [ -f ./config.status ]; then\
rm -f ./config.status;\
fi
override_dh_autoreconf:
# Deal with embedded stuff
find doc/ -maxdepth 1 -type d -exec ln -sf /usr/share/texmf/tex/texinfo/texinfo.tex '{}/' \;
# Deal with emscripten placeholder
cp debian/giac.js doc/giac.js
# Actually configure
dh_autoreconf
override_dh_auto_build-arch:
# Should be the same order as SUBDIRS in Makefile.am
dh_auto_build -a -D micropython-1.12
dh_auto_build -a -D src
dh_auto_build -a -D intl
dh_auto_build -a -D po
dh_auto_build -a -D doc -- info
override_dh_auto_test-arch:
dh_auto_test -a -D check -- VERBOSE=1
override_dh_auto_test-indep:
true
override_dh_auto_install-arch:
# Should be the same order as SUBDIRS in Makefile.am
dh_auto_install -a -D src
dh_auto_install -a -D intl
dh_auto_install -a -D po
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp AM_UPDATE_INFO_DIR=no -C doc \
install-info install-dist_pkgdataDATA
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install-exec-hook
override_dh_install: fix_encoding
rm -f debian/tmp/usr/lib/*/libgiac.la
rm -f debian/tmp/usr/include/giac/config.h
dh_install
override_dh_missing:
dh_missing --fail-missing
override_dh_fixperms-indep:
dh_fixperms
find debian/giac-doc/usr/share/giac/examples/ \
\( -name '*.cas' -o -name '*.xws' -o -name '*.cxx' \) -exec chmod -x '{}' \;
chmod -x debian/giac-doc/usr/share/giac/examples/lewisw/*_?var
ENCODING_FILES = \
/usr/share/giac/doc/en/casinter/casinter001.html \
/usr/share/giac/doc/en/casinter/casinter002.html \
/usr/share/giac/doc/en/casinter/casinter004.html \
/usr/share/giac/doc/en/casinter/casinter005.html \
/usr/share/giac/doc/en/casinter/casinter006.html \
/usr/share/giac/doc/en/casinter/index.html \
/usr/share/giac/examples/arit/codage.cas \
/usr/share/giac/examples/demo/e05.tex \
/usr/share/giac/examples/geo/geo2 \
/usr/include/giac/monomial.h \
/usr/include/giac/poly.h \
/usr/include/giac/prog.h
fix_encoding:
for toto in $(ENCODING_FILES); do \
iconv -f iso-8859-15 -t utf-8 debian/tmp$$toto > debian/tmp$$toto.fix ; \
mv debian/tmp$$toto.fix debian/tmp$$toto ; \
done
|