%define _prefix /var/opt/mkcdrec %define _boot_arch x86 Summary: mkCDrec (make CD-ROM Recovery) disaster recovery tool-set Name: mkcdrec Version: v0.9.6 Release: 1mdv2007.1 Source: mkCDrec_%{version}.tar.gz ##Source1: busybox-1.01.tar.bz2 URL: http://mkcdrec.ota.be/ License: GPL Group: Archiving/Backup Packager: Patrice FERLET (metal3d@copix.org) %if %{_boot_arch}==ia64 Prereq: chkconfig fileutils cdrecord mkisofs tar ash mtools rsync Requires: kernel >= 2.0.0, util-linux >= 2.11, parted >= 1.6 BuildRequires: gcc >= 2.96 %endif %if %{_boot_arch}==x86_64 Prereq: fileutils cdrecord mkisofs tar ash rsync syslinux Requires: kernel >= 2.0.0, util-linux >= 2.11 BuildRequires: gcc >= 2.96 %endif %if %{_boot_arch}==x86 Prereq: coreutils fileutils cdrecord mkisofs tar ash syslinux rsync Requires: kernel >= 2.0.0, util-linux >= 2.11 BuildRequires: syslinux >= 1.60, gcc >= 2.96 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: %{_prefix} %description mkCDrec (Make CDROM Recovery) makes a bootable (El Torito) disaster recovery image, including backups of the Linux system to one or more CD-ROM(s) (multi-volume sets). Otherwise, the backups can be stored on another disk, NFS disk, or (remote) tape. After a disk crash or system intrusion, the system can be booted from the CD-ROM and one can restore the complete system as it was. It also features disk cloning, which allows one to restore a disk to another disk (the destination disk does not have to be of the same size, as it calculates the partition layout itself). Currently, ext2, ext3, minix, msdos, fat, vfat, reiserfs, xfs and jfs filesystems are supported. One Button Disaster Recovery (OBDR) is also supported as recovery method. %changelog * Thu Jun 07 2007 Patrice FERLET - Create Rpm for Mandriva - install in Archiving/Backup group * Tue Aug 15 2006 Gratien D'haese - remove webmin from spec file * Sun Jun 18 2006 Gratien D'haese - remove the perl pre-requisite (only needed if users want perl ADD_PERL=true) * Sun Oct 30 2005 Gratien D'haese - Config.sh became a config file instead of plain file - remove mtools from x86_64 Prereq list - added syslinux to x86_64 Prereq list - added OBDR to the description line - man page mkcdrec.8 saved as plain file and as gzip'ed file - remove all CVS directory for install - added Source1 and changed %setup * Sat Sep 10 2005 Gratien D'haese - add mkcdrec script * Wed Jun 23 2004 Guillaume Radde & Gratien D'haese - add support for IA64 - add webmin module * Tue Jun 09 2004 Gratien D'haese - remove sfdisk, tinylogin and udpcp * Tue Jun 01 2004 Gratien D'haese - Updated Prereq list * Sat Jan 24 2004 Gratien D'haese - remove "cksfv*/src/cksfv" from binaries * Tue Nov 13 2003 Gratien D'haese - add contributions directory * Sun Sep 7 2003 Gratien D'haese - added doc/style to rpm * Mon May 5 2003 Michal Jaegermann - spec edits for sanity * Sat Feb 22 2003 Gratien D'haese - changed the rules for syslinux/isolinux * Sat Jan 10 2003 Gratien D'haese - finishing mkcdrec2.spec for our i386 binary RPM * Tue Dec 10 2002 Gratien D'haese - extending mkcdrec2.spec file * Sat Feb 09 2002 Gratien D'haese - initial draft of mkcdrec2.spec file and modified the original makerpms.sh shell script from samba team. %prep %setup -n mkcdrec ##%setup -n mkcdrec -a 1 %build make -f Makefile.%{_boot_arch} build %install find . -name CVS | xargs rm -Rfv mkdir -p $RPM_BUILD_ROOT%{_prefix}/busybox/applets mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin mkdir -p $RPM_BUILD_ROOT%{_prefix}/contributions mkdir -p $RPM_BUILD_ROOT%{_prefix}/modules mkdir -p $RPM_BUILD_ROOT%{_prefix}/scripts/messages mkdir -p $RPM_BUILD_ROOT%{_prefix}/doc mkdir -p $RPM_BUILD_ROOT%{_prefix}/doc/style mkdir -p $RPM_BUILD_ROOT%{_prefix}/doc/images mkdir -p $RPM_BUILD_ROOT%{_prefix}/usr mkdir -p $RPM_BUILD_ROOT%{_prefix}/etc mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8 for fname in busybox*/busybox busybox*/busybox.links; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/busybox done install -m 755 busybox*/applets/install.sh $RPM_BUILD_ROOT%{_prefix}/busybox/applets for fname in cutstream*/cutstream \ pastestream*/pastestream mediacheck/checkisomd5 mediacheck/implantisomd5 do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/bin done for fname in contributions/*.sh contributions/mkcdrec; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/contributions done for fname in scripts/messages/*; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/scripts/messages done for fname in `find scripts -type f`; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/$fname done for fname in modules/*; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/modules done for fname in `find etc -type d`; do install -d -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/$fname done for fname in `find etc -type f`; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/$fname done for fname in `find usr -type d`; do install -d -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/$fname done for fname in `find usr -type f`; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/$fname done for fname in `find . -type f -maxdepth 1`; do install -m 755 $fname $RPM_BUILD_ROOT%{_prefix}/$fname done install -m 755 doc/mkcdrec.8 $RPM_BUILD_ROOT%{_mandir}/man8 gzip -c $RPM_BUILD_ROOT%{_mandir}/man8/mkcdrec.8 > \ $RPM_BUILD_ROOT%{_mandir}/man8/mkcdrec.8.gz for file in \ $RPM_BUILD_ROOT%{_prefix}/.cvsignore \ $RPM_BUILD_ROOT%{_prefix}/COPYING \ $RPM_BUILD_ROOT%{_prefix}/Changelog \ $RPM_BUILD_ROOT%{_prefix}/README \ ; do rm -f $file ; done %files %defattr(-,root,root) %doc Changelog README COPYING %doc %{_prefix}/doc %config %{_prefix}/Config.sh %{_prefix}/VERSION %{_prefix}/.config.bb %{_prefix}/busybox %{_prefix}/bin %{_prefix}/contributions %{_prefix}/scripts %{_prefix}/modules %{_prefix}/etc %{_prefix}/usr %{_prefix}/linuxrc %{_prefix}/linuxrc_find_and_prep_root %{_prefix}/linuxrc_post %{_prefix}/linuxrc_pre %{_prefix}/Makefile %{_prefix}/Makefile.new-powermac %{_prefix}/Makefile.x86 %{_prefix}/Makefile.sparc %{_prefix}/Makefile.ia64 %{_prefix}/Makefile.x86_64 %{_mandir}/man8/* %post install -m 750 %{_prefix}/contributions/mkcdrec /usr/sbin/mkcdrec %postun # rm the mkcdrec wrapper rm -f /usr/sbin/mkcdrec