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
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --with autoreconf
override_dh_auto_clean:
if [ -f config/compile ]; then dh_auto_clean; fi
if [ -d debian/saved ]; then \
mv -v debian/saved/tools_git_sha .; \
rmdir debian/saved; \
fi
override_dh_clean:
dh_clean
find . -name '*.o' -o -name '*.a' -o -name '*.so' -o -name '*.lo' \
-o -name '*.d' -o -name '*.la' \
| xargs -r rm -f
find . -name .libs | xargs -r rm -rf
# Skip ext_libs/
@for Makefile in `find . -name Makefile`; do \
if [ $$Makefile = ./kernel/Makefile ]; then continue; fi; \
if [ ! -e $$Makefile.in ]; then \
rm -fv $$Makefile; \
fi; \
done
override_dh_auto_configure:
if [ ! -d debian/saved ]; then \
mkdir -p debian/saved; \
cp -av tools_git_sha debian/saved/; \
fi
dh_auto_configure -- --enable-adb-generic-tools
override_dh_auto_install:
dh_auto_install
# Remove library for now. Needs to be properly packaged:
rm -rf \
debian/mstflint/usr/include \
debian/mstflint/usr/lib/*/*.a \
debian/mstflint/usr/lib/*/mstflint/*.a \
debian/mstflint/usr/lib/*/mstflint/*.la \
debian/mstflint/usr/lib/*/mstflint/*.so* \
# Unused unless fw-mgr is enabled:
rm -rf debian/mstflint/usr/share/man/man1/mstarchive.1* \
debian/mstflint/usr/share/man/man1/mstfwmanager.1*
make -C kernel DESTDIR=$(CURDIR)/debian/tmp install-dkms DKMS_SRC_DIR=/usr/src/mstflint-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM)
|