File storage-fixup.spec of Package storage-fixup

#
# spec file for package storage-fixup (Version 0.2)
#
# Copyright (c) 2010 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/
#


Url:            http://git.kernel.org/?p=linux/kernel/git/tj/storage-fixup.git

Name:           storage-fixup
BuildArch:      noarch
License:        BSD3c(or similar)
Group:          System/Base
Requires:       bash coreutils sed hdparm smartmontools dmidecode scsi
PreReq:         %insserv_prereq
AutoReqProv:    on
Version:        0.2
Release:        34
Summary:        Storage Fixup Script
Source0:        %{name}-%{version}.tar.bz2
Source1:        rc.storage-fixup
Source2:        pm.storage-fixup
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#!ExclusiveArch:  %ix86 ia64 x86_64

%description
storage-fixup executes fixup commands for devices matched using dmi and
hal properties.  This is primarily to adjust too aggressive ATA APM
settings which makes the drive unload its head frequently shortening
its lifespan.



Authors:
--------
    Tejun Heo <teheo@suse.de>

%prep
%setup

%build

%install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/lib/pm-utils/sleep.d
install -d -m 755 $RPM_BUILD_ROOT/usr/sbin
install -m 755 storage-fixup $RPM_BUILD_ROOT/usr/sbin/storage-fixup
install -m 644 storage-fixup.conf $RPM_BUILD_ROOT/etc/storage-fixup.conf
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/boot.storage-fixup
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/pm-utils/sleep.d/50storage-fixup

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{fillup_and_insserv -fy boot.storage-fixup}

%preun
%{stop_on_removal boot.storage-fixup}

%postun
%{insserv_cleanup}

%files
%defattr(-,root,root)
%doc LICENSE
%config /etc/storage-fixup.conf
%config /etc/init.d/boot.storage-fixup
%dir /usr/lib/pm-utils/
%dir /usr/lib/pm-utils/sleep.d
/usr/lib/pm-utils/sleep.d/50storage-fixup
/usr/sbin/storage-fixup

%changelog
openSUSE Build Service is sponsored by