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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
#export V=1
PTH = $(abspath $(dir $(MAKEFILE_LIST)))
VER ?= $(shell dpkg-parsechangelog --file $(PTH)/changelog \
--show-field version \
| sed -e "s,\(.*\)-.*,\\1," -e "s,.*:,," -e "s,.dfsg[0-9]*,,")
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CFLAGS_MAINT_APPEND=$(shell getconf LFS_CFLAGS)
MA = /$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh $@
override_dh_auto_clean:
rm -f examples.tar
rm -f debian/examples/board_simduino/ATmegaBOOT_168_atmega328.ihex
dh_auto_clean
override_dh_auto_build:
dh_auto_build -- RELEASE=1 SIMAVR_VERSION=$(VER) all doc
ln -s /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex debian/examples/board_simduino/ATmegaBOOT_168_atmega328.ihex
tar cf examples.tar \
--mode=644 \
--numeric-owner \
--owner=0 \
--group=0 \
--mode=go=rX,u+rw,a-s \
--mtime=./examples/Makefile \
--files-from=debian/examples.tarball
tar rf examples.tar \
--numeric-owner \
--owner=0 \
--group=0 \
--mode=go=rX,u+rw,a-s \
--mtime=./debian/examples/makefile.common \
-C debian examples
override_dh_auto_install:
dh_auto_install -- PREFIX=/usr RELEASE=1 SIMAVR_VERSION=$(VER) MA=$(MA)
override_dh_install:
dh_install --list-missing
get-orig-source:
uscan --no-conf \
--verbose \
--destdir=$(CURDIR) \
--rename \
--force-download \
--download-version $(VER) \
--check-dirname-level=0 \
$(PTH)
|