#! /bin/sh -e

# 99_debian_makefike_depmod.dpatch by Steve Kowalik
#
# DP: Removes calls to depmod at install-modules time.

. debian/patches/patch-opts

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch $patch_opts < $0;;
    -unpatch) patch $patch_opts -R < $0;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1;;
esac

exit 0

@DPATCH@

diff -urNad alsa-driver/Makefile~ alsa-driver/Makefile
--- alsa-driver/Makefile~	2003-05-09 20:58:03.000000000 -0400
+++ alsa-driver/Makefile	2003-05-09 23:23:01.000000000 -0400
@@ -130,11 +130,11 @@
 	rm -f $(DESTDIR)$(moddir)/snd*.o $(DESTDIR)$(moddir)/persist.o $(DESTDIR)$(moddir)/isapnp.o
 endif
 	@for d in $(SUBDIRS); do if ! $(MAKE) -C $$d modules_install; then exit 1; fi; done
-ifeq ($(DESTDIR),)
-	-/sbin/depmod -a $(kaversion) $(SYSTEM_MAP_OPT)
-else
-	-/sbin/depmod -a -b $(DESTDIR)/ $(SYSTEM_MAP_OPT) $(kaversion)
-endif
+#ifeq ($(DESTDIR),)
+#	-/sbin/depmod -a $(kaversion) $(SYSTEM_MAP_OPT)
+#else
+#	-/sbin/depmod -a -b $(DESTDIR)/ $(SYSTEM_MAP_OPT) $(kaversion)
+#endif
 
 .PHONY: install-scripts
 install-scripts:
