# buildforkernels macro hint: when you build a new version or a new release # that contains bugfixes or other improvements then you must disable the # "buildforkernels newest" macro for just that build; immediately after # queuing that build enable the macro again for subsequent builds; that way # a new akmod package will only get build when a new one is actually needed %define buildforkernels newest # TODO- # need a redirfs build event %define dazuko_version %{version} %define redirfs_version 0.7.1 Name: dazuko License: BSD 3-clause (or similar) ; GPL v2 or later ; LGPL v2.1 or later Group: System/Kernel Version: 2.3.7.1 Release: 1 Summary: On-access Virus Scanning Kernel Interface Url: http://www.dazuko.org/ Source0: dazuko-%{dazuko_version}.tar.bz2 Source1: redirfs-%{redirfs_version}.tar.bz2 Source11: %{name}-excludekernel-filterfile BuildRoot: %{_tmppath}/%{name}-%{builddate}-%{release}-root-%(%{__id_u} -n) # ASL only supports these architectures ExclusiveArch: i586 i686 x86_64 BuildRequires: kernel-devel module-init-tools buildsys-build-atomic # get the needed BuildRequires (in parts depending on what we build for) BuildRequires: %{_bindir}/kmodtool %package kmod-common Summary: dazuko-kmod-common loader Group: System Environment/Kernel %description -n dazuko-kmod-common Dazuko null loader file, this contains nothing %{!?kernels:BuildRequires: buildsys-build-atomic-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} } # kmodtool does its magic here %{expand:%(kmodtool --target %{_target_cpu} --repo atomic --kmodname %{name} --filterfile %{SOURCE11} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } %description Dazuko %prep #%{?kmodtool_check} # error out if there was something wrong with kmodtool %{?kmodtool_check} # print kmodtool output for debugging purposes: kmodtool --target %{_target_cpu} --repo atomic --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null %setup -c -n source -T -a 0 -a 1 mv dazuko-%{dazuko_version} dazuko mv redirfs-%{redirfs_version} redirfs #%patch1 -p1 #%patch2 -p1 #%patch3 -p1 %build pushd dazuko ./configure --enable-redirfs --redirfsdir=`pwd`/../redirfs for kernel_version in %{?kernel_versions} ; do make -C /lib/modules/${kernel_version%%___*}/build M=`pwd` modules done popd pushd redirfs for kernel_version in %{?kernel_versions} ; do make -C /lib/modules/${kernel_version%%___*}/build M=`pwd` modules make -C /lib/modules/`uname -r`/build M=`pwd` modules done popd %install rm -rf $RPM_BUILD_ROOT pwd mkdir -p $RPM_BUILD_ROOT/lib/modules/`uname -r`/extra/dazuko/ for kernel_version in %{?kernel_versions} ; do install -D -m 744 dazuko/dazuko.ko $RPM_BUILD_ROOT/lib/modules/${kernel_version%%___*}/extra/dazuko/ install -D -m 744 redirfs/redirfs.ko $RPM_BUILD_ROOT/lib/modules/${kernel_version%%___*}/extra/dazuko/ done # akmods: %{?akmod_install} %files -n dazuko-kmod-common %changelog * Mon Sep 28 2009 Scott R. Shinn - 2.3.7.1-1 - Initial build, this includes mikes modifications which I cant get into a friggin patch.