c9aa517
Name:           debootstrap
7a524a2
Version:        1.0.9
7d9ce87
Release:        1%{?dist}.1
c9aa517
Summary:        Bootstrap a basic Debian GNU/Linux system
c9aa517
c9aa517
Group:          System Environment/Base
c9aa517
License:        MIT
c9aa517
URL:            http://code.erisian.com.au/Wiki/debootstrap
c9aa517
Source0:        http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_%{version}.tar.gz
c9aa517
Patch0:         debootstrap-1.0.7-arch.patch
c9aa517
Patch1:         debootstrap-1.0.7-devices.patch
7a524a2
Patch2:         debootstrap-1.0.8-perms.patch
c9aa517
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c9aa517
BuildArch:      noarch
c9aa517
c9aa517
BuildRequires:  fakeroot, MAKEDEV
c9aa517
Requires:       gettext, wget, tar, gzip, binutils
c9aa517
c9aa517
c9aa517
%description
c9aa517
debootstrap is used to create a Debian base system from scratch, without
c9aa517
requiring the availability of dpkg or apt.  It does this by downloading
c9aa517
.deb files from a mirror site, and carefully unpacking them into a
c9aa517
directory which can eventually be chrooted into.
c9aa517
c9aa517
This might be often useful coupled with virtualization techniques to run
c9aa517
Debian GNU/Linux guest system.
c9aa517
c9aa517
c9aa517
%prep
c9aa517
%setup -q -n %{name}
c9aa517
%patch0 -p1 -b .arch
c9aa517
%patch1 -p1 -b .devices
c9aa517
%patch2 -p1 -b .perms
c9aa517
c9aa517
c9aa517
%build
35eeab1
# in Makefile, path is hardcoded, modify it to take rpm macros into account
35eeab1
sed -i -e 's;/usr/sbin;%{_sbindir};' Makefile
35eeab1
c9aa517
# _smp_mflags would make no sense at all
c9aa517
fakeroot make
c9aa517
c9aa517
c9aa517
%install
c9aa517
rm -rf $RPM_BUILD_ROOT
c9aa517
install -d $RPM_BUILD_ROOT%{_datadir}/debootstrap/scripts/
c9aa517
install -d $RPM_BUILD_ROOT%{_sbindir}
c9aa517
install -d $RPM_BUILD_ROOT%{_mandir}/man8
35eeab1
install -p -m 0644 debootstrap.8 $RPM_BUILD_ROOT%{_mandir}/man8
c9aa517
make install DESTDIR=$RPM_BUILD_ROOT \
35eeab1
       VERSION="%{version}-%{release}" \
35eeab1
       DSDIR=$RPM_BUILD_ROOT%{_datadir}/debootstrap
35eeab1
# substitute the rpm macro path
35eeab1
sed -i -e 's;/usr/share;%{_datadir};' $RPM_BUILD_ROOT%{_sbindir}/debootstrap
35eeab1
# correct the debootstrap script timestamp
35eeab1
touch -r debootstrap  $RPM_BUILD_ROOT%{_sbindir}/debootstrap
c9aa517
c9aa517
c9aa517
%clean
c9aa517
rm -rf $RPM_BUILD_ROOT
c9aa517
c9aa517
c9aa517
%files
c9aa517
%defattr(-,root,root,-)
c9aa517
%{_datadir}/debootstrap
c9aa517
%{_sbindir}/debootstrap
c9aa517
%{_mandir}/man8/debootstrap.8*
c9aa517
%doc debian/changelog debian/copyright debian/README.Debian
c9aa517
c9aa517
c9aa517
%changelog
7a524a2
* Sun Jun 15 2008 Adam Goode <adam@spicenitz.org> - 1.0.9-1
7a524a2
- 1.0.9
7a524a2
7a524a2
* Fri Feb 22 2008 Lubomir Kundrak <lkundrak@redhat.com> - 1.0.8-1
7a524a2
- 1.0.8
7a524a2
35eeab1
* Sun Nov 18 2007 Patrice Dumas <pertusus@free.fr> 1.0.7-2
35eeab1
- keep timestamps
35eeab1
- use rpm macros instead of hardcoded paths
35eeab1
c9aa517
* Sat Nov 17 2007 Lubomir Kundrak <lkundrak@redhat.com> 1.0.7-1
c9aa517
- Version bump
c9aa517
c9aa517
* Thu Nov 15 2007 Lubomir Kundrak <lkundrak@redhat.com> 1.0.3-2
c9aa517
- Some more fixes, thanks to Patrice Dumas (#329291)
c9aa517
c9aa517
* Fri Oct 12 2007 Lubomir Kundrak <lkundrak@redhat.com> 1.0.3-1
c9aa517
- Incorporating advises from Patrice Dumas (#329291) in account
c9aa517
c9aa517
* Fri Oct 12 2007 Lubomir Kundrak <lkundrak@redhat.com> 0.3.3.2etch1-1
c9aa517
- Initial package