File dazuko.spec of Package dazuko
#
# spec file for package dazuko (Version 2.3.7)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# nodebuginfo
Url: http://www.dazuko.org/
Name: dazuko
License: BSD 3-clause (or similar) ; GPL v2 or later ; LGPL v2.1 or later
Group: System/Kernel
Version: 2.3.7
Release: 1
%define dazuko_version %{version}
%define redirfs_version 0.7
Summary: On-access Virus Scanning Kernel Interface
Source0: dazuko-%{dazuko_version}.tar.bz2
Source1: redirfs-%{redirfs_version}.tar.bz2
Source2: Kbuild
Source3: dazuko.sysconfig
Source4: dazuko.init-script
Patch1: dazuko-2.6.29-build-fixes
Patch2: redirfs-2.6.29-build-fixes
Patch3: redirfs-2.6.31-build-fixes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
#Obsoletes: km_antivir km_dazuko
Requires: dazuko-kmp
BuildRequires: kernel-source kernel-syms module-init-tools
%suse_kernel_module_package kdump um
%description
The dazuko package contains the boot script for loading/unloading the
dazuko on-access virus scanning kernel interface module provided by the
dazuko-KMP kernel module packages.
Authors:
--------
John Ogness
Martin Ritter
%package KMP
License: BSD 3-clause (or similar) ; GPL v2 or later
Summary: On-access Virus Scanning Kernel Interface
Group: System/Kernel
%description KMP
The dazuko-KMP package contains the dazuko on-access virus scanning
kernel interface module and the redirfs kernel interface module.
Authors:
--------
John Ogness
Martin Ritter
%prep
%setup -c -n source -T -a 0 -a 1
cp -a %{S:2} .
mv dazuko-%{dazuko_version} dazuko
mv redirfs-%{redirfs_version} redirfs
%patch1 -p1
%patch2 -p1
%patch3 -p1
mkdir ../obj
%build
cd ..
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r source obj/$flavor
pushd obj/$flavor/dazuko
KERNEL_SRC="/usr/src/linux"
KERNEL_OBJ="/usr/src/linux-obj/%_target_cpu/$flavor"
DEBUG_FLAGS=""
case $flavor in
*debug*) DEBUG_FLAGS="--enable-debug" ;;
esac
CONFIGURE_FLAGS="--enable-redirfs --redirfsdir=`pwd`/../redirfs"
./configure \
--kernelsrcdir=${KERNEL_SRC} \
--kernelobjdir=${KERNEL_OBJ} \
${CONFIGURE_FLAGS} ${DEBUG_FLAGS}
popd
make -C ${KERNEL_OBJ} modules M=$PWD/obj/$flavor
done
%install
cd ..
rm -rf %buildroot
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
###
for flavor in %flavors_to_build; do
make -C /usr/src/linux-obj/%_target_cpu/$flavor \
modules_install M=$PWD/obj/$flavor
done
###
install -m755 -d $RPM_BUILD_ROOT/etc/init.d
install -m755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m754 $RPM_SOURCE_DIR/dazuko.init-script \
$RPM_BUILD_ROOT/etc/init.d/boot.dazuko
install -m644 $RPM_SOURCE_DIR/dazuko.sysconfig \
$RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.dazuko
%post
%{fillup_and_insserv -i -n dazuko}
%preun
%if %suse_version > 820
%{stop_on_removal boot.dazuko}
%endif
%postun
#%if %suse_version > 820
#%{restart_on_update boot.dazuko}
#%endif
%insserv_cleanup
%files
%defattr(-,root,root)
/etc/init.d/boot.dazuko
/var/adm/fillup-templates/sysconfig.dazuko
%changelog