%define name dmraid %define version 1.0.0 %define extraver rc11 #define pre pre1 %define rel 1 # yes this sucks, but it has to %if %{?extraver:1}%{?!extraver:0} %if %{?pre:1}%{?!pre:0} %define release %mkrel 0.%{extraver}.0.%{pre}.%{rel} %define extrasrc .%{extraver}-%{pre} %else %define release %mkrel 0.%{extraver}.%{rel} %define extrasrc .%{extraver} %endif %endif %ifarch %{ix86} x86_64 %define use_dietlibc 1 %else %define use_dietlibc 0 %endif %{?_with_dietlibc: %{expand: %%global use_dietlibc 1}} %{?_without_dietlibc: %{expand: %%global use_dietlibc 0}} Summary: Device-mapper ATARAID tool Name: %{name} Version: %{version} Release: %{release} Source0: http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-%{version}%{extrasrc}.tar.bz2 Patch0: dmraid-mdk.patch.bz2 # patches from fedora development Patch10: dmraid-1.0.0.rc11-metadata-stride.patch Patch11: dmraid-1.0.0.rc11-format-handler-dos.patch Patch12: dmraid-1.0.0.rc11-hpt37x-errorlog.patch Patch13: dmraid-1.0.0.rc11-dupes.patch License: GPL Group: System/Kernel and hardware BuildRoot: %{_tmppath}/%{name}-buildroot URL: http://people.redhat.com/~heinzm BuildRequires: device-mapper-devel >= 1.00.09 %if %{use_dietlibc} BuildRequires: dietlibc-devel >= 0.29 %else BuildRequires: glibc-static-devel %endif %description dmraid (Device-Mapper Raid tool) discovers, [de]activates and displays properties of software RAID sets (i.e. ATARAID) and contained DOS partitions using the device-mapper runtime of the 2.6 kernel. The following ATARAID types are supported on Linux 2.6: Adaptec HostRAID ASR Highpoint HPT37X Highpoint HPT45X Intel Software RAID JMicron JMB36X LSI Logic MegaRAID NVidia NForce Promise FastTrack Silicon Image Medley VIA Software RAID %prep %setup -q -n %{name}/%{version}.%{extraver} %patch10 -p2 %patch11 -p2 %patch12 -p2 %patch13 -p2 %patch0 -p2 -b .mdk %build %if %{use_dietlibc} %configure2_5x --enable-dietlibc --disable-libselinux %else %configure2_5x --enable-static_link --disable-libselinux %endif make mv tools/dmraid tools/dmraid-static make clean %configure --with-user=`id -un` --with-group=`id -gn` make %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_libdir} %{buildroot}/sbin %makeinstall -s sbindir=%{buildroot}/sbin install tools/dmraid-static %{buildroot}/sbin rm -rf %{buildroot}%{_includedir}/dmraid %clean rm -rf %{buildroot} %files %defattr(644,root,root,755) %doc CHANGELOG KNOWN_BUGS README TODO doc/dmraid_design.txt %attr(755,root,root) /sbin/dmraid %attr(755,root,root) /sbin/dmraid-static %{_mandir}/man8/dmraid.8* %exclude %{_libdir} %changelog * Thu Aug 10 2006 Luca Berra <bluca@comedia.it> + 08/10/06 07:25:31 (55300) added more secret fedora patches * Thu Aug 10 2006 Luca Berra <bluca@comedia.it> + 08/10/06 06:59:51 (55298) Import dmraid * Tue May 23 2006 Luca Berra <bluca@vodka.it> 1.0.0-0.rc11.1mdk - rc11 from rawhide (ugh, it seems rawhide is more uptodate than upstream) * Sun May 21 2006 Luca Berra <bluca@vodka.it> 1.0.0-0.rc11.0.pre1.1mdk - new pre-release (should fix the stripe issue with kernel > 2.6.16) - drop patch 2 (merged upstream) - support pre-rc releases in spec - re-enable dietlibc for x86_64 and require a fixed dietlibc * Tue Feb 21 2006 Thierry Vignaud <tvignaud@mandriva.com> 1.0.0-0.rc10.1mdk - new release - update description - drop patch 1 (obsoleted by build system) - patch 2: fix using autoconf * Sun Feb 05 2006 Thomas Backlund <tmb@mandriva.org> 1.0.0-0.rc9.4mdk - Fix buildrequires when building without dietlibc - Fix configure for static build without dietlibc - build x86_64 without dietlibc for now to work around ContraPolice Heap Buffer Overflow Crash * Fri Jan 06 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0.0-0.rc9.3mdk - drop selinux support (P1) * Mon Oct 03 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.0.0-0.rc9.2mdk - BuildRequires fix * Mon Oct 03 2005 Pixel <pixel@mandriva.com> 1.0.0-0.rc9.1mdk - new release - drop lib64 patch which is applied upstream - drop patch4 (typo fix applied upstream) - we don't want the dmraid devel files * Fri May 27 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.0-0.rc8.1mdk - new release * Thu Apr 28 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.0-0.rc7.1mdk - new release - rediff patch * Thu Mar 10 2005 Pixel <pixel@mandrakesoft.com> 1.0.0-0.rc6.4mdk - don't require old libdevmapper 1.00 * Tue Mar 08 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.0.0-0.rc6.3mdk - Patch4: fix typo in pdc big endian only code * Sat Mar 05 2005 Luca Berra <bluca@vodka.it> 1.0.0-0.rc6.2mdk - rebuild for new libdevmapper * Wed Mar 02 2005 Luca Berra <bluca@vodka.it> 1.0.0-0.rc6.1mdk - rc6 - removed p2 (big endian fix, merged upstream) - remove Prefix: tag * Mon Feb 21 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.0-0.rc5f.3mdk - lib64 fixes * Sat Feb 12 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.0.0-0.rc5f.2mdk - fix build on big endian cpus * Thu Jan 13 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.0-0.rc5f.1mdk - new release - update description - spec cleanups * Tue Sep 07 2004 Luca Berra <bluca@vodka.it> 1.0.0-0.rc4.1mdk - rc4 - fix source url - remove -s from make (fixed upstream) * Sun Sep 05 2004 Luca Berra <bluca@vodka.it> 1.0.0-0.rc3.1mdk - rc3 - remove p0 merged upstream * Thu Jul 22 2004 Luca Berra <bluca@vodka.it> 1.0.0-0.rc2.1mdk - initial mandrakelinux release