File cdfs.spec of Package cdfs

Name:           cdfs
Version:        2.6.27
Release:        1
License:        GPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  kernel-source kernel-syms module-init-tools
Source0:        %{name}-%{version}.tar.bz2
Patch0:         Makefile.patch
Patch1:         sched_h.diff
Group:          System/Kernel
Summary:        File system that 'exports' all tracks and boot images on a CD as normal files
Autoreqprov:	on

%suse_kernel_module_package -n cdfs kdump um

%description
CDfs is a file system for Linux systems that 'exports' all tracks and boot images on a CD as normal files. These files can then be mounted (e.g. for ISO and boot images), copied, played (audio and VideoCD tracks)... The primary goal for developing this file system was to `unlock' information in old ISO images.

%prep
%setup -q
%patch0 -p0
%patch1 -p0
set -- *
mkdir source
mv "$@" source/
mkdir obj

%build
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
    rm -rf obj/$flavor
    cp -r source obj/$flavor
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
       M=$PWD/obj/$flavor
done

%install
# Kernel module
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

%clean
rm -rf "$RPM_BUILD_ROOT"