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
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Passing --no-parallel because of some creepy race conditions, like
# on building x11-compat which can get built twice and if the second
# build happens at just the wrong time it interferes with the first
# build or with an invocation of the generated executable.
%:
dh $@ --no-parallel
override_dh_autoreconf:
dh_autoreconf sh -- -e -x -c \
'for d in src doc; \
do (cd $$d && autoreconf -f -i) done'
CONF_FLAGS += --docdir=/usr/share/doc/mit-scheme-doc
CONF_FLAGS += --enable-html=/usr/share/doc/mit-scheme-doc/html
CONF_FLAGS += --enable-pdf=/usr/share/doc/mit-scheme-doc/pdf
CONF_FLAGS += --enable-ps=no
override_dh_auto_configure-arch:
dh_auto_configure --sourcedirectory=src -- $(CONF_FLAGS)
override_dh_auto_configure-indep:
dh_auto_configure --sourcedirectory=doc -- $(CONF_FLAGS)
# May wish to pass parameter in dh_auto_build
# SCHEME_COMPILER=mit-scheme
override_dh_auto_build-arch:
dh_auto_build --sourcedirectory=src
override_dh_auto_build-indep:
dh_auto_build --sourcedirectory=doc
DEB_HOST_GNU_CPU=$(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
ifeq ($(DEB_HOST_GNU_CPU),x86_64)
BIN_ARCH=x86-64
else
BIN_ARCH=$(DEB_HOST_GNU_CPU)
endif
override_dh_auto_install-arch:
dh_auto_install --sourcedirectory=src
@echo remove symbolic link executables
cd debian/tmp/usr/bin && \
for f in scheme bchscheme mit-scheme mit-scheme-native; do \
if [ -L $$f ]; then \
rm --verbose -f $$f; \
else \
echo skipping $$f; \
fi; \
done
# @echo delete runtime.com for MYSTERIOUS reasons
# @echo stop doing this because it breaks future builds
# find debian/tmp/usr/lib -name runtime.com -ls -delete
@echo remove .la library support files as these are not actually used by the dynamic linker
find debian/tmp -name '*.la' -ls -delete
override_dh_auto_install-indep:
dh_auto_install --sourcedirectory=doc -- install-html install-pdf
@echo allow dh scripts to compress info files themselves
find debian/tmp \( -name '*.info.gz' -o -name '*.info-*.gz' \) -ls -exec gunzip '{}' ';'
override_dh_install-arch:
dh_install
@echo All .bci files belong in -dbg, move them manually for robustness
mkdir -p debian/mit-scheme-dbg
tar -C debian/mit-scheme --create --file=- --files-from=/dev/null $$(cd debian/mit-scheme && find -name '*.bci') \
| tar -C debian/mit-scheme-dbg -xvf -
find debian/mit-scheme -name '*.bci' -delete
@echo remove empty directory
-rmdir debian/mit-scheme/usr/lib/x86_64-linux-gnu/mit-scheme/lib
# Upstream changelog is over 5MB, leave a copy in the doc package but
# remove it from the binary package to reduce bloat.
# See http://dedup.debian.net/.
override_dh_installchangelogs-arch:
dh_installchangelogs
-rm --verbose \
debian/mit-scheme/usr/share/doc/mit-scheme/changelog \
debian/mit-scheme-dbg/usr/share/doc/mit-scheme-dbg/changelog
override_dh_link-arch:
dh_link /usr/share/man/man1/mit-scheme.1.gz \
/usr/share/man/man1/mit-scheme-$(BIN_ARCH).1.gz
override_dh_auto_clean:
-dh_auto_clean
override_dh_clean:
dh_clean --exclude=TAGS
|