File compcache-Mandriva_2009.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 module-init-tools
License:        GPL v2 only
Group:          System/Kernel
Version:        0.5.3
Release:        2
Summary:        Compressed RAM based swap device
Source0:        compcache-%{version}.tar.bz2
Source1:        sysconfig.compcache
Source2:        boot.compcache
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

%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
* Fri May 08 2009 tiwai@suse.de
- disable build on 10.3 and older, removed the test patch
- fix boot script to match with ramzswap
* Thu May 07 2009 tiwai@suse.de
- fix build with 10.3 kernel
* Thu May 07 2009 tiwai@suse.de
- clean up obsolete patch
* Thu May 07 2009 cyberorg@opensuse.org
- Update to 0.5.2
* Mon Nov 03 2008 tiwai@suse.de
- fixed init script
* Thu Oct 23 2008 tiwai@suse.de
- initial version: 0.4