dmraid/dmraid.spec

138 lines
3.8 KiB
RPMSpec

#
# spec file for package dmraid (Version 1.0.0.rc16)
#
# 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/
#
# norootforbuild
Name: dmraid
BuildRequires: device-mapper-devel zlib-devel
BuildRequires: libselinux-devel
Requires: kpartx
Url: http://people.redhat.com/~heinzm/sw/dmraid/src/
License: GPLv2+
Group: System/Base
AutoReqProv: on
Summary: A Device-Mapper Software RAID Support Tool
Version: 1.0.0.rc16
Release: 1
Source: ftp://people.redhat.com/heinzm/sw/dmraid/src/dmraid-%{version}.tar.bz2
Source1: sysconfig.dmraid
Source2: boot.dmraid
Source3: README.SuSE
Source4: mkinitrd-setup.sh
Source5: mkinitrd-boot.sh
Patch1: dmraid-1.0.0.rc16-cvs-2010-02-02.patch
Patch2: dmraid-1.0.0.rc13-geometry.patch
Patch3: lib-install.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq
%description
This software discovers, activates, deactivates, and displays
properties of software RAID sets, such as ATARAID, and contained DOS
partitions.
dmraid uses libdevmapper and the device-mapper kernel runtime to create
devices with respective mappings for the ATARAID sets discovered.
The following ATARAID types are supported:
- Highpoint HPT37X
- Highpoint HPT45X
- Intel Software RAID
- Promise FastTrak
- Silicon Image Medley
Authors:
--------
Heinz Mauelshagen
%prep
%setup -n dmraid/%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp %{SOURCE3} .
%build
#rm -f aclocal.m4
autoreconf -fi
rm -r autom4te.cache
# Update config.{guess,sub}
%{?suse_update_config}
export CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=$RPM_BUILD_ROOT%{_prefix} \
--infodir=$RPM_BUILD_ROOT%{_infodir} \
--libdir=$RPM_BUILD_ROOT/%_lib \
--mandir=$RPM_BUILD_ROOT%{_mandir} \
--includedir=$RPM_BUILD_ROOT%{_includedir} \
--sbindir=$RPM_BUILD_ROOT/sbin \
--with-user=`id -nu` --with-group=`id -ng` \
--enable-libselinux --enable-libsepol
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT/usr/include/dmraid
rm $RPM_BUILD_ROOT/%_lib/libdmraid.a
rm $RPM_BUILD_ROOT/%_lib/libdmraid.so
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m644 %{SOURCE1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.dmraid
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m744 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/boot.dmraid
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
install -m 755 %{S:4} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-dmraid.sh
install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dmraid.sh
%post
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_only}
%postun
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{insserv_cleanup}
%preun
%stop_on_removal
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
&& rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
/sbin/dmraid
/sbin/dmevent_tool
%{_mandir}/man8/*
%doc LICENSE LICENSE_GPL LICENSE_LGPL README README.SuSE TODO doc/*
/var/adm/fillup-templates/sysconfig.dmraid
/etc/init.d/boot.dmraid
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-dmraid.sh
/lib/mkinitrd/scripts/boot-dmraid.sh
/%{_lib}/libdmraid-events-isw.so
/%{_lib}/libdmraid.so.1.0.0.rc16-3
%changelog