Code: Alles auswählen
make install
Code: Alles auswählen
make install
ganz genau, so sollte es sein und im Makefile hatte ich reingeschaut, also es steht eher in der .spec datei und sieht eigentlich richtig aus. ich leg sie mal bei.Sollte ein /lib/modules/$KERNELVERSION/misc o.ä. werden?
Code: Alles auswählen
# Define ndiswrapper_version only if it is not already defined.
%{!?ndiswrapper_version: %define ndiswrapper_version 1.56}
%{!?ndiswrapper_release: %define ndiswrapper_release 1}
# Define kernel version if not already defined
%{!?kernel: %define kernel %(uname -r)}
%{!?ksrc: %define ksrc /lib/modules/%{kernel}/source}
%{!?_inst_dir: %define _inst_dir /lib/modules/%{kernel}/misc}
%define _sbinrootdir /sbin
Summary: ndiswrapper allows you to use windows XP drivers for that WLAN card without proper Linux drivers.
Name: ndiswrapper
Version: %{ndiswrapper_version}
Release: %{ndiswrapper_release}
License: GPL
Group: System Environment/Base
URL: http://ndiswrapper.sourceforge.net
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{ksrc}/Makefile
%description
Some wireless LAN vendors refuse to release hardware specifications or
drivers for their products for operating systems other than Microsoft
Windows. The ndiswrapper project makes it possible to use such
hardware with Linux by means of a loadable kernel module that "wraps
around" NDIS (Windows network driver API) drivers. This rpm contains
just the userspace tools. You will also need the kernel module rpm.
%package -n kernel-module-%{name}-%{kernel}
Summary: Ndiswrapper kernel module
Group: System Environment/Base
Requires: /boot/vmlinuz-%{kernel}, modutils
Requires: %{name} = %{version}-%{release}
BuildRequires: %{ksrc}/Makefile
%description -n kernel-module-%{name}-%{kernel}
Kernel module for ndiswrapper.
%prep
%setup -q
%build
make all KVERS=%{kernel} KSRC=%{ksrc}
%install
%define inst_dir $RPM_BUILD_ROOT%{_inst_dir}
%define sbindir $RPM_BUILD_ROOT%{_sbinrootdir}
%define usrsbindir $RPM_BUILD_ROOT%{_sbindir}
%define mandir $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT
make install DIST_DESTDIR=$RPM_BUILD_ROOT INST_DIR=%{inst_dir} KVERS=%{kernel} KSRC=%{ksrc} sbindir=%{sbindir} usrsbindir=%{usrsbindir} mandir=%{mandir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0755,root,root)
%{_sbinrootdir}/loadndisdriver
%{_sbindir}/ndiswrapper*
%{_mandir}/man8/*
%doc README AUTHORS ChangeLog INSTALL
%files -n kernel-module-%{name}-%{kernel}
%{_inst_dir}/ndiswrapper.*
%post -n kernel-module-%{name}-%{kernel}
if [ "`uname -r`" = "%{kernel}" ] ; then
depmod -a >/dev/null 2>&1 || :
fi
%postun -n kernel-module-%{name}-%{kernel}
if [ "`uname -r`" = "%{kernel}" ] ; then
depmod -a >/dev/null 2>&1 || :
fi
%changelog
* Mon Jan 10 2005 David Kaplan <dmk@localhost.localdomain> -
- Got rid of makeinstall macro as it asks for problems and use naming convention of make files.
* Tue Jan 4 2005 David Kaplan <dmk@localhost.localdomain> -
- Updated spec file so that it is closer to kernel module standard spec
- Made ndiswrapper_version a configurable macro
* Tue Feb 3 2004 <abennett@olin.edu> -
- Initial build.
Code: Alles auswählen
:/tmp/ndiswrapper-1.56$ grep spec Makefile
DISTFILES=AUTHORS ChangeLog INSTALL Makefile README ndiswrapper.spec \
# Update version in dist rpm spec file - don't crash if it fails
-sed -i "s/\%define\s\+ndiswrapper_version\s\+[^\}]\+\}/%define ndiswrapper_version $(DRIVER_VERSION)\}/" $(distdir)/ndiswrapper.spec
rpm: dist ndiswrapper.spec
Code: Alles auswählen
.PHONY: all
all:
+make -C driver
+make -C utils
.PHONY: install
install:
+make -C driver install
+make -C utils install
Code: Alles auswählen
install: config_check modules
echo $(INST_DIR)
mkdir -p $(INST_DIR)
install -m 0644 $(MODULE) $(INST_DIR)
ifndef DIST_DESTDIR
-/sbin/depmod -a $(KVERS) -b $(DESTDIR)
endif
Code: Alles auswählen
$ egrep "INST_DIR|KVERS" Makefile
KVERS ?= $(shell uname -r)
KBUILD := $(shell readlink -f /lib/modules/$(KVERS)/build)
KVERS := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' $(VERSION_H))
INST_DIR ?= $(shell echo $(DESTDIR)/lib/modules/$(KVERS)/misc | sed 's^//^/^g')
Code: Alles auswählen
#install: config_check modules
install:
echo $(INST_DIR)
echo mkdir -p $(INST_DIR)
echo install -m 0644 $(MODULE) $(INST_DIR)
ifndef DIST_DESTDIR
-/sbin/depmod -a $(KVERS) -b $(DESTDIR)
endif
Da ist dann wohl ein kleiner Bug.$ make install
make -C driver install
make[1]: Entering directory `/tmp/ndis/ndiswrapper-1.56/driver'
echo /lib/modules/misc
/lib/modules/misc
echo mkdir -p /lib/modules/misc
mkdir -p /lib/modules/misc
echo install -m 0644 ndiswrapper.ko /lib/modules/misc
install -m 0644 ndiswrapper.ko /lib/modules/misc
Code: Alles auswählen
KVERS ?= $(shell uname -r)
# KBUILD is the path to the Linux kernel build tree. It is usually the
# same as the kernel source tree, except when the kernel was compiled in
# a separate directory.
KBUILD := $(shell readlink -f /lib/modules/$(KVERS)/build)
ifeq (,$(KBUILD))
$(error Kernel tree not found - please set KBUILD to configured kernel)
endif
# Kernel Makefile doesn't always know the exact kernel version, so we
# get it from the kernel headers instead and pass it to make.
VERSION_H := $(KBUILD)/include/linux/utsrelease.h
ifeq (,$(wildcard $(VERSION_H)))
VERSION_H := $(KBUILD)/include/linux/version.h
endif
ifeq (,$(wildcard $(VERSION_H)))
$(error Cannot find kernel version in $(KBUILD), is it configured?)
endif
KVERS := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' $(VERSION_H))
Code: Alles auswählen
:/lib/modules/2.6.36.2# find build/ | egrep "version.h|utsrelease.h"
build/include/xen/interface/version.h
build/include/linux/dvb/version.h
build/include/linux/version.h
build/include/config/isdn/diversion.h
build/include/config/localversion.h
build/include/sound/version.h
build/include/generated/utsrelease.h
:/lib/modules/2.6.36.2# cat build/include/generated/utsrelease.h
#define UTS_RELEASE "2.6.36.2"
:/lib/modules/2.6.36.2# cat build/include/linux/version.h
#define LINUX_VERSION_CODE 132644
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
Code: Alles auswählen
VERSION_H := $(KBUILD)/include/linux/utsrelease.h
ifeq (,$(wildcard $(VERSION_H)))
VERSION_H := $(KBUILD)/include/linux/version.h
endif
Code: Alles auswählen
VERSION_H := $(KBUILD)/include/generated/utsrelease.h
ifeq (,$(wildcard $(VERSION_H)))
VERSION_H := $(KBUILD)/include/linux/version.h
endif
Mehrdeutig.meine kernel sourcen und headers
Code: Alles auswählen
make menuconfig
make all
make install modules_install
Wolltest Du das "neueste" ndiswrapper für lenny haben?Code: Alles auswählen
$ apt-cache policy ndiswrapper-common ndiswrapper-source ndiswrapper-common: Installiert: (keine) Kandidat: 1.56-1 Versionstabelle: 1.56-3 0 -50 http://ftp2.de.debian.org/debian/ unstable/main i386 Packages 1.56-1 0 500 http://ftp2.de.debian.org/debian/ testing/main i386 Packages 1.53-2 0 -5 http://ftp2.de.debian.org/debian/ stable/main i386 Packages ndiswrapper-source: Installiert: (keine) Kandidat: 1.56-1 Versionstabelle: 1.56-3 0 -50 http://ftp2.de.debian.org/debian/ unstable/main i386 Packages 1.56-1 0 500 http://ftp2.de.debian.org/debian/ testing/main i386 Packages 1.53-2 0 -5 http://ftp2.de.debian.org/debian/ stable/main i386 Packages