--- Makefile.orig 2004-05-03 01:10:37.392241008 +0200 +++ Makefile 2004-05-03 01:11:30.235207656 +0200 @@ -33,7 +33,8 @@ INSTALL_PREFIX= BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi) -MODCONF=$(shell if [ -d $(INSTALL_PREFIX)/etc/modprobe.d ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(INSTALL_PREFIX)/etc/modutils ]; then echo "$(INSTALL_PREFIX)/etc/modutils/zaptel"; elif [ -f $(INSTALL_PREFIX)/etc/modprobe.conf ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.conf"; elif [ -f $(INSTALL_PREFIX)/etc/modules.conf ]; then echo "$(INSTALL_PREFIX)/etc/modules.conf"; else echo $(INSTALL_PREFIX)/etc/conf.modules ; fi) +# Patch for Gentoo, uses modules.d +MODCONF=$(INSTALL_PREFIX)/etc/modules.d/zaptel ifeq (${BUILDVER},linux24) #We only support DEVFS in linux 2.4 kernels, since its considered obsolete post 2.4 @@ -272,6 +273,7 @@ install -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include ( cd $(INSTALL_PREFIX)/usr/lib ; rm -f libtonezone.so ; ln -sf $(LIBTONEZONE) libtonezone.so ) /sbin/ldconfig + mkdir -p $(INSTALL_PREFIX)/etc/modules.d if [ -f $(MODCONF) ]; then mv -f $(MODCONF) $(MODCONF).bak ; fi cat $(MODCONF).bak | grep -v "alias char-major-250" | \ grep -v "post-install torisa /sbin/ztcfg" | \ @@ -296,10 +298,6 @@ fi; \ done - if [ -d /etc/modutils ]; then \ - /sbin/update-modules ; \ - fi - -/sbin/depmod -a [ -f $(INSTALL_PREFIX)/etc/zaptel.conf ] || install -m 644 zaptel.conf.sample $(INSTALL_PREFIX)/etc/zaptel.conf config: --- Makefile.orig 2004-05-03 01:16:52.352238424 +0200 +++ Makefile 2004-05-03 01:17:09.821582680 +0200 @@ -64,8 +64,7 @@ linux26: linux26: prereq $(BINS) - @if ! [ -d /usr/src/linux-2.6 ]; then echo "Link /usr/src/linux-2.6 to your kernel sources first!"; exit 1 ; fi - make -C /usr/src/linux-2.6 SUBDIRS=$(PWD) modules + make -C /usr/src/linux SUBDIRS=$(PWD) modules obj-m := $(MODULESO)