Author: pluto                        Date: Sun Jun 19 22:43:20 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fixed build for 2.6.x.

---- Files affected:
SPECS:
   kernel-misc-viahss.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SPECS/kernel-misc-viahss.spec
diff -u SPECS/kernel-misc-viahss.spec:1.3 SPECS/kernel-misc-viahss.spec:1.4
--- SPECS/kernel-misc-viahss.spec:1.3   Wed Aug 13 00:32:47 2003
+++ SPECS/kernel-misc-viahss.spec       Mon Jun 20 00:43:15 2005
@@ -1,25 +1,28 @@
 # $Revision$, $Date$
 #
 # Conditional build:
-# _without_dist_kernel          without distribution kernel
-#
-%define                _orig_name      viahss
-%define                _rel            0.1
+%bcond_without dist_kernel     # allow non-distribution kernel
+%bcond_without smp             # don't build SMP module
+%bcond_with    verbose         # verbose build (V=1)
 
 Summary:       VIA High Speed Serial
-Summary(pl):   VIA High Speed Serial - włączanie szybkich trybów portu 
szeregowego
-Name:          kernel-net-%{_orig_name}
+Summary(pl):   VIA High Speed Serial
+Name:          kernel-misc-viahss
 Version:       0.92
+%define                _rel    0.1
 Release:       [EMAIL PROTECTED]
 License:       GPL
 Group:         Base/Kernel
-Source0:       http://www.kati.fi/%{_orig_name}/%{_orig_name}-%{version}.tar.gz
+Source0:       http://www.kati.fi/viahss/viahss-%{version}.tar.gz
 # Source0-md5: a63cdb34bf50676f232192b570dd7c37
 URL:           http://www.kati.fi/viahss/
-%{!?_without_dist_kernel:BuildRequires:        kernel-headers}
-BuildRequires: %{kgcc_package}
-%{!?_without_dist_kernel:%requires_releq_kernel_up}
+%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 2.6.7}
+BuildRequires: rpmbuild(macros) >= 1.217
 Requires(post,postun): /sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel_up
+Requires(postun):      %releq_kernel_up
+%endif
 ExclusiveArch: %{ix86}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -39,15 +42,18 @@
 uzyskanie pełnego transferu 128000 bit/s w komunikacji z ISDN-TA. Ten
 moduł był testowany z układami zarówno 686A jak i 686B.
 
-%package -n kernel-smp-net-%{_orig_name}
-Summary:       VIA High Speed Serial - SMP version
-Summary(pl):   VIA High Speed Serial - włączanie szybkich trybów portu 
szeregowego dla jąder SMP
+%package -n kernel-smp-misc-viahss
+Summary:       Linux SMP driver for VIA High Speed Serial
+Summary(pl):   Sterownik dla Linuksa SMP do VIA High Speed Serial
 Release:       [EMAIL PROTECTED]
 Group:         Base/Kernel
-%{!?_without_dist_kernel:%requires_releq_kernel_smp}
 Requires(post,postun): /sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel_smp
+Requires(postun):      %releq_kernel_smp
+%endif
 
-%description -n kernel-smp-net-%{_orig_name}
+%description -n kernel-smp-misc-viahss
 VIA High Speed Serial SMP is a little SMP kernel module (1 KB) which
 enables high speed serial port modes of VIA VT82C686A or VT82C686B
 southbridge-equipped motherboards. With this module, you can use the
@@ -55,7 +61,7 @@
 from ISDN-TA. The module has been tested with both 686A and 686B
 chipsets.
 
-%description -n kernel-smp-net-%{_orig_name} -l pl
+%description -n kernel-smp-misc-viahss -l pl
 VIA High Speed Serial SMP to mały moduł jądra SMP (1kB) włączający
 szybkie tryby pracy portu szeregowego wbudowanego w płyty główne z
 mostkiem południowym VIA VT82C686A lub VT82C686B. Przy pomocy tego
@@ -64,26 +70,43 @@
 ISDN-TA. Ten moduł był testowany z układami zarówno 686A jak i 686B.
 
 %prep
-%setup -q -n %{_orig_name}-%{version}
+%setup -q -n viahss-%{version}
+mv -f Makefile{-2.6,}
 
 %build
-rm -f %{_orig_name}.o
-%{kgcc} -o %{_orig_name}.o -c %{rpmcflags} -c -DMODULE -D__KERNEL__ \
-       -DSMP=1 -D__SMP__ -DCONFIG_X86_LOCAL_APIC \
-       -Wall -Wstrict-prototypes -I%{_kernelsrcdir}/include %{_orig_name}.c
+for cfg in %{?with_dist_kernel:%{?with_smp:smp} 
up}%{!?with_dist_kernel:nondist}; do
+       if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
+               exit 1
+       fi
+       rm -rf include
+       install -d include/{linux,config}
+       ln -sf %{_kernelsrcdir}/config-$cfg .config
+       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h 
include/linux/autoconf.h
+       ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
+       touch include/config/MARKER
+
+       %{__make} -C %{_kernelsrcdir} clean \
+               RCS_FIND_IGNORE="-name '*.ko' -o" \
+               M=$PWD O=$PWD \
+               %{?with_verbose:V=1}
+       %{__make} -C %{_kernelsrcdir} modules \
+               CC="%{__cc}" CPP="%{__cpp}" \
+               M=$PWD O=$PWD \
+               %{?with_verbose:V=1}
 
-mv -f %{_orig_name}.o %{_orig_name}-smp.o
-
-%{kgcc} -o %{_orig_name}.o -c %{rpmcflags} -c -DMODULE -D__KERNEL__ \
-       -Wall -Wstrict-prototypes -I%{_kernelsrcdir}/include %{_orig_name}.c
+       mv viahss{,-$cfg}.ko
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
 
-install %{_orig_name}-smp.o 
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/%{_orig_name}.o
-install %{_orig_name}.o 
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/%{_orig_name}.o
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
+install viahss-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/viahss.ko
+%if %{with smp} && %{with dist_kernel}
+install viahss-smp.ko \
+       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/viahss.ko
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -94,19 +117,21 @@
 %postun
 %depmod %{_kernel_ver}
 
-%post  -n kernel-smp-net-%{_orig_name}
+%post  -n kernel-smp-misc-viahss
 %depmod %{_kernel_ver}smp
 
-%postun -n kernel-smp-net-%{_orig_name}
+%postun -n kernel-smp-misc-viahss
 %depmod %{_kernel_ver}smp
 
 %files
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/misc/*
+/lib/modules/%{_kernel_ver}/misc/*.ko*
 
-%files -n kernel-smp-net-%{_orig_name}
+%if %{with smp} && %{with dist_kernel}
+%files -n kernel-smp-misc-viahss
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/misc/*
+/lib/modules/%{_kernel_ver}smp/misc/*.ko*
+%endif
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -114,6 +139,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2005/06/19 22:43:15  pluto
+- fixed build for 2.6.x.
+
 Revision 1.3  2003/08/12 22:32:47  ankry
 - cosmetics
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-misc-viahss.spec?r1=1.3&r2=1.4&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to