Changeset 50 in MondoRescue for branches/2.04_berlios/mindi/mindi.spec


Ignore:
Timestamp:
Oct 8, 2005, 12:43:16 AM (14 years ago)
Author:
bcornec
Message:

mindi.spec sharable between distributions (natively OK for mdk/mdv)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.04_berlios/mindi/mindi.spec

    r35 r50  
    22# $Id$
    33#
    4 %define _prefix /usr
     4%define is_mandriva %(test -e /etc/mandriva-release && echo 1 || echo 0)
     5%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
     6%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
     7%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
     8%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
     9
     10%define name    mindi
     11%define version 1.04_berlios
     12%define mrel    1
     13
     14%if %is_redhat
     15%define release %{mrel}
     16%define src     %{name}-%{version}.tgz
     17Autoreq:    0
     18%endif
     19
     20%if %is_mandrake
     21%define release %{mrel}mdk
     22%define src     %{name}-%{version}.tar.bz2
     23Autoreqprov: no
     24%endif
     25
     26%if %is_mandriva
     27%define release %{mrel}mdk
     28%define src     %{name}-%{version}.tar.bz2
     29Autoreqprov: no
     30%endif
     31
    532Summary:    Mindi creates emergency boot disks/CDs using your kernel, tools and modules
    6 Name:       mindi
    7 Version:    1.04_berlios
    8 Release:    1
     33Name:       %name
     34Version:    %version
     35Release:    %release
    936License:    GPL
    1037Group:      System/Kernel and hardware
    11 Url:        http://www.mondorescue.org
    12 Source:     %{name}-%{version}.tgz
     38Url:        http://mondorescue.berlios.de
     39Source:     %{src}
    1340BuildRoot:  %{_tmppath}/%{name}-%{version}
    14 Requires:   bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools
     41Requires:   bzip2 >= 0.9, mkisofs, ncurses, binutils, gawk, dosfstools,afio
    1542# Not on all systems
    1643#Conflicts: bonnie++
    17 Prefix:     %{_prefix}
    18 Autoreq:    0
    1944
    2045%description
     
    2550
    2651%prep
    27 %setup
     52%{__rm}  -rf $RPM_BUILD_ROOT
     53%setup -n %name-%{version}
    2854
    2955%build
    3056%ifarch ia64
    31 make -f Makefile.parted2fdisk clean
    32 make -f Makefile.parted2fdisk
     57%{__make} -f Makefile.parted2fdisk clean
     58%{__make} -f Makefile.parted2fdisk
    3359%endif
    3460
    3561%install
    36 %{__rm} -Rf /usr/local/share/mindi
     62export DONT_RELINK=1
     63
    3764%{__rm} -rf $RPM_BUILD_ROOT
    3865MINDIDIR=$RPM_BUILD_ROOT%{_datadir}/mindi
    39 %{__mkdir_p} $MINDIDIR $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sysconfdir}/mindi
     66
     67%{__mkdir_p} $MINDIDIR $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sysconfdir}/mindi $RPM_BUILD_ROOT%{_sbindir}
    4068%{__mv} deplist.txt $RPM_BUILD_ROOT%{_sysconfdir}/mindi/
    4169%{__cp} -af * $MINDIDIR
    42 %ifarch ia64
    43     make -f Makefile.parted2fdisk DEST=${MINDIDIR}/ install
     70
     71%ifarch ia64
     72    %{__make} -f Makefile.parted2fdisk DEST=${MINDIDIR}/ install
    4473    %{__mv} $MINDIDIR/rootfs/bin/busybox-ia64 $MINDIDIR/rootfs/bin/busybox
    4574    %{__mv} $MINDIDIR/rootfs/sbin/parted2fdisk-ia64 $MINDIDIR/rootfs/sbin/parted2fdisk
     
    5079%endif
    5180%{__rm} -f $MINDIDIR/rootfs/bin/busybox-ia64 $MINDIDIR/rootfs/sbin/parted2fdisk-ia64 $MINDIDIR/rootfs/bin/busybox-i386 $MINDIDIR/rootfs/bin/busybox-i386.net
     81
    5282#
    5383# These are installed twice if not removed here
     84#
    5485( cd $MINDIDIR
    5586%{__rm} -f CHANGES INSTALL COPYING README TODO README.ia64 README.pxe
    5687)
    57 cd $RPM_BUILD_ROOT%{_bindir}
    58 %{__ln_s} -f %{_datadir}/mindi/mindi .
    59 %{__ln_s} -f %{_datadir}/mindi/parted2fdisk.pl .
    60 %{__ln_s} -f %{_datadir}/mindi/analyze-my-lvm .
    61 chmod +x $MINDIDIR/mindi
     88
     89# Symlinks
     90
     91cd $RPM_BUILD_ROOT%{_sbindir}
     92%{__ln_s} -f ${_sbindir}/mindi/mindi .
     93%{__ln_s} -f ${_sbindir}/mindi/analyze-my-lvm .
     94%ifarch ia64
     95%{__ln_s} -f ${_sbindir}/mindi/parted2fdisk.pl .
     96%endif
    6297
    6398%clean
     
    76111
    77112%files
    78 %defattr(-,root,root,-)
     113%defattr(644,root,root,755)
    79114%config(noreplace) %{_sysconfdir}/mindi/deplist.txt
    80115%doc CHANGES INSTALL COPYING README TODO README.ia64 README.pxe
    81 #%attr(755,root,root) %{_datadir}/mindi/mindi
    82 
     116%attr(755,-,-) %{_sbindir}/mindi
     117%attr(755,-,-) %{_sbindir}/analyze-my-lvm
    83118%{_datadir}/mindi
    84 %{_bindir}/analyze-my-lvm
    85 %{_bindir}/mindi
    86 %{_bindir}/parted2fdisk.pl
     119%attr(755,-,-) %{_datadir}/mindi/analyze-my-lvm
     120%attr(755,-,-) %{_datadir}/mindi/mindi
     121%ifarch ia64
     122%attr(755,-,-) %{_datadir}/mindi/parted2fdisk.pl
     123%endif
     124%attr(755,-,-) %{_datadir}/mindi/aux-tools/sbin/*
     125%attr(755,-,-) %{_datadir}/mindi/rootfs/bin/*
     126%attr(755,-,-) %{_datadir}/mindi/rootfs/sbin/*
    87127
    88128%changelog
    89129* Tue Sep 06 2005 Bruno Cornec <bcornec@users.berlios.de> 1.04_berlios
    90130- Merge of patches mentionned on mondo ML + ia64 updates
     131- Fix bugs when called alone
    91132
    92133* Tue May 03 2005 Hugo Rabson <hugorabson@msn.com> 1.04_cvs_20050503
Note: See TracChangeset for help on using the changeset viewer.