#!/usr/bin/make -f # for SOURCE_DATE_EPOCH include /usr/share/dpkg/pkg-info.mk build-indep: binary-indep: rm -rf debian/tmp mkdir -p debian/tmp/DEBIAN/ mkdir -p debian/tmp/usr/src/tinyusb mkdir -p debian/tmp/usr/share/doc/tinyusb-source cp -a hw lib src debian/tmp/usr/src/tinyusb # cleanup rm debian/tmp/usr/src/tinyusb/hw/mcu/sony/cxd56/mkspk/.gitignore rm debian/tmp/usr/src/tinyusb/lib/SEGGER_RTT/LICENSE.md rm debian/tmp/usr/src/tinyusb/lib/fatfs/LICENSE.txt find debian/tmp/usr/src/tinyusb/hw/mcu/nordic -depth -print0 | xargs -0 --no-run-if-empty rmdir chmod -x debian/tmp/usr/src/tinyusb/hw/bsp/nrf/boards/arduino_nano33_ble/arduino_nano33_ble.ld chmod -x debian/tmp/usr/src/tinyusb/src/class/bth/bth_device.c chmod -x debian/tmp/usr/src/tinyusb/src/class/bth/bth_device.h cp -a examples debian/tmp/usr/share/doc/tinyusb-source # Debian stuff cp -a debian/copyright debian/tmp/usr/share/doc/tinyusb-source/copyright gzip -cn9 debian/changelog > debian/tmp/usr/share/doc/tinyusb-source/changelog.Debian.gz mkdir -p debian/tmp/usr/share/lintian/overrides cp debian/tinyusb-source.lintian-overrides debian/tmp/usr/share/lintian/overrides/tinyusb-source chmod -R g-ws debian/tmp # package it up dpkg-gencontrol env --chdir=debian/tmp find -type f ! -regex './DEBIAN/.*' -printf '%P\0' \ | LC_ALL=C sort -z | xargs -r0 env --chdir=debian/tmp md5sum > debian/tmp/DEBIAN/md5sums find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \ xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH" dpkg-deb --build --root-owner-group debian/tmp .. binary-arch build-arch: clean: rm -rf debian/tmp binary: binary-indep binary-arch build: build-indep build-arch