# openmamba 2.6 kernel module specfile # Copyright (C) 2004-2010 by Silvan Calarco # # To build for a specific target: # # rpm -ba --define="KERNEL_TARGET mamba" stk11xx.spec # # default is "mamba" # %define kernel_ver %{version} %define build_version %{kernel_ver} %define BUILD_CC %{_target_platform}-gcc %define BUILD_CXX %{_target_platform}-g++ %if "%{?KERNEL_TARGET}" == "" # build a mamba kernel by default %define KERNEL_TARGET mamba %endif %if "%{?KERNEL_VER}" == "" %define KERNEL_VER %(uname -r | sed "s|\\([0-9.]*\\).*|\\1|" ) %endif Name: stk11xx Version: 2.1.0 Release: 12mamba Summary: Syntek Semicon DC-1125 Driver Group: System/Kernel and Hardware/Drivers Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://syntekdriver.sourceforge.net Source: http://downloads.sourceforge.net/sourceforge/syntekdriver/stk11xx-%{version}.tar.gz Patch0: %{name}-2.1.0-kernel-2.6.37.patch Patch1: %{name}-2.1.0-kernel-2.6.38.patch License: GPL BuildRequires: ctags BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Linux/Unix driver development for Syntek Semicon USB2.0 Video device DC-1125, like the one that is found in Asus A6K laptops. The device can be recognized by the usb id 174f:a311 and maybe also be a standalone unit (not integrated). %package -n kernel-%{KERNEL_TARGET}-stk11xx Summary: Syntek Semicon DC-1125 Driver Group: System/Kernel and Hardware/Drivers Requires(pre): kernel-%{KERNEL_TARGET} >= %{KERNEL_VER} Requires(pre): kernel-%{KERNEL_TARGET} <= %{KERNEL_VER}.255 ## KERNELOBSOLETES-BEGIN 3.4 Obsoletes: kernel-%{KERNEL_TARGET}-stk11xx = 2.1.0-9mamba Obsoletes: kernel-%{KERNEL_TARGET}-stk11xx = 2.1.0-10mamba ## KERNELOBSOLETES-END %description -n kernel-%{KERNEL_TARGET}-stk11xx Linux/Unix driver development for Syntek Semicon USB2.0 Video device DC-1125, like the one that is found in Asus A6K laptops. The device can be recognized by the usb id 174f:a311 and maybe also be a standalone unit (not integrated). %prep %setup -q %patch0 -p1 %patch1 -p1 %if "%{?KERNEL_TARGET}" == "" echo "No target specified, aborting." exit 1 %else echo "I'm going to build module for a %{KERNEL_TARGET} kernel..." %endif %build # # build for KERNEL_TARGET # BUILD_OPTS="CC=%{BUILD_CC} CXX=%{BUILD_CXX} %{_smp_mflags}" make CROSS_COMPILE=%{_target_platform}- -f Makefile.standalone clean \ KVER=%{KERNEL_VER}%{?KERNEL_TARGET} \ KDIR=%{_prefix}/src/linux-%{KERNEL_VER}%{?KERNEL_TARGET} make CROSS_COMPILE=%{_target_platform}- -f Makefile.standalone driver \ ${BUILD_OPTS} \ KVER=%{KERNEL_VER}%{?KERNEL_TARGET} \ KDIR=%{_prefix}/src/linux-%{KERNEL_VER}%{?KERNEL_TARGET} %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -D -m 0644 stk11xx.ko \ %{buildroot}/lib/modules/%{KERNEL_VER}%{?KERNEL_TARGET}/kernel/drivers/usb/media/stk11xx.ko %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -n kernel-%{KERNEL_TARGET}-stk11xx # new install or upgrade mv /lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/kernel/drivers/net/atl1e/atl1e.ko \ /sbin/depmod -a -F /boot/System.map-%{KERNEL_VER}%{?KERNEL_TARGET} \ %{KERNEL_VER}%{?KERNEL_TARGET} >/dev/null 2>&1 : %postun -n kernel-%{KERNEL_TARGET}-stk11xx # erase this package [ $1 -eq 0 ] && /sbin/depmod -a -F /boot/System.map-%{KERNEL_VER}%{?KERNEL_TARGET} \ %{KERNEL_VER}%{?KERNEL_TARGET} >/dev/null 2>&1 : %files -n kernel-%{KERNEL_TARGET}-stk11xx %defattr(-,root,root) /lib/modules/%{KERNEL_VER}%{?KERNEL_TARGET}/kernel/drivers/usb/media/stk11xx.ko #%doc copying readme %changelog * Sun Sep 15 2013 Silvan Calarco 2.1.0-12mamba - kernel 3.10 rebuild * Fri Jan 04 2013 Silvan Calarco 2.1.0-11mamba - kernel 3.4 rebuild * Mon Nov 05 2012 Silvan Calarco 2.1.0-10mamba - bump release up for milestone2 update * Sat Oct 27 2012 Silvan Calarco 2.1.0-9mamba - kernel 3.6 rebuild * Sat Jun 30 2012 Silvan Calarco 2.1.0-8mamba - automatic update by autodist * Sun Feb 12 2012 Silvan Calarco 2.1.0-7mamba - automatic update by autodist * Wed Jan 25 2012 Silvan Calarco 2.1.0-6mamba - automatic update by autodist * Sun Sep 04 2011 Silvan Calarco 2.1.0-5mamba - automatic update by autodist * Fri Aug 19 2011 Silvan Calarco 2.1.0-4mamba - automatic update by autodist * Wed Apr 20 2011 Silvan Calarco 2.1.0-3mamba - kernel 2.6.38 rebuild * Mon Feb 07 2011 Silvan Calarco 2.1.0-2mamba - automatic update by autodist * Fri Dec 17 2010 Silvan Calarco 2.1.0-1mamba - package created out of kernel-extramodules