KVERS = $(shell uname -r)
KVER = $(KVERS)
VMODDIR = $(MODDIR)/$(KVER)
-INSTDIR = $(VMODDIR)/kernel/drivers/misc/omnibook
+INSTDIR = extra
#KSRC = /usr/src/linux
KSRC = $(VMODDIR)/build
KMODDIR = $(KSRC)/drivers/misc/omnibook
install: all
- # Removing module from old location
+ # Removing module from old possible locations
$(RM) $(VMODDIR)/kernel/drivers/char/$(MODULE_NAME).ko
- make -C $(KSRC) M=$(PWD) modules_install
+ $(RM) $(VMODDIR)/kernel/drivers/misc/$(MODULE_NAME).ko
+ make INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=$(INSTDIR) -C $(KSRC) M=$(PWD) modules_install
unload:
$(RMMOD) $(MODULE_NAME) || :
binary-modules: prep-deb-files
dh_testroot
dh_clean -k
- dh_installdirs lib/modules/$(KVERS)/kernel/drivers/misc/omnibook
+ dh_installdirs lib/modules/$(KVERS)/extra
# Build the module
#$(MAKE) -C drivers KERNEL_DIR=$(KSRC) KVERS=$(KVERS)
$(MAKE) KSRC=$(KSRC) KVERS=$(KVERS)
# Install the module
- $(MAKE) install KSRC=$(KSRC) DESTDIR=$(CURDIR)/debian/$(PKGNAME) DEPMOD=""
-
+ $(MAKE) install KSRC=$(KSRC) DESTDIR=$(CURDIR)/debian/$(PKGNAME) INSTDIR=extra DEPMOD=""
+
dh_installdocs
dh_installchangelogs
dh_compress