dmraid/dmraid.spec
OBS User autobuild 2300b2c114 Accepting request 16886 from Base:System
Copy from Base:System/dmraid based on submit request 16886 from user coolo

OBS-URL: https://build.opensuse.org/request/show/16886
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dmraid?expand=0&rev=23
2009-08-17 12:37:49 +00:00

201 lines
5.4 KiB
RPMSpec

#
# spec file for package dmraid (Version 1.0.0.rc15)
#
# 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
Name: dmraid
BuildRequires: device-mapper-devel zlib-devel
BuildRequires: libselinux-devel
Requires: kpartx
Url: http://people.redhat.com/~heinzm/sw/dmraid/src/
License: GPL v2 or later
Group: System/Base
AutoReqProv: on
Summary: A Device-Mapper Software RAID Support Tool
Version: 1.0.0.rc15
Release: 6
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
Source6: libdmraid-events_DSO-1.0.0.rc4.tgz
Source7: dm_dso_reg_tool-1.0.0.rc2.tgz
Patch0: dmraid_fixup_paths3.diff
Patch3: dmraid_duplicate_args.patch
Patch4: dmraid-1.0.0.rc13-geometry.patch
Patch6: dmraid-1.0.0.rc15-fix_macro.patch
Patch10: dmraid-1.0.0.rc14-fixup_lsi1068e.patch
Patch11: dmraid-1.0.0.rc15-scsi_serial_remove_ws.patch
Patch500: ARM_libdmraid_ldflags.diff
# libdmraid-events
Patch50: libdmraid-events.dif
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
%package -n libdmraid-events0
License: GPL v2 or later
Group: System/Base
Summary: A Device-Mapper Software RAID Support Tool
%description -n libdmraid-events0
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 -a 6 -a 7 -n dmraid/%{version}
%patch0 -p2
%patch3 -p1
%patch4 -p1
%patch6 -p1
%patch10 -p1
%patch11 -p1
pushd libdmraid*
%patch50
%patch500 -p1
popd
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=%{_prefix} \
--infodir=%{_infodir} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--sbindir=/sbin \
--with-user=`id -nu` --with-group=`id -ng` \
--enable-libselinux --enable-libsepol
make
pushd libdmraid-events
CPATH=../include LIBRARY_PATH=../lib make
ln -sf libdmraid-events.so.0 libdmraid-events.so
popd
pushd reg_tool
make
popd
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT/usr/include/dmraid
rm $RPM_BUILD_ROOT%{_libdir}/libdmraid.a
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
install -D -m755 libdmraid-events/libdmraid-events.so.0 $RPM_BUILD_ROOT/%{_lib}/libdmraid-events.so.0
cp -a libdmraid-events/libdmraid-events.so $RPM_BUILD_ROOT/%{_lib}/libdmraid-events.so
install -D -m755 reg_tool/dm_dso_reg_tool $RPM_BUILD_ROOT/sbin/dm_dso_reg_tool
install -D -m644 reg_tool/dm_dso_reg_tool.8 $RPM_BUILD_ROOT/usr/share/man/man8/dm_dso_reg_tool.8
%post
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_only}
%postun
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{insserv_cleanup}
%preun
%stop_on_removal
%post -n libdmraid-events0 -p /sbin/ldconfig
%postun -n libdmraid-events0 -p /sbin/ldconfig
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \
&& rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
#%{_libdir}/libdmraid.so
/sbin/dmraid
%{_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.so
/sbin/dm_dso_reg_tool
%files -n libdmraid-events0
%defattr(-, root, root)
/%{_lib}/libdmraid-events.so.0
%changelog