[packages/vpb-driver] - added kernel patch (for <asm/system.h> removal in recent Linux versions) - pass KSRC, fixes for bu

qboosh qboosh at pld-linux.org
Tue Jan 29 18:50:56 CET 2013


commit dbfa6bb98c94c3fc6012ab03d0f7ac943caec4f3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 29 18:51:44 2013 +0100

    - added kernel patch (for <asm/system.h> removal in recent Linux versions)
    - pass KSRC, fixes for build without kernel or userspace

 vpb-driver-kernel.patch | 10 ++++++++++
 vpb-driver.spec         | 22 +++++++++++++++++++---
 2 files changed, 29 insertions(+), 3 deletions(-)
---
diff --git a/vpb-driver.spec b/vpb-driver.spec
index e70c463..9014562 100644
--- a/vpb-driver.spec
+++ b/vpb-driver.spec
@@ -23,6 +23,7 @@ Group:		Libraries
 Source0:	http://www.voicetronix.com.au/Downloads/vpb-driver-4.x/%{name}-%{version}.tar.gz
 # Source0-md5:	d014a29043334923e0976a9273627b63
 Patch0:		%{name}-make.patch
+Patch1:		%{name}-kernel.patch
 URL:		http://www.voicetronix.com.au/downloads.htm#linux
 %if %{with dist_kernel}
 BuildRequires:	kernel%{_alt_kernel}-module-build
@@ -31,6 +32,7 @@ BuildRequires:	autoconf >= 2.59
 BuildRequires:	libstdc++-devel
 BuildRequires:	pciutils-devel
 BuildRequires:	rpmbuild(macros) >= 1.379
+BuildRequires:	sed >= 4.0
 BuildRequires:	zlib-devel
 Requires:	vpb-libs = %{version}-%{rel}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -101,6 +103,14 @@ Sterownik jądra Linuksa do kart VPB firmy Voicetronix.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+
+%if %{without kernel}
+%{__sed} -i -e 's,subdirs += $(srcdir)/vtcore $(srcdir)/vpb,,' src/Makefile.in
+%endif
+%if %{without userspace}
+%{__sed} -i -e 's,subdirs = libtoneg libvpb utils,,' src/Makefile.in
+%endif
 
 %build
 %{__aclocal}
@@ -110,19 +120,25 @@ install -d build-static
 cd build-static
 ../%configure \
 	%{?with_pri:--with-pri}
-%{__make}
+%{__make} -C src/libtoneg \
+	VPATH=%{_libdir}
+%{__make} -C src/libvpb \
+	VPATH=%{_libdir}
 cd ..
 %endif
 %configure \
 	%{?with_pri:--with-pri} \
 	--enable-shared
-%{__make}
+%{__make} \
+	%{?with_kernel:KSRC=%{_kernelsrcdir}} \
+	VPATH=%{_libdir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	%{?with_kernel:KSRC=%{_kernelsrcdir}}
 
 %if %{with userspace}
 # let rpm generate dependencies
diff --git a/vpb-driver-kernel.patch b/vpb-driver-kernel.patch
new file mode 100644
index 0000000..8b7f973
--- /dev/null
+++ b/vpb-driver-kernel.patch
@@ -0,0 +1,10 @@
+--- vpb-driver-4.2.55/src/vpb/vpb.c.orig	2012-05-09 13:57:34.000000000 +0200
++++ vpb-driver-4.2.55/src/vpb/vpb.c	2013-01-29 18:43:08.571270294 +0100
+@@ -117,7 +117,6 @@
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <asm/io.h>
+-#include <asm/system.h>
+ #include <linux/vmalloc.h>
+ #include <linux/pci.h>
+ #include <linux/delay.h>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vpb-driver.git/commitdiff/dbfa6bb98c94c3fc6012ab03d0f7ac943caec4f3



More information about the pld-cvs-commit mailing list