File compcache.spec of Package compcache
#
# spec file for package compcache (Version 0.5.3)
#
# 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
Name: compcache
BuildRequires: kernel-source kernel-syms module-init-tools
License: GPL v2 only
Group: System/Kernel
Version: 0.5.3
Release: 3
Summary: Compressed RAM based swap device
Source0: compcache-%{version}.tar.bz2
Source1: sysconfig.compcache
Source2: boot.compcache
Patch: compcache-2.6.31-build-fix.diff
Url: http://code.google.com/p/compcache/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq
Requires: compcache-kmp
%suse_kernel_module_package -n %{name} kdump um
%description
The compcache is a RAM-based block device acting as a swap disk. This
can effectively increase the available memory on your machine by
virtually swapping pages into the compressed memory.
This package contains the boot script for loading/unloading the
modules. The modules are contained in compcache-kmp packages.
Authors:
--------
Nitin Gupta
%package KMP
License: GPL v2 only
Summary: Kernel module for compressed RAM based swap device
Group: System/Kernel
%description KMP
The compcache is a RAM-based block device acting as a swap disk. This
can effectively increase the available memory on your machine by
virtually swapping pages into the compressed memory.
This package contains the kernel module for compcache.
Authors:
--------
Nitin Gupta
%prep
%setup -q
%patch -p1
%build
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
mkdir -p obj/$flavor
cp -al *.[ch] Makefile sub-projects obj/$flavor
KERNEL_OBJ="/usr/src/linux-obj/%_target_cpu/$flavor"
make -C ${KERNEL_OBJ} M=$PWD/obj/$flavor modules
done
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
KERNEL_OBJ="/usr/src/linux-obj/%_target_cpu/$flavor"
make -C ${KERNEL_OBJ} M=$PWD/obj/$flavor modules_install
done
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -c -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/var/adm/fillup-templates
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/
%post
%{fillup_only}
%preun
%stop_on_removal
%postun
%{insserv_cleanup}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/etc/init.d/boot.compcache
/var/adm/fillup-templates/sysconfig.compcache
%changelog