File cloop.spec of Package cloop
#
# spec file for package cloop
#
# Copyright (c) 2012 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/
#
Name: cloop
Version: 2.639
Release: 0
Summary: Compressed loop block device
License: GPL-2.0
Group: System/Filesystems
Url: http://debian-knoppix.alioth.debian.org/packages/cloop/
Source: cloop_%version-2.tar.xz
Source2: %name-preamble
Patch1: cloop-kmod-install.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: kernel-syms
BuildRequires: module-init-tools
BuildRequires: xz
BuildRequires: zlib-devel
%kernel_module_package -p %name-preamble
%description
The compressed loopback device or cloop is a module for the Linux
kernel. It adds support for transparently decompressed, read-only
block devices. It is not a compressed file system in itself.
%package KMP
Summary: Kernel modules for cloop
Group: System/Filesystems
%description KMP
The compressed loopback device or cloop is a module for the Linux
kernel. It adds support for transparently decompressed, read-only
block devices. It is not a compressed file system in itself.
%prep
%setup -q
%patch -P 1 -p1
%build
# Setting CFLAGS is required here since it is not done implicitly
# when not using %%configure
export CFLAGS="%optflags";
export CXXFLAGS="%optflags";
make %{?_smp_mflags} utils cloop_suspend;
unset CFLAGS CXXFLAGS;
cd ../;
for flavor in %flavors_to_build; do
cp -a %name-%version "obj-$flavor";
pushd "obj-$flavor";
make KERNEL_DIR="/usr/src/linux-obj/%_target_cpu/$flavor" \
%{?_smp_mflags} cloop.ko;
popd;
done;
%install
b="%buildroot";
mkdir -p "$b/%_bindir";
install -pm0755 cloop_suspend create_compressed_fs \
extract_compressed_fs "$b/%_bindir/";
export INSTALL_MOD_PATH="$b";
for flavor in %flavors_to_build; do
pushd "../obj-$flavor/";
make KERNEL_DIR="/usr/src/linux-obj/%_target_cpu/$flavor" modules_install;
popd;
done;
%files
%defattr(-,root,root)
%_bindir/*
%changelog