forked from mirrors/nixpkgs
Added prefix patch to ndiswrapper
svn path=/nixpkgs/branches/stdenv-updates/; revision=9897
This commit is contained in:
parent
b5b3671318
commit
f4464f2193
|
@ -1,6 +1,5 @@
|
|||
args:
|
||||
with args;
|
||||
args.stdenv.mkDerivation {
|
||||
args: with args;
|
||||
stdenv.mkDerivation {
|
||||
name = "ndiswrapper-1.49-stable";
|
||||
|
||||
# need at least .config and include
|
||||
|
@ -16,7 +15,10 @@ args.stdenv.mkDerivation {
|
|||
sha256 = "1b9nqkk7gv6gffzj9b8mjy5myxf2afwpyr2n5wbfsylf15dvvvjr";
|
||||
};
|
||||
|
||||
buildInputs =(with args; [kernelHeaders kernel]);
|
||||
buildInputs =[kernelHeaders kernel];
|
||||
|
||||
# this is a patch against svn head, not stable version
|
||||
patches = [./prefix.patch];
|
||||
|
||||
meta = {
|
||||
description = "Ndis driver wrapper for the Linux kernel";
|
||||
|
|
78
pkgs/os-specific/linux/ndiswrapper/prefix.patch
Normal file
78
pkgs/os-specific/linux/ndiswrapper/prefix.patch
Normal file
|
@ -0,0 +1,78 @@
|
|||
diff --git a/ndiswrapper/driver/Makefile b/ndiswrapper/driver/Makefile
|
||||
index b0c2a9d..8907a05 100644
|
||||
--- a/ndiswrapper/driver/Makefile
|
||||
+++ b/ndiswrapper/driver/Makefile
|
||||
@@ -119,6 +119,10 @@ ifdef WRAP_PREEMPT
|
||||
MOD_CFLAGS += -DWRAP_PREEMPT
|
||||
endif
|
||||
|
||||
+ifdef DIST_DESTDIR
|
||||
+MOD_CFLAGS += -DPREFIX=\"$(DIST_DESTDIR)\"
|
||||
+endif
|
||||
+
|
||||
.PHONY: prereq_check gen_exports clean dist_clean install stack_check
|
||||
|
||||
all : prereq_check win2lin_stubs.h gen_exports compat.h default stack_check
|
||||
@@ -355,7 +359,7 @@ install: prereq_check win2lin_stubs.h gen_exports compat.h default stack_check
|
||||
echo $(INST_DIR)
|
||||
mkdir -p $(INST_DIR)
|
||||
install -m 0644 $(MODULE) $(INST_DIR)
|
||||
- -@/bin/rm -rf $(SRC_DIR)/.tmp_versions
|
||||
+ -@rm -rf $(SRC_DIR)/.tmp_versions
|
||||
ifndef DIST_DESTDIR
|
||||
-/sbin/depmod -a $(KVERS) -b $(DESTDIR)
|
||||
endif
|
||||
diff --git a/ndiswrapper/driver/loader.c b/ndiswrapper/driver/loader.c
|
||||
index 930606f..9a8e9f0 100644
|
||||
--- a/ndiswrapper/driver/loader.c
|
||||
+++ b/ndiswrapper/driver/loader.c
|
||||
@@ -106,7 +106,7 @@ struct wrap_driver *load_wrap_driver(struct wrap_device *wd)
|
||||
EXIT1(return NULL);
|
||||
}
|
||||
INIT_COMPLETION(loader_complete);
|
||||
- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env
|
||||
+ ret = call_usermodehelper(USERMOD_HELPER, argv, env
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
, 1
|
||||
#endif
|
||||
@@ -272,7 +272,7 @@ struct wrap_bin_file *get_bin_file(char *bin_file_name)
|
||||
EXIT1(return NULL);
|
||||
}
|
||||
INIT_COMPLETION(loader_complete);
|
||||
- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env
|
||||
+ ret = call_usermodehelper(USERMOD_HELPER, argv, env
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
, 1
|
||||
#endif
|
||||
@@ -711,7 +711,7 @@ struct wrap_device *load_wrap_device(struct load_device *load_device)
|
||||
EXIT1(return NULL);
|
||||
}
|
||||
INIT_COMPLETION(loader_complete);
|
||||
- ret = call_usermodehelper("/sbin/loadndisdriver", argv, env
|
||||
+ ret = call_usermodehelper(USERMOD_HELPER, argv, env
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
, 1
|
||||
#endif
|
||||
diff --git a/ndiswrapper/driver/ndiswrapper.h b/ndiswrapper/driver/ndiswrapper.h
|
||||
index 4a78dc6..c11a074 100644
|
||||
--- a/ndiswrapper/driver/ndiswrapper.h
|
||||
+++ b/ndiswrapper/driver/ndiswrapper.h
|
||||
@@ -19,8 +19,17 @@
|
||||
#define DRIVER_VERSION "1.50"
|
||||
#define UTILS_VERSION "1.9"
|
||||
|
||||
+#ifndef PREFIX
|
||||
+#define PREFIX
|
||||
+#endif
|
||||
+
|
||||
#define DRIVER_NAME "ndiswrapper"
|
||||
-#define DRIVER_CONFIG_DIR "/etc/ndiswrapper"
|
||||
+
|
||||
+#ifndef DRIVER_CONFIG_DIR
|
||||
+# define DRIVER_CONFIG_DIR PREFIX "/etc/ndiswrapper"
|
||||
+#endif
|
||||
+
|
||||
+#define USERMOD_HELPER PREFIX "/sbin/loadndisdriver"
|
||||
|
||||
#define SSID_MAX_WPA_IE_LEN 40
|
||||
#define NDIS_ESSID_MAX_SIZE 32
|
Loading…
Reference in a new issue