File dump.spec of Package dump

#
# spec file for package dump (Version 0.4b43)
#
# Copyright (c) 2010 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:           dump
BuildRequires:  e2fsprogs-devel libselinux-devel readline-devel zlib-devel
License:        BSD3c
Group:          Productivity/Archiving/Backup
AutoReqProv:    on
Version:        0.4b43
Release:        1
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-pathnames.patch
Patch1:         %{name}-%{version}-destdir.patch
Patch2:         %{name}-%{version}-configure.patch
Patch3:         %{name}-%{version}-include.patch
Url:            http://dump.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A Backup Program
Requires:       rmt

%description
The dump package contains both dump and restore.  Dump examines files
in a file system, determines which ones need to be backed up, and
copies those files to a specified disk, tape, or other storage medium. 
The restore command performs the inverse function of dump. It can
restore a full backup of a file system.



Authors:
--------
    Remy Card <Remy.Card@freenix.fr>
    Stelian Pop <pop@cybercable.fr>

%prep
%setup
#mkdir ext2fs
#sed -e "s|ino_t|__ino_t|g" /usr/include/ext2fs/ext2fs.h >ext2fs/ext2fs.h
%patch0
%patch1
%patch2
%patch3
%{suse_update_config}

%build
%define prefix   /usr
%define sysconfdir /etc
aclocal
autoconf
CFLAGS="$RPM_OPT_FLAGS -save-temps" \
CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --mandir=%{_mandir} \
                --prefix=%{prefix} \
		--sbindir=/sbin \
                --infodir=%{_infodir} \
                --sysconfdir=%{sysconfdir} \
                --enable-rmt \
		--with-ldopts= \
                --with-ccopts="-I$PWD -Wall" \
                --with-binowner=root \
		--with-bingrp=root \
		--with-binmode=0755 \
	        --with-manowner=root \
		--with-mangrp=root \
		--with-manmode=0644 \
		--enable-readline \
		--enable-largefile
make

%install
install -d $RPM_BUILD_ROOT/etc \
           $RPM_BUILD_ROOT/sbin \
           $RPM_BUILD_ROOT/%{_mandir}/man8
make DESTDIR=$RPM_BUILD_ROOT/ install
#do not install rmt
#ln -sf ../sbin/rmt $RPM_BUILD_ROOT/etc/rmt
rm $RPM_BUILD_ROOT/sbin/rmt
rm $RPM_BUILD_ROOT/%{_mandir}/man8/rmt.*

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;

%files
%defattr(-, root, root)
%doc %{_mandir}/*/*
/sbin/*
%doc CHANGES COPYRIGHT KNOWNBUGS MAINTAINERS README REPORTING-BUGS
%doc THANKS TODO dump.lsm examples

%changelog
openSUSE Build Service is sponsored by